blob: 4b69f3a1cdeff06be025042e372a329dcf11c278 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandlfe09a542011-03-06 10:26:32 +01004# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +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+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +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 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +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.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +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 || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +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.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +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 Kloseb9621712010-04-24 17:59:49 +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"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +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 Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +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. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +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.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +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'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000564PACKAGE_VERSION='3.3'
565PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +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>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
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
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Georg Brandl1ca2e792011-03-05 20:51:24 +0100647HAS_HG
648HGBRANCH
649HGTAG
650HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
652AR
653RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000654USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000655GNULD
656LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000657LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000658RUNSHARED
659INSTSONAME
660LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000661PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000662BLDLIBRARY
663DLLLIBRARY
664LDLIBRARY
665LIBRARY
666BUILDEXEEXT
667EGREP
668GREP
669CPP
670MAINCC
671CXX
672OBJEXT
673EXEEXT
674ac_ct_CC
675CPPFLAGS
676LDFLAGS
677CFLAGS
678CC
679EXPORT_MACOSX_DEPLOYMENT_TARGET
680CONFIGURE_MACOSX_DEPLOYMENT_TARGET
681SGI_ABI
682MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000683FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000684FRAMEWORKUNIXTOOLSPREFIX
685FRAMEWORKALTINSTALLLAST
686FRAMEWORKALTINSTALLFIRST
687FRAMEWORKINSTALLLAST
688FRAMEWORKINSTALLFIRST
689PYTHONFRAMEWORKINSTALLDIR
690PYTHONFRAMEWORKPREFIX
691PYTHONFRAMEWORKDIR
692PYTHONFRAMEWORKIDENTIFIER
693PYTHONFRAMEWORK
694LIPO_32BIT_FLAGS
695ARCH_RUN_32BIT
696UNIVERSALSDK
697CONFIG_ARGS
698SOVERSION
699VERSION
700target_alias
701host_alias
702build_alias
703LIBS
704ECHO_T
705ECHO_N
706ECHO_C
707DEFS
708mandir
709localedir
710libdir
711psdir
712pdfdir
713dvidir
714htmldir
715infodir
716docdir
717oldincludedir
718includedir
719localstatedir
720sharedstatedir
721sysconfdir
722datadir
723datarootdir
724libexecdir
725sbindir
726bindir
727program_transform_name
728prefix
729exec_prefix
730PACKAGE_URL
731PACKAGE_BUGREPORT
732PACKAGE_STRING
733PACKAGE_VERSION
734PACKAGE_TARNAME
735PACKAGE_NAME
736PATH_SEPARATOR
737SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000739ac_user_opts='
740enable_option_checking
741enable_universalsdk
742with_universal_archs
743with_framework_name
744enable_framework
745with_gcc
746with_cxx_main
747with_suffix
748enable_shared
749enable_profiling
750with_pydebug
751with_libs
752with_system_expat
753with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000754enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000755with_dbmliborder
756with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_threads
758with_thread
759enable_ipv6
760with_doc_strings
761with_tsc
762with_pymalloc
763with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000764with_fpectl
765with_libm
766with_libc
767enable_big_digits
768with_wide_unicode
769with_computed_gotos
770'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000771 ac_precious_vars='build_alias
772host_alias
773target_alias
774CC
775CFLAGS
776LDFLAGS
777LIBS
778CPPFLAGS
Jesus Cea736e7fc2011-03-14 17:36:54 +0100779CPP
780CPPFLAGS'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000781
Guido van Rossum627b2d71993-12-24 10:39:16 +0000782
Guido van Rossum7f43da71994-08-01 12:15:30 +0000783# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000784ac_init_help=
785ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_unrecognized_opts=
787ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788# The variables have the same names as the options, with
789# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000790cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793no_recursion=
794prefix=NONE
795program_prefix=NONE
796program_suffix=NONE
797program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000799site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802x_includes=NONE
803x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000804
805# Installation directory options.
806# These are left unexpanded so users can "make install exec_prefix=/foo"
807# and all the variables that are supposed to be based on exec_prefix
808# by default will actually change.
809# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000811bindir='${exec_prefix}/bin'
812sbindir='${exec_prefix}/sbin'
813libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814datarootdir='${prefix}/share'
815datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816sysconfdir='${prefix}/etc'
817sharedstatedir='${prefix}/com'
818localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819includedir='${prefix}/include'
820oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
822infodir='${datarootdir}/info'
823htmldir='${docdir}'
824dvidir='${docdir}'
825pdfdir='${docdir}'
826psdir='${docdir}'
827libdir='${exec_prefix}/lib'
828localedir='${datarootdir}/locale'
829mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835 # If the previous option needs an argument, assign it.
836 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838 ac_prev=
839 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000843 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
844 *=) ac_optarg= ;;
845 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848 # Accept the important Cygnus configure options, so we can diagnose typos.
849
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850 case $ac_dashdash$ac_option in
851 --)
852 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854 -bindir | --bindir | --bindi | --bind | --bin | --bi)
855 ac_prev=bindir ;;
856 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858
859 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 -cache-file | --cache-file | --cache-fil | --cache-fi \
865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
866 ac_prev=cache_file ;;
867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000869 cache_file=$ac_optarg ;;
870
871 --config-cache | -C)
872 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
880 | --dataroo | --dataro | --datar)
881 ac_prev=datarootdir ;;
882 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
883 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
884 datarootdir=$ac_optarg ;;
885
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000887 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000889 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000890 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000891 ac_useropt_orig=$ac_useropt
892 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893 case $ac_user_opts in
894 *"
895"enable_$ac_useropt"
896"*) ;;
897 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
898 ac_unrecognized_sep=', ';;
899 esac
900 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901
902 -docdir | --docdir | --docdi | --doc | --do)
903 ac_prev=docdir ;;
904 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
905 docdir=$ac_optarg ;;
906
907 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
908 ac_prev=dvidir ;;
909 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
910 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
912 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000913 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000916 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936
937 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947
948 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000989 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 no_create=yes ;;
1007
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001120 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 --x)
1149 # Obsolete; use --with-x.
1150 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151
1152 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1153 | --x-incl | --x-inc | --x-in | --x-i)
1154 ac_prev=x_includes ;;
1155 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1156 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1160 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1161 ac_prev=x_libraries ;;
1162 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1163 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001166 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1167Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 ;;
1169
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 *=*)
1171 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1172 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 case $ac_envvar in #(
1174 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001177 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 export $ac_envvar ;;
1179
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001182 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001185 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ;;
1187
1188 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001189done
1190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001193 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194fi
1195
Matthias Kloseb9621712010-04-24 17:59:49 +00001196if test -n "$ac_unrecognized_opts"; then
1197 case $enable_option_checking in
1198 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1201 esac
1202fi
1203
1204# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001205for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1206 datadir sysconfdir sharedstatedir localstatedir includedir \
1207 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1208 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001210 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 # Remove trailing slashes.
1212 case $ac_val in
1213 */ )
1214 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1215 eval $ac_var=\$ac_val;;
1216 esac
1217 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219 [\\/$]* | ?:[\\/]* ) continue;;
1220 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001222 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001223done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224
Martin v. Löwis11437992002-04-12 09:54:03 +00001225# There might be people who depend on the old broken behavior: `$host'
1226# used to hold the argument of --host etc.
1227# FIXME: To remove some day.
1228build=$build_alias
1229host=$host_alias
1230target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231
Martin v. Löwis11437992002-04-12 09:54:03 +00001232# FIXME: To remove some day.
1233if test "x$host_alias" != x; then
1234 if test "x$build_alias" = x; then
1235 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001236 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1237 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241fi
1242
1243ac_tool_prefix=
1244test -n "$host_alias" && ac_tool_prefix=$host_alias-
1245
1246test "$silent" = yes && exec 6>/dev/null
1247
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250ac_ls_di=`ls -di .` &&
1251ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001252 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001254 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255
1256
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257# Find the source files, if location was not specified.
1258if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286 srcdir=..
1287 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288else
1289 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 pwd)`
1299# When building in place, set srcdir=.
1300if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302fi
1303# Remove unnecessary trailing slashes from srcdir.
1304# Double slashes in file names in object file debugging info
1305# mess up M-x gdb in Emacs.
1306case $srcdir in
1307*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308esac
1309for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316#
1317# Report the --help message.
1318#
1319if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
1322 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001323\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001324
1325Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330Defaults for the options are specified in brackets.
1331
1332Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001337 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
Martin v. Löwis11437992002-04-12 09:54:03 +00001343Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001347 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349By default, \`make install' will install all the files in
1350\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352for instance \`--prefix=\$HOME'.
1353
1354For better control, use the options below.
1355
1356Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
1377
1378 cat <<\_ACEOF
1379_ACEOF
1380fi
1381
1382if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001383 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001384 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 cat <<\_ACEOF
1387
1388Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1391 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001392 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001393 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001394 --enable-framework[=INSTALLDIR]
1395 Build (MacOSX|Darwin) framework
1396 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001397 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001398 --enable-loadable-sqlite-extensions
1399 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --enable-ipv6 Enable ipv6 (with ipv4) support
1401 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001402 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404
1405Optional Packages:
1406 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1407 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001408 --with-universal-archs=ARCH
1409 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001410 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001411 --with-framework-name=FRAMEWORK
1412 specify an alternate name of the framework built
1413 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001415 --with-cxx-main=<compiler>
1416 compile main() and link python executable with C++
1417 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --with-suffix=.exe set executable suffix
1419 --with-pydebug build with Py_DEBUG defined
1420 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001421 --with-system-expat build pyexpat module using an installed expat
1422 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001423 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001424 --with-dbmliborder=db1:db2:...
1425 order to check db backends for dbm. Valid value is a
1426 colon separated string with the backend names
1427 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --with(out)-threads[=DIRECTORY]
1430 disable/enable thread support
1431 --with(out)-thread[=DIRECTORY]
1432 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001434 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001436 --with-valgrind Enable Valgrind support
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
Georg Brandl52d168a2008-01-07 18:10:24 +00001440 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001441 --with(out)-computed-gotos
1442 Use computed gotos in evaluation loop (enabled by
1443 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Some influential environment variables:
1446 CC C compiler command
1447 CFLAGS C compiler flags
1448 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1449 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001450 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001452 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 CPP C preprocessor
1454
1455Use these variables to override the choices made by `configure' or to help
1456it to find libraries and programs with nonstandard names/locations.
1457
Georg Brandle2e15612009-05-20 18:25:10 +00001458Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001460ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001461fi
1462
1463if test "$ac_init_help" = "recursive"; then
1464 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001466 test -d "$ac_dir" ||
1467 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 ac_builddir=.
1470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471case "$ac_dir" in
1472.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001476 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 case $ac_top_builddir_sub in
1478 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480 esac ;;
1481esac
1482ac_abs_top_builddir=$ac_pwd
1483ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484# for backward compatibility:
1485ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 ac_top_srcdir=$ac_top_builddir_sub
1491 ac_abs_top_srcdir=$ac_pwd ;;
1492 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 ac_top_srcdir=$srcdir
1495 ac_abs_top_srcdir=$srcdir ;;
1496 *) # Relative name.
1497 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498 ac_top_srcdir=$ac_top_build_prefix$srcdir
1499 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001500esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503 cd "$ac_dir" || { ac_status=$?; continue; }
1504 # Check for guested configure.
1505 if test -f "$ac_srcdir/configure.gnu"; then
1506 echo &&
1507 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508 elif test -f "$ac_srcdir/configure"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001512 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 fi || ac_status=$?
1514 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 done
1516fi
1517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001519if $ac_init_version; then
1520 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001521python configure 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001522generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001523
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001524Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525This configure script is free software; the Free Software Foundation
1526gives unlimited permission to copy, distribute and modify it.
1527_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001530
1531## ------------------------ ##
1532## Autoconf initialization. ##
1533## ------------------------ ##
1534
1535# ac_fn_c_try_compile LINENO
1536# --------------------------
1537# Try to compile conftest.$ac_ext, and return whether this succeeded.
1538ac_fn_c_try_compile ()
1539{
1540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541 rm -f conftest.$ac_objext
1542 if { { ac_try="$ac_compile"
1543case "(($ac_try" in
1544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545 *) ac_try_echo=$ac_try;;
1546esac
1547eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548$as_echo "$ac_try_echo"; } >&5
1549 (eval "$ac_compile") 2>conftest.err
1550 ac_status=$?
1551 if test -s conftest.err; then
1552 grep -v '^ *+' conftest.err >conftest.er1
1553 cat conftest.er1 >&5
1554 mv -f conftest.er1 conftest.err
1555 fi
1556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557 test $ac_status = 0; } && {
1558 test -z "$ac_c_werror_flag" ||
1559 test ! -s conftest.err
1560 } && test -s conftest.$ac_objext; then :
1561 ac_retval=0
1562else
1563 $as_echo "$as_me: failed program was:" >&5
1564sed 's/^/| /' conftest.$ac_ext >&5
1565
1566 ac_retval=1
1567fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 as_fn_set_status $ac_retval
1570
1571} # ac_fn_c_try_compile
1572
1573# ac_fn_c_try_cpp LINENO
1574# ----------------------
1575# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_cpp ()
1577{
1578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579 if { { ac_try="$ac_cpp conftest.$ac_ext"
1580case "(($ac_try" in
1581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1582 *) ac_try_echo=$ac_try;;
1583esac
1584eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1585$as_echo "$ac_try_echo"; } >&5
1586 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1587 ac_status=$?
1588 if test -s conftest.err; then
1589 grep -v '^ *+' conftest.err >conftest.er1
1590 cat conftest.er1 >&5
1591 mv -f conftest.er1 conftest.err
1592 fi
1593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001594 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1596 test ! -s conftest.err
1597 }; then :
1598 ac_retval=0
1599else
1600 $as_echo "$as_me: failed program was:" >&5
1601sed 's/^/| /' conftest.$ac_ext >&5
1602
1603 ac_retval=1
1604fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_cpp
1609
1610# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1611# -------------------------------------------------------
1612# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1613# the include files in INCLUDES and setting the cache variable VAR
1614# accordingly.
1615ac_fn_c_check_header_mongrel ()
1616{
1617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001618 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1620$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001621if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 $as_echo_n "(cached) " >&6
1623fi
1624eval ac_res=\$$3
1625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1626$as_echo "$ac_res" >&6; }
1627else
1628 # Is the header compilable?
1629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1630$as_echo_n "checking $2 usability... " >&6; }
1631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1632/* end confdefs.h. */
1633$4
1634#include <$2>
1635_ACEOF
1636if ac_fn_c_try_compile "$LINENO"; then :
1637 ac_header_compiler=yes
1638else
1639 ac_header_compiler=no
1640fi
1641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1643$as_echo "$ac_header_compiler" >&6; }
1644
1645# Is the header present?
1646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1647$as_echo_n "checking $2 presence... " >&6; }
1648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1649/* end confdefs.h. */
1650#include <$2>
1651_ACEOF
1652if ac_fn_c_try_cpp "$LINENO"; then :
1653 ac_header_preproc=yes
1654else
1655 ac_header_preproc=no
1656fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001657rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1659$as_echo "$ac_header_preproc" >&6; }
1660
1661# So? What about this header?
1662case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1663 yes:no: )
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1665$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1667$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1668 ;;
1669 no:yes:* )
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1671$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1673$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1675$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1677$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1679$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001680( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001681## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001682## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 ) | sed "s/^/$as_me: WARNING: /" >&2
1684 ;;
1685esac
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1687$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001688if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001689 $as_echo_n "(cached) " >&6
1690else
1691 eval "$3=\$ac_header_compiler"
1692fi
1693eval ac_res=\$$3
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1695$as_echo "$ac_res" >&6; }
1696fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001698
1699} # ac_fn_c_check_header_mongrel
1700
1701# ac_fn_c_try_run LINENO
1702# ----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1704# that executables *can* be run.
1705ac_fn_c_try_run ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>&5
1716 ac_status=$?
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1718 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1719 { { case "(($ac_try" in
1720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1721 *) ac_try_echo=$ac_try;;
1722esac
1723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1724$as_echo "$ac_try_echo"; } >&5
1725 (eval "$ac_try") 2>&5
1726 ac_status=$?
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; }; }; then :
1729 ac_retval=0
1730else
1731 $as_echo "$as_me: program exited with status $ac_status" >&5
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=$ac_status
1736fi
1737 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001738 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 as_fn_set_status $ac_retval
1740
1741} # ac_fn_c_try_run
1742
1743# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1744# -------------------------------------------------------
1745# Tests whether HEADER exists and can be compiled using the include files in
1746# INCLUDES, setting the cache variable VAR accordingly.
1747ac_fn_c_check_header_compile ()
1748{
1749 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001752if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001753 $as_echo_n "(cached) " >&6
1754else
1755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1756/* end confdefs.h. */
1757$4
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_compile "$LINENO"; then :
1761 eval "$3=yes"
1762else
1763 eval "$3=no"
1764fi
1765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1766fi
1767eval ac_res=\$$3
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1769$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001770 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001771
1772} # ac_fn_c_check_header_compile
1773
1774# ac_fn_c_try_link LINENO
1775# -----------------------
1776# Try to link conftest.$ac_ext, and return whether this succeeded.
1777ac_fn_c_try_link ()
1778{
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext conftest$ac_exeext
1781 if { { ac_try="$ac_link"
1782case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_link") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1794 fi
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest$ac_exeext && {
1800 test "$cross_compiling" = yes ||
1801 $as_test_x conftest$ac_exeext
1802 }; then :
1803 ac_retval=0
1804else
1805 $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808 ac_retval=1
1809fi
1810 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812 # interfere with the next link command; also delete a directory that is
1813 # left behind by Apple's compiler. We do this before executing the actions.
1814 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001815 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001816 as_fn_set_status $ac_retval
1817
1818} # ac_fn_c_try_link
1819
1820# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1821# -------------------------------------------
1822# Tests whether TYPE exists after having included INCLUDES, setting cache
1823# variable VAR accordingly.
1824ac_fn_c_check_type ()
1825{
1826 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1828$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001829if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001830 $as_echo_n "(cached) " >&6
1831else
1832 eval "$3=no"
1833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1834/* end confdefs.h. */
1835$4
1836int
1837main ()
1838{
1839if (sizeof ($2))
1840 return 0;
1841 ;
1842 return 0;
1843}
1844_ACEOF
1845if ac_fn_c_try_compile "$LINENO"; then :
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849int
1850main ()
1851{
1852if (sizeof (($2)))
1853 return 0;
1854 ;
1855 return 0;
1856}
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859
1860else
1861 eval "$3=yes"
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001871
1872} # ac_fn_c_check_type
1873
1874# ac_fn_c_find_uintX_t LINENO BITS VAR
1875# ------------------------------------
1876# Finds an unsigned integer type with width BITS, setting cache variable VAR
1877# accordingly.
1878ac_fn_c_find_uintX_t ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1882$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 # Order is important - never check a type that is potentially smaller
1888 # than half of the expected target width.
1889 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1890 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$ac_includes_default
1894int
1895main ()
1896{
1897static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1898test_array [0] = 0
1899
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_compile "$LINENO"; then :
1905 case $ac_type in #(
1906 uint$2_t) :
1907 eval "$3=yes" ;; #(
1908 *) :
1909 eval "$3=\$ac_type" ;;
1910esac
1911fi
1912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001913 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001914
1915else
1916 break
1917fi
1918 done
1919fi
1920eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001924
1925} # ac_fn_c_find_uintX_t
1926
1927# ac_fn_c_find_intX_t LINENO BITS VAR
1928# -----------------------------------
1929# Finds a signed integer type with width BITS, setting cache variable VAR
1930# accordingly.
1931ac_fn_c_find_intX_t ()
1932{
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1935$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001936if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001937 $as_echo_n "(cached) " >&6
1938else
1939 eval "$3=no"
1940 # Order is important - never check a type that is potentially smaller
1941 # than half of the expected target width.
1942 for ac_type in int$2_t 'int' 'long int' \
1943 'long long int' 'short int' 'signed char'; do
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001947 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001948int
1949main ()
1950{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001951static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001952test_array [0] = 0
1953
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001962 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001963int
1964main ()
1965{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001966static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001967 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1968test_array [0] = 0
1969
1970 ;
1971 return 0;
1972}
1973_ACEOF
1974if ac_fn_c_try_compile "$LINENO"; then :
1975
1976else
1977 case $ac_type in #(
1978 int$2_t) :
1979 eval "$3=yes" ;; #(
1980 *) :
1981 eval "$3=\$ac_type" ;;
1982esac
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001987 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989else
1990 break
1991fi
1992 done
1993fi
1994eval ac_res=\$$3
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999} # ac_fn_c_find_intX_t
2000
2001# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2002# --------------------------------------------
2003# Tries to find the compile-time value of EXPR in a program that includes
2004# INCLUDES, setting VAR accordingly. Returns whether the value could be
2005# computed
2006ac_fn_c_compute_int ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 if test "$cross_compiling" = yes; then
2010 # Depending upon the size, compute the lo and hi bounds.
2011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$4
2014int
2015main ()
2016{
2017static int test_array [1 - 2 * !(($2) >= 0)];
2018test_array [0] = 0
2019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_lo=0 ac_mid=0
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
2031main ()
2032{
2033static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2034test_array [0] = 0
2035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041 ac_hi=$ac_mid; break
2042else
2043 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2044 if test $ac_lo -le $ac_mid; then
2045 ac_lo= ac_hi=
2046 break
2047 fi
2048 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051 done
2052else
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) < 0)];
2060test_array [0] = 0
2061
2062 ;
2063 return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_compile "$LINENO"; then :
2067 ac_hi=-1 ac_mid=-1
2068 while :; do
2069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2070/* end confdefs.h. */
2071$4
2072int
2073main ()
2074{
2075static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2076test_array [0] = 0
2077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=$ac_mid; break
2084else
2085 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2086 if test $ac_mid -le $ac_hi; then
2087 ac_lo= ac_hi=
2088 break
2089 fi
2090 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093 done
2094else
2095 ac_lo= ac_hi=
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100# Binary search between lo and hi bounds.
2101while test "x$ac_lo" != "x$ac_hi"; do
2102 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h. */
2105$4
2106int
2107main ()
2108{
2109static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2110test_array [0] = 0
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=$ac_mid
2118else
2119 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122done
2123case $ac_lo in #((
2124?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2125'') ac_retval=1 ;;
2126esac
2127 else
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131static long int longval () { return $2; }
2132static unsigned long int ulongval () { return $2; }
2133#include <stdio.h>
2134#include <stdlib.h>
2135int
2136main ()
2137{
2138
2139 FILE *f = fopen ("conftest.val", "w");
2140 if (! f)
2141 return 1;
2142 if (($2) < 0)
2143 {
2144 long int i = longval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%ld", i);
2148 }
2149 else
2150 {
2151 unsigned long int i = ulongval ();
2152 if (i != ($2))
2153 return 1;
2154 fprintf (f, "%lu", i);
2155 }
2156 /* Do not output a trailing newline, as this causes \r\n confusion
2157 on some platforms. */
2158 return ferror (f) || fclose (f) != 0;
2159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_run "$LINENO"; then :
2165 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2166else
2167 ac_retval=1
2168fi
2169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2170 conftest.$ac_objext conftest.beam conftest.$ac_ext
2171rm -f conftest.val
2172
2173 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 as_fn_set_status $ac_retval
2176
2177} # ac_fn_c_compute_int
2178
2179# ac_fn_c_check_func LINENO FUNC VAR
2180# ----------------------------------
2181# Tests whether FUNC exists, setting the cache variable VAR accordingly
2182ac_fn_c_check_func ()
2183{
2184 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2186$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002187if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002188 $as_echo_n "(cached) " >&6
2189else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2193 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2194#define $2 innocuous_$2
2195
2196/* System header to define __stub macros and hopefully few prototypes,
2197 which can conflict with char $2 (); below.
2198 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2199 <limits.h> exists even on freestanding compilers. */
2200
2201#ifdef __STDC__
2202# include <limits.h>
2203#else
2204# include <assert.h>
2205#endif
2206
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210 Use char because int might match the return type of a GCC
2211 builtin and then its argument prototype would still apply. */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217 to always fail with ENOSYS. Some functions are actually named
2218 something starting with __ and the normal name is an alias. */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main ()
2225{
2226return $2 ();
2227 ;
2228 return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"; then :
2232 eval "$3=yes"
2233else
2234 eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext \
2237 conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002243
2244} # ac_fn_c_check_func
2245
2246# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2247# ----------------------------------------------------
2248# Tries to find if the field MEMBER exists in type AGGR, after including
2249# INCLUDES, setting cache variable VAR accordingly.
2250ac_fn_c_check_member ()
2251{
2252 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2254$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002255if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002256 $as_echo_n "(cached) " >&6
2257else
2258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2259/* end confdefs.h. */
2260$5
2261int
2262main ()
2263{
2264static $2 ac_aggr;
2265if (ac_aggr.$3)
2266return 0;
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$4=yes"
2273else
2274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h. */
2276$5
2277int
2278main ()
2279{
2280static $2 ac_aggr;
2281if (sizeof ac_aggr.$3)
2282return 0;
2283 ;
2284 return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"; then :
2288 eval "$4=yes"
2289else
2290 eval "$4=no"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296eval ac_res=\$$4
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002299 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002300
2301} # ac_fn_c_check_member
2302
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002303# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2304# ---------------------------------------------
2305# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2306# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002307ac_fn_c_check_decl ()
2308{
2309 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002310 as_decl_name=`echo $2|sed 's/ *(.*//'`
2311 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2313$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2314if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002315 $as_echo_n "(cached) " >&6
2316else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318/* end confdefs.h. */
2319$4
2320int
2321main ()
2322{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002323#ifndef $as_decl_name
2324#ifdef __cplusplus
2325 (void) $as_decl_use;
2326#else
2327 (void) $as_decl_name;
2328#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002329#endif
2330
2331 ;
2332 return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336 eval "$3=yes"
2337else
2338 eval "$3=no"
2339fi
2340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002346
2347} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002349This file contains any messages produced by compilers while
2350running configure, to aid debugging if configure makes a mistake.
2351
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002352It was created by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002353generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002354
2355 $ $0 $@
2356
2357_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002358exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002359{
2360cat <<_ASUNAME
2361## --------- ##
2362## Platform. ##
2363## --------- ##
2364
2365hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2366uname -m = `(uname -m) 2>/dev/null || echo unknown`
2367uname -r = `(uname -r) 2>/dev/null || echo unknown`
2368uname -s = `(uname -s) 2>/dev/null || echo unknown`
2369uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370
2371/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2372/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373
2374/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2375/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2376/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002378/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2379/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2380/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2381
2382_ASUNAME
2383
2384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo "PATH: $as_dir"
2390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002391IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002392
2393} >&5
2394
2395cat >&5 <<_ACEOF
2396
2397
2398## ----------- ##
2399## Core tests. ##
2400## ----------- ##
2401
2402_ACEOF
2403
2404
2405# Keep a trace of the command line.
2406# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002407# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002408# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002411ac_configure_args0=
2412ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_must_keep_next=false
2414for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002415do
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 for ac_arg
2417 do
2418 case $ac_arg in
2419 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2420 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2421 | -silent | --silent | --silen | --sile | --sil)
2422 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002423 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002424 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 esac
2426 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002427 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002429 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002431 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 case $ac_arg in
2434 *=* | --config-cache | -C | -disable-* | --disable-* \
2435 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2436 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2437 | -with-* | --with-* | -without-* | --without-* | --x)
2438 case "$ac_configure_args0 " in
2439 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2440 esac
2441 ;;
2442 -* ) ac_must_keep_next=true ;;
2443 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 ;;
2447 esac
2448 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002449done
Matthias Kloseb9621712010-04-24 17:59:49 +00002450{ ac_configure_args0=; unset ac_configure_args0;}
2451{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453# When interrupted or exit'd, cleanup temporary files, and complete
2454# config.log. We remove comments because anyway the quotes in there
2455# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456# WARNING: Use '\'' to represent an apostrophe within the trap.
2457# 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 +00002458trap 'exit_status=$?
2459 # Save into config.log some information that might help in debugging.
2460 {
2461 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002462
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002463 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002464## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002465## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002466 echo
2467 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468(
2469 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2470 eval ac_val=\$$ac_var
2471 case $ac_val in #(
2472 *${as_nl}*)
2473 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2475$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 esac
2477 case $ac_var in #(
2478 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2480 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac ;;
2482 esac
2483 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2486 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488 "s/'\''/'\''\\\\'\'''\''/g;
2489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2490 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002491 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002493 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac |
2495 sort
2496)
Martin v. Löwis11437992002-04-12 09:54:03 +00002497 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002498
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002499 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002500## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002501## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 echo
2503 for ac_var in $ac_subst_vars
2504 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 eval ac_val=\$$ac_var
2506 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 done | sort
2511 echo
2512
2513 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002514 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002516## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 echo
2518 for ac_var in $ac_subst_files
2519 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 eval ac_val=\$$ac_var
2521 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 done | sort
2526 echo
2527 fi
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002530 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002531## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002532## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
2536 fi
2537 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 $as_echo "$as_me: caught signal $ac_signal"
2539 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 rm -f core *.core core.conftest.* &&
2542 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002545for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
2548ac_signal=0
2549
2550# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
Matthias Kloseb9621712010-04-24 17:59:49 +00002553$as_echo "/* confdefs.h */" > confdefs.h
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555# Predefined preprocessor variables.
2556
2557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_NAME "$PACKAGE_NAME"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_VERSION "$PACKAGE_VERSION"
2567_ACEOF
2568
Martin v. Löwis11437992002-04-12 09:54:03 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_STRING "$PACKAGE_STRING"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573cat >>confdefs.h <<_ACEOF
2574#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2575_ACEOF
2576
Matthias Kloseb9621712010-04-24 17:59:49 +00002577cat >>confdefs.h <<_ACEOF
2578#define PACKAGE_URL "$PACKAGE_URL"
2579_ACEOF
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581
2582# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002583# Prefer an explicitly selected file to automatically selected ones.
2584ac_site_file1=NONE
2585ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002587 # We do not want a PATH search for config.site.
2588 case $CONFIG_SITE in #((
2589 -*) ac_site_file1=./$CONFIG_SITE;;
2590 */*) ac_site_file1=$CONFIG_SITE;;
2591 *) ac_site_file1=./$CONFIG_SITE;;
2592 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 ac_site_file1=$prefix/share/config.site
2595 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596else
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 ac_site_file1=$ac_default_prefix/share/config.site
2598 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002600for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601do
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 test "x$ac_site_file" = xNONE && continue
2603 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2605$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002607 . "$ac_site_file" \
2608 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2610as_fn_error $? "failed to load site script $ac_site_file
2611See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612 fi
2613done
2614
2615if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 # Some versions of bash will fail to source /dev/null (special files
2617 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2618 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2620$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2623 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 esac
2625 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002626else
Matthias Kloseb9621712010-04-24 17:59:49 +00002627 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2628$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 >$cache_file
2630fi
2631
2632# Check that the precious variables saved in the cache have kept the same
2633# value.
2634ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2637 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2639 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $ac_old_set,$ac_new_set in
2641 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2643$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 +00002644 ac_cache_corrupted=: ;;
2645 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2647$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 ac_cache_corrupted=: ;;
2649 ,);;
2650 *)
2651 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 # differences in whitespace do not lead to failure.
2653 ac_old_val_w=`echo x $ac_old_val`
2654 ac_new_val_w=`echo x $ac_new_val`
2655 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2657$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2658 ac_cache_corrupted=:
2659 else
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2661$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2662 eval $ac_var=\$ac_old_val
2663 fi
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2665$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2667$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 fi;;
2669 esac
2670 # Pass precious variables to config.status.
2671 if test "$ac_new_set" = set; then
2672 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 *) ac_arg=$ac_var=$ac_new_val ;;
2675 esac
2676 case " $ac_configure_args " in
2677 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002679 esac
2680 fi
2681done
2682if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2686$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002687 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002689## -------------------- ##
2690## Main body of script. ##
2691## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692
Guido van Rossum7f43da71994-08-01 12:15:30 +00002693ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2697ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698
Guido van Rossum627b2d71993-12-24 10:39:16 +00002699
Michael W. Hudson54241132001-12-07 15:38:26 +00002700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002702
2703
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
Benjamin Petersond23f8222009-04-05 19:13:16 +00002705if test "$prefix" != "/"; then
2706 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2707fi
2708
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710
2711
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002712# We don't use PACKAGE_ variables, and they cause conflicts
2713# with other autoconf-based packages that include Python.h
2714grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2715rm confdefs.h
2716mv confdefs.h.new confdefs.h
2717
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002718
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002719VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002720
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002721# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002722
2723SOVERSION=1.0
2724
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002725# The later defininition of _XOPEN_SOURCE disables certain features
2726# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2727
Matthias Kloseb9621712010-04-24 17:59:49 +00002728$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002729
2730
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002731# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2732# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2733# them.
2734
Matthias Kloseb9621712010-04-24 17:59:49 +00002735$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002736
2737
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002738# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2739# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2740# them.
2741
Matthias Kloseb9621712010-04-24 17:59:49 +00002742$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002743
2744
Martin v. Löwisd6320502004-08-12 13:45:08 +00002745# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2746# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2747
Matthias Kloseb9621712010-04-24 17:59:49 +00002748$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002749
2750
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002751# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2752# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2753# them.
2754
Matthias Kloseb9621712010-04-24 17:59:49 +00002755$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002756
2757
2758
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002759define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002760
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002761# Arguments passed to configure.
2762
2763CONFIG_ARGS="$ac_configure_args"
2764
Matthias Kloseb9621712010-04-24 17:59:49 +00002765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2766$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002768if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002770 case $enableval in
2771 yes)
2772 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002773 if test ! -d "${enableval}"
2774 then
2775 enableval=/
2776 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002777 ;;
2778 esac
2779 case $enableval in
2780 no)
2781 UNIVERSALSDK=
2782 enable_universalsdk=
2783 ;;
2784 *)
2785 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002786 if test ! -d "${UNIVERSALSDK}"
2787 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002788 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002789 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002790 ;;
2791 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002792
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002793
Thomas Wouters477c8d52006-05-27 19:21:47 +00002794else
2795
2796 UNIVERSALSDK=
2797 enable_universalsdk=
2798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002799fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002800
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002801if test -n "${UNIVERSALSDK}"
2802then
Matthias Kloseb9621712010-04-24 17:59:49 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2804$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002805else
Matthias Kloseb9621712010-04-24 17:59:49 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2807$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002808fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002811
2812
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002813UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002814
Matthias Kloseb9621712010-04-24 17:59:49 +00002815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2816$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002817
2818# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002819if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002820 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2822$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002823 UNIVERSAL_ARCHS="$withval"
2824
2825else
2826
Matthias Kloseb9621712010-04-24 17:59:49 +00002827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2828$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002829
2830fi
2831
2832
2833
2834
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002835
2836# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002837if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002838 withval=$with_framework_name;
2839 PYTHONFRAMEWORK=${withval}
2840 PYTHONFRAMEWORKDIR=${withval}.framework
2841 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2842
2843else
2844
2845 PYTHONFRAMEWORK=Python
2846 PYTHONFRAMEWORKDIR=Python.framework
2847 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2848
2849fi
2850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002852if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002853 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002854 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002855 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002856 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002857 esac
2858 case $enableval in
2859 no)
2860 PYTHONFRAMEWORK=
2861 PYTHONFRAMEWORKDIR=no-framework
2862 PYTHONFRAMEWORKPREFIX=
2863 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002864 FRAMEWORKINSTALLFIRST=
2865 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002866 FRAMEWORKALTINSTALLFIRST=
2867 FRAMEWORKALTINSTALLLAST=
2868 if test "x${prefix}" = "xNONE"; then
2869 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2870 else
2871 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2872 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002873 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002874 ;;
2875 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002876 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002877 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002878 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002879 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002880 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2881 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002882 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002883
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002884 if test "x${prefix}" = "xNONE" ; then
2885 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002886
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002887 else
2888 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2889 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002890
2891 case "${enableval}" in
2892 /System*)
2893 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2894 if test "${prefix}" = "NONE" ; then
2895 # See below
2896 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2897 fi
2898 ;;
2899
2900 /Library*)
2901 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2902 ;;
2903
2904 */Library/Frameworks)
2905 MDIR="`dirname "${enableval}"`"
2906 MDIR="`dirname "${MDIR}"`"
2907 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2908
2909 if test "${prefix}" = "NONE"; then
2910 # User hasn't specified the
2911 # --prefix option, but wants to install
2912 # the framework in a non-default location,
2913 # ensure that the compatibility links get
2914 # installed relative to that prefix as well
2915 # instead of in /usr/local.
2916 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2917 fi
2918 ;;
2919
2920 *)
2921 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2922 ;;
2923 esac
2924
Jack Jansen127e56e2001-09-11 14:41:54 +00002925 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002926
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002927 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002928 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002929 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002931 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002932
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002933 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2934
2935 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2936
Jack Jansene578a632001-08-15 01:27:14 +00002937 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002938
Guido van Rossum563e7081996-09-10 18:20:48 +00002939else
Martin v. Löwis11437992002-04-12 09:54:03 +00002940
Jack Jansene578a632001-08-15 01:27:14 +00002941 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002942 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002943 PYTHONFRAMEWORKPREFIX=
2944 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002945 FRAMEWORKINSTALLFIRST=
2946 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002947 FRAMEWORKALTINSTALLFIRST=
2948 FRAMEWORKALTINSTALLLAST=
2949 if test "x${prefix}" = "xNONE" ; then
2950 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2951 else
2952 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2953 fi
Jack Jansene578a632001-08-15 01:27:14 +00002954 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002955
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002957fi
2958
Thomas Wouters477c8d52006-05-27 19:21:47 +00002959
2960
Michael W. Hudson54241132001-12-07 15:38:26 +00002961
2962
2963
2964
Jack Jansene578a632001-08-15 01:27:14 +00002965
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002966
2967
2968
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002969
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002970
Jack Jansene578a632001-08-15 01:27:14 +00002971##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002972## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002973## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002974##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002975# Set name for machine-dependent library files
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2978$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002979if test -z "$MACHDEP"
2980then
Guido van Rossum563e7081996-09-10 18:20:48 +00002981 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002982 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002983 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002985 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002987 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002988 ac_md_system=`echo $ac_sys_system |
2989 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2990 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002991 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002992 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002993
Guido van Rossum07397971997-04-29 21:49:50 +00002994 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002995 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002996 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002997 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002998 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002999 esac
3000fi
Guido van Rossum91922671997-10-09 20:24:13 +00003001
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003002# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3003# disable features if it is defined, without any means to access these
3004# features as extensions. For these systems, we skip the definition of
3005# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3006# some feature, make sure there is no alternative way to access this
3007# feature. Also, when using wildcards, make sure you have verified the
3008# need for not defining _XOPEN_SOURCE on all systems matching the
3009# wildcard, and that the wildcard does not include future systems
3010# (which may remove their limitations).
3011case $ac_sys_system/$ac_sys_release in
3012 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3013 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003014 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003015 # In addition, Stefan Krah confirms that issue #1244610 exists through
3016 # OpenBSD 4.6, but is fixed in 4.7.
3017 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003018 define_xopen_source=no
3019 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3020 # also defined. This can be overridden by defining _BSD_SOURCE
3021 # As this has a different meaning on Linux, only define it on OpenBSD
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003024
3025 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003026 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003027 # 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 Kloseb9621712010-04-24 17:59:49 +00003031$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003032
3033 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003034 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3035 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3036 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003037 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003038 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003039 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3040 # request to enable features supported by the standard as a request
3041 # to disable features not supported by the standard. The best way
3042 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3043 # entirely and define __EXTENSIONS__ instead.
3044 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003045 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003046 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3047 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003048 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003049 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003050 define_xopen_source=no;;
3051 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003052 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003053 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003054 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003055 # On FreeBSD 4, the math functions C89 does not cover are never defined
3056 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3057 FreeBSD/4.*)
3058 define_xopen_source=no;;
3059 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3060 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3061 # identifies itself as Darwin/7.*
3062 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3063 # disables platform specific features beyond repair.
3064 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3065 # has no effect, don't bother defining them
3066 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003067 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003068 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003069 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003070 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3071 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3072 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003073 AIX/4)
3074 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003075 AIX/5)
3076 if test `uname -r` -eq 1; then
3077 define_xopen_source=no
3078 fi
3079 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003080 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3081 # defining NI_NUMERICHOST.
3082 QNX/6.3.2)
3083 define_xopen_source=no
3084 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003085
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003086esac
3087
3088if test $define_xopen_source = yes
3089then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003090
Matthias Kloseb9621712010-04-24 17:59:49 +00003091$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003092
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003093
3094 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3095 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3096 # several APIs are not declared. Since this is also needed in some
3097 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003100
3101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003102
Matthias Kloseb9621712010-04-24 17:59:49 +00003103$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003104
3105
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003106fi
3107
Guido van Rossum91922671997-10-09 20:24:13 +00003108#
3109# SGI compilers allow the specification of the both the ABI and the
3110# ISA on the command line. Depending on the values of these switches,
3111# different and often incompatable code will be generated.
3112#
3113# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3114# thus supply support for various ABI/ISA combinations. The MACHDEP
3115# variable is also adjusted.
3116#
3117
3118if test ! -z "$SGI_ABI"
3119then
3120 CC="cc $SGI_ABI"
3121 LDFLAGS="$SGI_ABI $LDFLAGS"
3122 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3125$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003126
Jack Jansen6b08a402004-06-03 12:41:45 +00003127# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3128# it may influence the way we can build extensions, so distutils
3129# needs to check it
3130
Thomas Wouters477c8d52006-05-27 19:21:47 +00003131
Jack Jansen6b08a402004-06-03 12:41:45 +00003132CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003133EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003134
Matthias Kloseb9621712010-04-24 17:59:49 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3136$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003137ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3139$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003140
Guido van Rossum627b2d71993-12-24 10:39:16 +00003141# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003142
3143# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3144# for debug/optimization stuff. BASECFLAGS is for flags that are required
3145# just to get things to compile and link. Users are free to override OPT
3146# when running configure or make. The build should not break if they do.
3147# BASECFLAGS should generally not be messed with, however.
3148
3149# XXX shouldn't some/most/all of this code be merged with the stuff later
3150# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3152$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003155if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003156 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003157 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003158 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003159 without_gcc=yes;;
3160 yes) CC=gcc
3161 without_gcc=no;;
3162 *) CC=$withval
3163 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003164 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003165else
Martin v. Löwis11437992002-04-12 09:54:03 +00003166
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003167 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003168 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003169 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003170 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003171 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172fi
3173
Matthias Kloseb9621712010-04-24 17:59:49 +00003174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3175$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003176
Guido van Rossum8b131c51995-03-09 14:10:13 +00003177# If the user switches compilers, we can't believe the cache
3178if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3179then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003180 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003181(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003182fi
3183
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003184# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3185# when the compiler supports them, but we don't always want -O2, and
3186# we set -g later.
3187if test -z "$CFLAGS"; then
3188 CFLAGS=
3189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003190ac_ext=c
3191ac_cpp='$CPP $CPPFLAGS'
3192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3194ac_compiler_gnu=$ac_cv_c_compiler_gnu
3195if test -n "$ac_tool_prefix"; then
3196 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3197set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3199$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003200if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003201 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003202else
3203 if test -n "$CC"; then
3204 ac_cv_prog_CC="$CC" # Let the user override the test.
3205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3207for as_dir in $PATH
3208do
3209 IFS=$as_save_IFS
3210 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003211 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212 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 +00003213 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003214 $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 +00003215 break 2
3216 fi
3217done
Matthias Kloseb9621712010-04-24 17:59:49 +00003218 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003220
Jack Jansendd19cf82001-12-06 22:36:17 +00003221fi
3222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003223CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003224if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3226$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003227else
Matthias Kloseb9621712010-04-24 17:59:49 +00003228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3229$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003230fi
3231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232
Martin v. Löwis11437992002-04-12 09:54:03 +00003233fi
3234if test -z "$ac_cv_prog_CC"; then
3235 ac_ct_CC=$CC
3236 # Extract the first word of "gcc", so it can be a program name with args.
3237set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3239$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003240if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003241 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003242else
3243 if test -n "$ac_ct_CC"; then
3244 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3245else
3246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3247for as_dir in $PATH
3248do
3249 IFS=$as_save_IFS
3250 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003251 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252 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 +00003253 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003254 $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 +00003255 break 2
3256 fi
3257done
Matthias Kloseb9621712010-04-24 17:59:49 +00003258 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003260
3261fi
3262fi
3263ac_ct_CC=$ac_cv_prog_ac_ct_CC
3264if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3266$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003267else
Matthias Kloseb9621712010-04-24 17:59:49 +00003268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3269$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003270fi
3271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 if test "x$ac_ct_CC" = x; then
3273 CC=""
3274 else
3275 case $cross_compiling:$ac_tool_warned in
3276yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3278$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003279ac_tool_warned=yes ;;
3280esac
3281 CC=$ac_ct_CC
3282 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003283else
3284 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003285fi
3286
Jack Jansendd19cf82001-12-06 22:36:17 +00003287if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003288 if test -n "$ac_tool_prefix"; then
3289 # 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 +00003290set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3292$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003293if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003294 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003295else
3296 if test -n "$CC"; then
3297 ac_cv_prog_CC="$CC" # Let the user override the test.
3298else
Martin v. Löwis11437992002-04-12 09:54:03 +00003299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003304 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305 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 +00003306 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003307 $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 +00003308 break 2
3309 fi
3310done
Matthias Kloseb9621712010-04-24 17:59:49 +00003311 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003313
3314fi
3315fi
3316CC=$ac_cv_prog_CC
3317if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3319$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003320else
Matthias Kloseb9621712010-04-24 17:59:49 +00003321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3322$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003323fi
3324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003325
Martin v. Löwis11437992002-04-12 09:54:03 +00003326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003327fi
3328if test -z "$CC"; then
3329 # Extract the first word of "cc", so it can be a program name with args.
3330set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3332$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003333if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003334 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003335else
3336 if test -n "$CC"; then
3337 ac_cv_prog_CC="$CC" # Let the user override the test.
3338else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003339 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3341for as_dir in $PATH
3342do
3343 IFS=$as_save_IFS
3344 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003345 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003346 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 +00003347 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3348 ac_prog_rejected=yes
3349 continue
3350 fi
3351 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003352 $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 +00003353 break 2
3354 fi
3355done
Matthias Kloseb9621712010-04-24 17:59:49 +00003356 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003357IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003358
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359if test $ac_prog_rejected = yes; then
3360 # We found a bogon in the path, so make sure we never use it.
3361 set dummy $ac_cv_prog_CC
3362 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003363 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364 # We chose a different compiler from the bogus one.
3365 # However, it has the same basename, so the bogon will be chosen
3366 # first if we set CC to just the basename; use the full file name.
3367 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003368 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003369 fi
3370fi
3371fi
3372fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003373CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003374if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3376$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003377else
Matthias Kloseb9621712010-04-24 17:59:49 +00003378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3379$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003380fi
3381
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003382
Martin v. Löwis11437992002-04-12 09:54:03 +00003383fi
3384if test -z "$CC"; then
3385 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003386 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 do
3388 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3389set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3391$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003392if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003393 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003394else
3395 if test -n "$CC"; then
3396 ac_cv_prog_CC="$CC" # Let the user override the test.
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3399for as_dir in $PATH
3400do
3401 IFS=$as_save_IFS
3402 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003403 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003404 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 +00003405 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003406 $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 +00003407 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003408 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003409done
Matthias Kloseb9621712010-04-24 17:59:49 +00003410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003411IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003412
3413fi
3414fi
3415CC=$ac_cv_prog_CC
3416if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3418$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003419else
Matthias Kloseb9621712010-04-24 17:59:49 +00003420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3421$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003422fi
3423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003424
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 test -n "$CC" && break
3426 done
3427fi
3428if test -z "$CC"; then
3429 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003431do
3432 # Extract the first word of "$ac_prog", so it can be a program name with args.
3433set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3435$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003436if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003437 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003438else
3439 if test -n "$ac_ct_CC"; then
3440 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3441else
3442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3443for as_dir in $PATH
3444do
3445 IFS=$as_save_IFS
3446 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003447 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003448 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 +00003449 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003450 $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 +00003451 break 2
3452 fi
3453done
Matthias Kloseb9621712010-04-24 17:59:49 +00003454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003455IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003456
Martin v. Löwis11437992002-04-12 09:54:03 +00003457fi
3458fi
3459ac_ct_CC=$ac_cv_prog_ac_ct_CC
3460if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3462$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463else
Matthias Kloseb9621712010-04-24 17:59:49 +00003464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3465$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468
Martin v. Löwis11437992002-04-12 09:54:03 +00003469 test -n "$ac_ct_CC" && break
3470done
Michael W. Hudson54241132001-12-07 15:38:26 +00003471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003472 if test "x$ac_ct_CC" = x; then
3473 CC=""
3474 else
3475 case $cross_compiling:$ac_tool_warned in
3476yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003477{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3478$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479ac_tool_warned=yes ;;
3480esac
3481 CC=$ac_ct_CC
3482 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003483fi
3484
3485fi
3486
3487
Matthias Kloseb9621712010-04-24 17:59:49 +00003488test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003490as_fn_error $? "no acceptable C compiler found in \$PATH
3491See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003492
3493# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003494$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3495set X $ac_compile
3496ac_compiler=$2
3497for ac_option in --version -v -V -qversion; do
3498 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499case "(($ac_try" in
3500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3501 *) ac_try_echo=$ac_try;;
3502esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003503eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3504$as_echo "$ac_try_echo"; } >&5
3505 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003507 if test -s conftest.err; then
3508 sed '10a\
3509... rest of stderr output deleted ...
3510 10q' conftest.err >conftest.er1
3511 cat conftest.er1 >&5
3512 fi
3513 rm -f conftest.er1 conftest.err
3514 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3515 test $ac_status = 0; }
3516done
Martin v. Löwis11437992002-04-12 09:54:03 +00003517
Matthias Kloseb9621712010-04-24 17:59:49 +00003518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003519/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003520
Martin v. Löwis11437992002-04-12 09:54:03 +00003521int
3522main ()
3523{
3524
3525 ;
3526 return 0;
3527}
3528_ACEOF
3529ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003530ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003531# Try to create an executable without -o first, disregard a.out.
3532# It will help us diagnose broken compilers, and finding out an intuition
3533# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3535$as_echo_n "checking whether the C compiler works... " >&6; }
3536ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3537
3538# The possible output files:
3539ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541ac_rmfiles=
3542for ac_file in $ac_files
3543do
3544 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003546 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3547 esac
3548done
3549rm -f $ac_rmfiles
3550
Matthias Kloseb9621712010-04-24 17:59:49 +00003551if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552case "(($ac_try" in
3553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3554 *) ac_try_echo=$ac_try;;
3555esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003556eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3557$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3561 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3563# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3564# in a Makefile. We should not override ac_cv_exeext if it was cached,
3565# so that the user can short-circuit this test for compilers unknown to
3566# Autoconf.
3567for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003568do
3569 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003571 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003572 ;;
3573 [ab].out )
3574 # We found the default executable, but exeext='' is most
3575 # certainly right.
3576 break;;
3577 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 then :; else
3580 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3581 fi
3582 # We set ac_cv_exeext here because the later test for it is not
3583 # safe: cross compilers may not add the suffix if given an `-o'
3584 # argument, so we may need to know it at that point already.
3585 # Even if this section looks crufty: it has the advantage of
3586 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003587 break;;
3588 * )
3589 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 esac
3591done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592test "$ac_cv_exeext" = no && ac_cv_exeext=
3593
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003594else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003595 ac_file=''
3596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003597if test -z "$ac_file"; then :
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3599$as_echo "no" >&6; }
3600$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003601sed 's/^/| /' conftest.$ac_ext >&5
3602
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003605as_fn_error 77 "C compiler cannot create executables
3606See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003607else
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3609$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3612$as_echo_n "checking for C compiler default output file name... " >&6; }
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3614$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003615ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003616
Matthias Kloseb9621712010-04-24 17:59:49 +00003617rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003618ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3620$as_echo_n "checking for suffix of executables... " >&6; }
3621if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622case "(($ac_try" in
3623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3624 *) ac_try_echo=$ac_try;;
3625esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3627$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3631 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003632 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3633# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3634# work properly (i.e., refer to `conftest.exe'), while it won't with
3635# `rm'.
3636for ac_file in conftest.exe conftest conftest.*; do
3637 test -f "$ac_file" || continue
3638 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003640 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3641 break;;
3642 * ) break;;
3643 esac
3644done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003645else
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003648as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3649See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003651rm -f conftest conftest$ac_cv_exeext
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3653$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003654
3655rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003656EXEEXT=$ac_cv_exeext
3657ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3659/* end confdefs.h. */
3660#include <stdio.h>
3661int
3662main ()
3663{
3664FILE *f = fopen ("conftest.out", "w");
3665 return ferror (f) || fclose (f) != 0;
3666
3667 ;
3668 return 0;
3669}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003671ac_clean_files="$ac_clean_files conftest.out"
3672# Check that the compiler produces executables we can run. If not, either
3673# the compiler is broken, or we cross compile.
3674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3675$as_echo_n "checking whether we are cross compiling... " >&6; }
3676if test "$cross_compiling" != yes; then
3677 { { ac_try="$ac_link"
3678case "(($ac_try" in
3679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3680 *) ac_try_echo=$ac_try;;
3681esac
3682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3683$as_echo "$ac_try_echo"; } >&5
3684 (eval "$ac_link") 2>&5
3685 ac_status=$?
3686 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3687 test $ac_status = 0; }
3688 if { ac_try='./conftest$ac_cv_exeext'
3689 { { case "(($ac_try" in
3690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3691 *) ac_try_echo=$ac_try;;
3692esac
3693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3694$as_echo "$ac_try_echo"; } >&5
3695 (eval "$ac_try") 2>&5
3696 ac_status=$?
3697 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3698 test $ac_status = 0; }; }; then
3699 cross_compiling=no
3700 else
3701 if test "$cross_compiling" = maybe; then
3702 cross_compiling=yes
3703 else
3704 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003706as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003707If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003708See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 fi
3710 fi
3711fi
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3713$as_echo "$cross_compiling" >&6; }
3714
3715rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3716ac_clean_files=$ac_clean_files_save
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3718$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003719if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo_n "(cached) " >&6
3721else
3722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003723/* end confdefs.h. */
3724
3725int
3726main ()
3727{
3728
3729 ;
3730 return 0;
3731}
3732_ACEOF
3733rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003734if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735case "(($ac_try" in
3736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3737 *) ac_try_echo=$ac_try;;
3738esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003739eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3740$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3744 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745 for ac_file in conftest.o conftest.obj conftest.*; do
3746 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3750 break;;
3751 esac
3752done
3753else
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003755sed 's/^/| /' conftest.$ac_ext >&5
3756
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003759as_fn_error $? "cannot compute suffix of object files: cannot compile
3760See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003762rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3765$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003766OBJEXT=$ac_cv_objext
3767ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3769$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003770if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003772else
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776int
3777main ()
3778{
3779#ifndef __GNUC__
3780 choke me
3781#endif
3782
3783 ;
3784 return 0;
3785}
3786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_compiler_gnu=yes
3789else
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003793ac_cv_c_compiler_gnu=$ac_compiler_gnu
3794
3795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3797$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3798if test $ac_compiler_gnu = yes; then
3799 GCC=yes
3800else
3801 GCC=
3802fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003803ac_test_CFLAGS=${CFLAGS+set}
3804ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3806$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003807if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003809else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 ac_save_c_werror_flag=$ac_c_werror_flag
3811 ac_c_werror_flag=yes
3812 ac_cv_prog_cc_g=no
3813 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817int
3818main ()
3819{
3820
3821 ;
3822 return 0;
3823}
3824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003825if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003826 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827else
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 CFLAGS=""
3829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830/* end confdefs.h. */
3831
3832int
3833main ()
3834{
3835
3836 ;
3837 return 0;
3838}
3839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003840if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841
Matthias Kloseb9621712010-04-24 17:59:49 +00003842else
3843 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846/* end confdefs.h. */
3847
3848int
3849main ()
3850{
3851
3852 ;
3853 return 0;
3854}
3855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003856if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3864 ac_c_werror_flag=$ac_save_c_werror_flag
3865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3867$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003868if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003870elif test $ac_cv_prog_cc_g = yes; then
3871 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003872 CFLAGS="-g -O2"
3873 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003874 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003875 fi
3876else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003877 if test "$GCC" = yes; then
3878 CFLAGS="-O2"
3879 else
3880 CFLAGS=
3881 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3884$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003885if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003887else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003889ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003891/* end confdefs.h. */
3892#include <stdarg.h>
3893#include <stdio.h>
3894#include <sys/types.h>
3895#include <sys/stat.h>
3896/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3897struct buf { int x; };
3898FILE * (*rcsopen) (struct buf *, struct stat *, int);
3899static char *e (p, i)
3900 char **p;
3901 int i;
3902{
3903 return p[i];
3904}
3905static char *f (char * (*g) (char **, int), char **p, ...)
3906{
3907 char *s;
3908 va_list v;
3909 va_start (v,p);
3910 s = g (p, va_arg (v,int));
3911 va_end (v);
3912 return s;
3913}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003914
3915/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3916 function prototypes and stuff, but not '\xHH' hex character constants.
3917 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003919 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3920 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003922int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3925 inside strings and character constants. */
3926#define FOO(x) 'x'
3927int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3928
Skip Montanaro6dead952003-09-25 14:50:04 +00003929int test (int i, double x);
3930struct s1 {int (*f) (int a);};
3931struct s2 {int (*f) (double a);};
3932int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3933int argc;
3934char **argv;
3935int
3936main ()
3937{
3938return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3939 ;
3940 return 0;
3941}
3942_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3944 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003945do
3946 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950rm -f core conftest.err conftest.$ac_objext
3951 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003952done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003954CC=$ac_save_CC
3955
3956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957# AC_CACHE_VAL
3958case "x$ac_cv_prog_cc_c89" in
3959 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3961$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3964$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003965 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3968$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003969esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003970if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003971
Matthias Kloseb9621712010-04-24 17:59:49 +00003972fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003973
Martin v. Löwis11437992002-04-12 09:54:03 +00003974ac_ext=c
3975ac_cpp='$CPP $CPPFLAGS'
3976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3978ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003979
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003980
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003981
3982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3984$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003987if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003989
3990 case $withval in
3991 no) with_cxx_main=no
3992 MAINCC='$(CC)';;
3993 yes) with_cxx_main=yes
3994 MAINCC='$(CXX)';;
3995 *) with_cxx_main=yes
3996 MAINCC=$withval
3997 if test -z "$CXX"
3998 then
3999 CXX=$withval
4000 fi;;
4001 esac
4002else
4003
4004 with_cxx_main=no
4005 MAINCC='$(CC)'
4006
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004007fi
4008
Matthias Kloseb9621712010-04-24 17:59:49 +00004009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4010$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004011
4012preset_cxx="$CXX"
4013if test -z "$CXX"
4014then
4015 case "$CC" in
4016 gcc) # Extract the first word of "g++", so it can be a program name with args.
4017set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4019$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004020if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004022else
4023 case $CXX in
4024 [\\/]* | ?:[\\/]*)
4025 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4026 ;;
4027 *)
4028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4029for as_dir in notfound
4030do
4031 IFS=$as_save_IFS
4032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004033 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004034 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004035 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004037 break 2
4038 fi
4039done
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004042
4043 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4044 ;;
4045esac
4046fi
4047CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004048if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4050$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004051else
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4053$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004056 ;;
4057 cc) # Extract the first word of "c++", so it can be a program name with args.
4058set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4060$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004061if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004063else
4064 case $CXX in
4065 [\\/]* | ?:[\\/]*)
4066 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4067 ;;
4068 *)
4069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4070for as_dir in notfound
4071do
4072 IFS=$as_save_IFS
4073 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004076 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004078 break 2
4079 fi
4080done
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004083
4084 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4085 ;;
4086esac
4087fi
4088CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004089if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4091$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4094$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004096
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004097 ;;
4098 esac
4099 if test "$CXX" = "notfound"
4100 then
4101 CXX=""
4102 fi
4103fi
4104if test -z "$CXX"
4105then
4106 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4107do
4108 # Extract the first word of "$ac_prog", so it can be a program name with args.
4109set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4111$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004112if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004114else
4115 if test -n "$CXX"; then
4116 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004125 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004127 break 2
4128 fi
4129done
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004132
4133fi
4134fi
4135CXX=$ac_cv_prog_CXX
4136if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4138$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004139else
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004142fi
4143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004145 test -n "$CXX" && break
4146done
4147test -n "$CXX" || CXX="notfound"
4148
4149 if test "$CXX" = "notfound"
4150 then
4151 CXX=""
4152 fi
4153fi
4154if test "$preset_cxx" != "$CXX"
4155then
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004157
4158 By default, distutils will build C++ extension modules with \"$CXX\".
4159 If this is not intended, then set CXX on the configure command line.
4160 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004161$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004162
4163 By default, distutils will build C++ extension modules with \"$CXX\".
4164 If this is not intended, then set CXX on the configure command line.
4165 " >&2;}
4166fi
4167
4168
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004169# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004170
4171ac_ext=c
4172ac_cpp='$CPP $CPPFLAGS'
4173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4175ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4177$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004178# On Suns, sometimes $CPP names a directory.
4179if test -n "$CPP" && test -d "$CPP"; then
4180 CPP=
4181fi
4182if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004183 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004185else
Martin v. Löwis11437992002-04-12 09:54:03 +00004186 # Double quotes because CPP needs to be expanded
4187 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4188 do
4189 ac_preproc_ok=false
4190for ac_c_preproc_warn_flag in '' yes
4191do
4192 # Use a header file that comes with gcc, so configuring glibc
4193 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004194 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4195 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004196 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004197 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004199/* end confdefs.h. */
4200#ifdef __STDC__
4201# include <limits.h>
4202#else
4203# include <assert.h>
4204#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004205 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004208
Matthias Kloseb9621712010-04-24 17:59:49 +00004209else
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 # Broken: fails on valid input.
4211continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004212fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004213rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004216 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004219#include <ac_nonexistent.h>
4220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004221if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004222 # Broken: success on invalid input.
4223continue
4224else
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 # Passes both tests.
4226ac_preproc_ok=:
4227break
4228fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004229rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004230
4231done
4232# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004233rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 break
4236fi
4237
4238 done
4239 ac_cv_prog_CPP=$CPP
4240
4241fi
4242 CPP=$ac_cv_prog_CPP
4243else
4244 ac_cv_prog_CPP=$CPP
4245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4247$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004248ac_preproc_ok=false
4249for ac_c_preproc_warn_flag in '' yes
4250do
4251 # Use a header file that comes with gcc, so configuring glibc
4252 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004253 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4254 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # On the NeXT, cc -E runs the code through the compiler's parser,
4256 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004258/* end confdefs.h. */
4259#ifdef __STDC__
4260# include <limits.h>
4261#else
4262# include <assert.h>
4263#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004264 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004267
Matthias Kloseb9621712010-04-24 17:59:49 +00004268else
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Broken: fails on valid input.
4270continue
4271fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004272rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004278#include <ac_nonexistent.h>
4279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004280if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 # Broken: success on invalid input.
4282continue
4283else
Martin v. Löwis11437992002-04-12 09:54:03 +00004284 # Passes both tests.
4285ac_preproc_ok=:
4286break
4287fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004288rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004289
4290done
4291# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004292rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004293if $ac_preproc_ok; then :
4294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295else
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004298as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4299See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004300fi
4301
4302ac_ext=c
4303ac_cpp='$CPP $CPPFLAGS'
4304ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4305ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4306ac_compiler_gnu=$ac_cv_c_compiler_gnu
4307
4308
Matthias Kloseb9621712010-04-24 17:59:49 +00004309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4310$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004311if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004313else
Matthias Kloseb9621712010-04-24 17:59:49 +00004314 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 # Loop through the user's path and test for each of PROGNAME-LIST
4317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4319do
4320 IFS=$as_save_IFS
4321 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 for ac_prog in grep ggrep; do
4323 for ac_exec_ext in '' $ac_executable_extensions; do
4324 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4325 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4326# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 # Check for GNU $ac_path_GREP
4328case `"$ac_path_GREP" --version 2>&1` in
4329*GNU*)
4330 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4331*)
4332 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 while :
4335 do
4336 cat "conftest.in" "conftest.in" >"conftest.tmp"
4337 mv "conftest.tmp" "conftest.in"
4338 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4341 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4344 # Best one so far, save it but keep looking for a better one
4345 ac_cv_path_GREP="$ac_path_GREP"
4346 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004347 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 # 10*(2^10) chars as input seems more than enough
4349 test $ac_count -gt 10 && break
4350 done
4351 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4352esac
4353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354 $ac_path_GREP_found && break 3
4355 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004360 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004361 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362else
4363 ac_cv_path_GREP=$GREP
4364fi
4365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4368$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369 GREP="$ac_cv_path_GREP"
4370
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4373$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004374if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376else
4377 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4378 then ac_cv_path_EGREP="$GREP -E"
4379 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004382 # Loop through the user's path and test for each of PROGNAME-LIST
4383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4385do
4386 IFS=$as_save_IFS
4387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 for ac_prog in egrep; do
4389 for ac_exec_ext in '' $ac_executable_extensions; do
4390 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4391 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4392# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393 # Check for GNU $ac_path_EGREP
4394case `"$ac_path_EGREP" --version 2>&1` in
4395*GNU*)
4396 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4397*)
4398 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004399 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 while :
4401 do
4402 cat "conftest.in" "conftest.in" >"conftest.tmp"
4403 mv "conftest.tmp" "conftest.in"
4404 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4407 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004409 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4410 # Best one so far, save it but keep looking for a better one
4411 ac_cv_path_EGREP="$ac_path_EGREP"
4412 ac_path_EGREP_max=$ac_count
4413 fi
4414 # 10*(2^10) chars as input seems more than enough
4415 test $ac_count -gt 10 && break
4416 done
4417 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4418esac
4419
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 $ac_path_EGREP_found && break 3
4421 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004422 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004424IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004425 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004426 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004427 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004428else
4429 ac_cv_path_EGREP=$EGREP
4430fi
4431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004432 fi
4433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4435$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004437
4438
Matthias Kloseb9621712010-04-24 17:59:49 +00004439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4440$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004441if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004442 $as_echo_n "(cached) " >&6
4443else
4444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004445/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004446#include <stdlib.h>
4447#include <stdarg.h>
4448#include <string.h>
4449#include <float.h>
4450
4451int
4452main ()
4453{
4454
4455 ;
4456 return 0;
4457}
4458_ACEOF
4459if ac_fn_c_try_compile "$LINENO"; then :
4460 ac_cv_header_stdc=yes
4461else
4462 ac_cv_header_stdc=no
4463fi
4464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4465
4466if test $ac_cv_header_stdc = yes; then
4467 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469/* end confdefs.h. */
4470#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004471
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004472_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004474 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004475
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004476else
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004478fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004479rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004480
Matthias Kloseb9621712010-04-24 17:59:49 +00004481fi
4482
4483if test $ac_cv_header_stdc = yes; then
4484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486/* end confdefs.h. */
4487#include <stdlib.h>
4488
4489_ACEOF
4490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4491 $EGREP "free" >/dev/null 2>&1; then :
4492
4493else
4494 ac_cv_header_stdc=no
4495fi
4496rm -f conftest*
4497
4498fi
4499
4500if test $ac_cv_header_stdc = yes; then
4501 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4502 if test "$cross_compiling" = yes; then :
4503 :
4504else
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506/* end confdefs.h. */
4507#include <ctype.h>
4508#include <stdlib.h>
4509#if ((' ' & 0x0FF) == 0x020)
4510# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4511# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4512#else
4513# define ISLOWER(c) \
4514 (('a' <= (c) && (c) <= 'i') \
4515 || ('j' <= (c) && (c) <= 'r') \
4516 || ('s' <= (c) && (c) <= 'z'))
4517# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4518#endif
4519
4520#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4521int
4522main ()
4523{
4524 int i;
4525 for (i = 0; i < 256; i++)
4526 if (XOR (islower (i), ISLOWER (i))
4527 || toupper (i) != TOUPPER (i))
4528 return 2;
4529 return 0;
4530}
4531_ACEOF
4532if ac_fn_c_try_run "$LINENO"; then :
4533
4534else
4535 ac_cv_header_stdc=no
4536fi
4537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4538 conftest.$ac_objext conftest.beam conftest.$ac_ext
4539fi
4540
4541fi
4542fi
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4544$as_echo "$ac_cv_header_stdc" >&6; }
4545if test $ac_cv_header_stdc = yes; then
4546
4547$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4548
4549fi
4550
4551# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4552for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4553 inttypes.h stdint.h unistd.h
4554do :
4555 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4556ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4557"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004558if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 cat >>confdefs.h <<_ACEOF
4560#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4561_ACEOF
4562
4563fi
4564
4565done
4566
4567
4568
4569 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004570if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004571 MINIX=yes
4572else
4573 MINIX=
4574fi
4575
4576
4577 if test "$MINIX" = yes; then
4578
4579$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4580
4581
4582$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4583
4584
4585$as_echo "#define _MINIX 1" >>confdefs.h
4586
4587 fi
4588
4589
4590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4591$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004592if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004593 $as_echo_n "(cached) " >&6
4594else
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597
4598# define __EXTENSIONS__ 1
4599 $ac_includes_default
4600int
4601main ()
4602{
4603
4604 ;
4605 return 0;
4606}
4607_ACEOF
4608if ac_fn_c_try_compile "$LINENO"; then :
4609 ac_cv_safe_to_define___extensions__=yes
4610else
4611 ac_cv_safe_to_define___extensions__=no
4612fi
4613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4614fi
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4616$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4617 test $ac_cv_safe_to_define___extensions__ = yes &&
4618 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4619
4620 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4621
4622 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4623
4624 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4625
4626 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4627
4628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004630# Check for unsupported systems
4631case $ac_sys_system/$ac_sys_release in
4632atheos*|Linux*/1*)
4633 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4634 echo See README for details.
4635 exit 1;;
4636esac
4637
4638
Matthias Kloseb9621712010-04-24 17:59:49 +00004639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4640$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004641
4642# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004643if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004644 withval=$with_suffix;
4645 case $withval in
4646 no) EXEEXT=;;
4647 yes) EXEEXT=.exe;;
4648 *) EXEEXT=$withval;;
4649 esac
4650fi
4651
Matthias Kloseb9621712010-04-24 17:59:49 +00004652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4653$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004654
4655# Test whether we're running on a non-case-sensitive system, in which
4656# case we give a warning if no ext is given
4657
Matthias Kloseb9621712010-04-24 17:59:49 +00004658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4659$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004660if test ! -d CaseSensitiveTestDir; then
4661mkdir CaseSensitiveTestDir
4662fi
4663
4664if test -d casesensitivetestdir
4665then
Matthias Kloseb9621712010-04-24 17:59:49 +00004666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4667$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004668 BUILDEXEEXT=.exe
4669else
Matthias Kloseb9621712010-04-24 17:59:49 +00004670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004672 BUILDEXEEXT=$EXEEXT
4673fi
4674rmdir CaseSensitiveTestDir
4675
4676case $MACHDEP in
4677bsdos*)
4678 case $CC in
4679 gcc) CC="$CC -D_HAVE_BSDI";;
4680 esac;;
4681esac
4682
4683case $ac_sys_system in
4684hp*|HP*)
4685 case $CC in
4686 cc|*/cc) CC="$CC -Ae";;
4687 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004688esac
4689
4690
4691
Matthias Kloseb9621712010-04-24 17:59:49 +00004692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4693$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004694if test -z "$LIBRARY"
4695then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004696 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4699$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004700
4701# LDLIBRARY is the name of the library to link against (as opposed to the
4702# name of the library into which to insert object files). BLDLIBRARY is also
4703# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4704# is blank as the main program is not linked directly against LDLIBRARY.
4705# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4706# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4707# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4708# DLLLIBRARY is the shared (i.e., DLL) library.
4709#
4710# RUNSHARED is used to run shared python without installed libraries
4711#
4712# INSTSONAME is the name of the shared library that will be use to install
4713# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004714#
4715# LDVERSION is the shared library version number, normally the Python version
4716# with the ABI build flags appended.
4717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718
4719
4720
4721
4722
4723
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004725LDLIBRARY="$LIBRARY"
4726BLDLIBRARY='$(LDLIBRARY)'
4727INSTSONAME='$(LDLIBRARY)'
4728DLLLIBRARY=''
4729LDLIBRARYDIR=''
4730RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004731LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004732
4733# LINKCC is the command that links the python executable -- default is $(CC).
4734# If CXX is set, and if it is needed to link a main function that was
4735# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4736# python might then depend on the C++ runtime
4737# This is altered for AIX in order to build the export list before
4738# linking.
4739
Matthias Kloseb9621712010-04-24 17:59:49 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4741$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004742if test -z "$LINKCC"
4743then
4744 LINKCC='$(PURIFY) $(MAINCC)'
4745 case $ac_sys_system in
4746 AIX*)
4747 exp_extra="\"\""
4748 if test $ac_sys_release -ge 5 -o \
4749 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4750 exp_extra="."
4751 fi
4752 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753 QNX*)
4754 # qcc must be used because the other compilers do not
4755 # support -N.
4756 LINKCC=qcc;;
4757 esac
4758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4760$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004761
4762# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4763# make sure we default having it set to "no": this is used by
4764# distutils.unixccompiler to know if it should add --enable-new-dtags
4765# to linker command lines, and failing to detect GNU ld simply results
4766# in the same bahaviour as before.
4767
Matthias Kloseb9621712010-04-24 17:59:49 +00004768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4769$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004770ac_prog=ld
4771if test "$GCC" = yes; then
4772 ac_prog=`$CC -print-prog-name=ld`
4773fi
4774case `"$ac_prog" -V 2>&1 < /dev/null` in
4775 *GNU*)
4776 GNULD=yes;;
4777 *)
4778 GNULD=no;;
4779esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4781$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004782
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4784$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004785if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004786 $as_echo_n "(cached) " >&6
4787else
4788 ac_cv_c_inline=no
4789for ac_kw in inline __inline__ __inline; do
4790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4791/* end confdefs.h. */
4792#ifndef __cplusplus
4793typedef int foo_t;
4794static $ac_kw foo_t static_foo () {return 0; }
4795$ac_kw foo_t foo () {return 0; }
4796#endif
4797
4798_ACEOF
4799if ac_fn_c_try_compile "$LINENO"; then :
4800 ac_cv_c_inline=$ac_kw
4801fi
4802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4803 test "$ac_cv_c_inline" != no && break
4804done
4805
4806fi
4807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4808$as_echo "$ac_cv_c_inline" >&6; }
4809
4810case $ac_cv_c_inline in
4811 inline | yes) ;;
4812 *)
4813 case $ac_cv_c_inline in
4814 no) ac_val=;;
4815 *) ac_val=$ac_cv_c_inline;;
4816 esac
4817 cat >>confdefs.h <<_ACEOF
4818#ifndef __cplusplus
4819#define inline $ac_val
4820#endif
4821_ACEOF
4822 ;;
4823esac
4824
4825if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004826
4827$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004828
4829
4830fi
4831
4832
Matthias Kloseb9621712010-04-24 17:59:49 +00004833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4834$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004835# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004836if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837 enableval=$enable_shared;
4838fi
4839
4840
4841if test -z "$enable_shared"
4842then
4843 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004844 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845 enable_shared="yes";;
4846 *)
4847 enable_shared="no";;
4848 esac
4849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4851$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004852
Matthias Kloseb9621712010-04-24 17:59:49 +00004853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4854$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004855# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004856if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857 enableval=$enable_profiling; ac_save_cc="$CC"
4858 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004859 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004860 ac_enable_profiling="no"
4861else
Matthias Kloseb9621712010-04-24 17:59:49 +00004862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004863/* end confdefs.h. */
4864int main() { return 0; }
4865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004866if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 ac_enable_profiling="yes"
4868else
Matthias Kloseb9621712010-04-24 17:59:49 +00004869 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004873fi
4874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875 CC="$ac_save_cc"
4876fi
4877
Matthias Kloseb9621712010-04-24 17:59:49 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4879$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004880
4881case "$ac_enable_profiling" in
4882 "yes")
4883 BASECFLAGS="-pg $BASECFLAGS"
4884 LDFLAGS="-pg $LDFLAGS"
4885 ;;
4886esac
4887
Matthias Kloseb9621712010-04-24 17:59:49 +00004888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4889$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890
4891# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4892# library that we build, but we do not want to link against it (we
4893# will find it with a -framework option). For this reason there is an
4894# extra variable BLDLIBRARY against which Python and the extension
4895# modules are linked, BLDLIBRARY. This is normally the same as
4896# LDLIBRARY, but empty for MacOSX framework builds.
4897if test "$enable_framework"
4898then
4899 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4900 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4901 BLDLIBRARY=''
4902else
4903 BLDLIBRARY='$(LDLIBRARY)'
4904fi
4905
4906# Other platforms follow
4907if test $enable_shared = "yes"; then
4908
Matthias Kloseb9621712010-04-24 17:59:49 +00004909$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910
4911 case $ac_sys_system in
4912 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004913 LDLIBRARY='libpython$(LDVERSION).dll.a'
4914 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004915 ;;
4916 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004917 LDLIBRARY='libpython$(LDVERSION).so'
4918 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004919 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4920 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004921 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004922 then
4923 PY3LIBRARY=libpython3.so
4924 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 ;;
4926 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004927 LDLIBRARY='libpython$(LDVERSION).so'
4928 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004929 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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004936 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004937 then
4938 PY3LIBRARY=libpython3.so
4939 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940 ;;
4941 hp*|HP*)
4942 case `uname -m` in
4943 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004944 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945 ;;
4946 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004947 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004948 ;;
4949 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004950 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004951 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4952 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004954 LDLIBRARY='libpython$(LDVERSION).dylib'
4955 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4957 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004958 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004959 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004960 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4961 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004962
4963 esac
4964else # shared is disabled
4965 case $ac_sys_system in
4966 CYGWIN*)
4967 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004968 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004969 ;;
4970 esac
4971fi
4972
Matthias Kloseb9621712010-04-24 17:59:49 +00004973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4974$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975
4976if test -n "$ac_tool_prefix"; then
4977 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4978set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4980$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004981if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983else
4984 if test -n "$RANLIB"; then
4985 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4986else
4987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4988for as_dir in $PATH
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004993 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4994 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 break 2
4997 fi
4998done
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005000IFS=$as_save_IFS
5001
5002fi
5003fi
5004RANLIB=$ac_cv_prog_RANLIB
5005if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5007$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005008else
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005011fi
5012
5013
5014fi
5015if test -z "$ac_cv_prog_RANLIB"; then
5016 ac_ct_RANLIB=$RANLIB
5017 # Extract the first word of "ranlib", so it can be a program name with args.
5018set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5020$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005021if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023else
5024 if test -n "$ac_ct_RANLIB"; then
5025 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5026else
5027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in $PATH
5029do
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005032 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5034 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005036 break 2
5037 fi
5038done
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005040IFS=$as_save_IFS
5041
5042fi
5043fi
5044ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5045if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5047$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005048else
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5050$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005051fi
5052
5053 if test "x$ac_ct_RANLIB" = x; then
5054 RANLIB=":"
5055 else
5056 case $cross_compiling:$ac_tool_warned in
5057yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060ac_tool_warned=yes ;;
5061esac
5062 RANLIB=$ac_ct_RANLIB
5063 fi
5064else
5065 RANLIB="$ac_cv_prog_RANLIB"
5066fi
5067
5068
5069for ac_prog in ar aal
5070do
5071 # Extract the first word of "$ac_prog", so it can be a program name with args.
5072set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005075if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005077else
5078 if test -n "$AR"; then
5079 ac_cv_prog_AR="$AR" # Let the user override the test.
5080else
5081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082for as_dir in $PATH
5083do
5084 IFS=$as_save_IFS
5085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5088 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090 break 2
5091 fi
5092done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005094IFS=$as_save_IFS
5095
5096fi
5097fi
5098AR=$ac_cv_prog_AR
5099if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5101$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005102else
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5104$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005105fi
5106
5107
5108 test -n "$AR" && break
5109done
5110test -n "$AR" || AR="ar"
5111
5112
5113# tweak ARFLAGS only if the user didn't set it on the command line
5114
5115if test -z "$ARFLAGS"
5116then
5117 ARFLAGS="rc"
5118fi
5119
5120
Georg Brandl1ca2e792011-03-05 20:51:24 +01005121
5122
5123# Extract the first word of "hg", so it can be a program name with args.
5124set dummy hg; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_prog_HAS_HG+:} false; then :
5128 $as_echo_n "(cached) " >&6
5129else
5130 if test -n "$HAS_HG"; then
5131 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5132else
5133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136 IFS=$as_save_IFS
5137 test -z "$as_dir" && as_dir=.
5138 for ac_exec_ext in '' $ac_executable_extensions; do
5139 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5140 ac_cv_prog_HAS_HG="found"
5141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142 break 2
5143 fi
5144done
5145 done
5146IFS=$as_save_IFS
5147
5148 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5149fi
5150fi
5151HAS_HG=$ac_cv_prog_HAS_HG
5152if test -n "$HAS_HG"; then
5153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5154$as_echo "$HAS_HG" >&6; }
5155else
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161if test $HAS_HG = found
5162then
5163 HGVERSION="hg id -i \$(srcdir)"
5164 HGTAG="hg id -t \$(srcdir)"
5165 HGBRANCH="hg id -b \$(srcdir)"
5166else
5167 HGVERSION=""
5168 HGTAG=""
5169 HGBRANCH=""
5170fi
5171
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005172case $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
Martin v. Löwis9b142aa2011-02-05 20:26:52 +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 Vassalotti302825b2009-07-17 07:49:53 +00005195done
5196if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005197 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 Kloseb9621712010-04-24 17:59:49 +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 Vassalotti302825b2009-07-17 07:49:53 +00005225if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005226if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005227 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 Kloseb9621712010-04-24 17:59:49 +00005234 # Account for people who put trailing slashes in PATH elements.
5235case $as_dir/ in #((
5236 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005238 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 Kloseb9621712010-04-24 17:59:49 +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 Vassalotti302825b2009-07-17 07:49:53 +00005268 fi
5269 fi
5270 done
5271 done
5272 ;;
5273esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005274
5275 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005276IFS=$as_save_IFS
5277
Matthias Kloseb9621712010-04-24 17:59:49 +00005278rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 Kloseb9621712010-04-24 17:59:49 +00005291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5292$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308 *) LN=ln;;
5309 esac
5310fi
5311
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005312# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005313
5314ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005315
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5318$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319
5320# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005321if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 withval=$with_pydebug;
5323if test "$withval" != no
5324then
5325
Matthias Kloseb9621712010-04-24 17:59:49 +00005326$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327
Matthias Kloseb9621712010-04-24 17:59:49 +00005328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5329$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005331 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005332else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334fi
5335else
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5337$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338fi
5339
5340
5341# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5342# merged with this chunk of code?
5343
5344# Optimizer/debugger flags
5345# ------------------------
5346# (The following bit of code is complicated enough - please keep things
5347# indented properly. Just pretend you're editing Python code. ;-)
5348
5349# There are two parallel sets of case statements below, one that checks to
5350# see if OPT was set and one that does BASECFLAGS setting based upon
5351# compiler and platform. BASECFLAGS tweaks need to be made even if the
5352# user set OPT.
5353
5354# tweak OPT based on compiler and platform, only if the user didn't set
5355# it on the command line
5356
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005357if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358then
5359 case $GCC in
5360 yes)
5361 if test "$CC" != 'g++' ; then
5362 STRICT_PROTO="-Wstrict-prototypes"
5363 fi
5364 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5365 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5366 WRAP="-fwrapv"
5367 fi
5368 case $ac_cv_prog_cc_g in
5369 yes)
5370 if test "$Py_DEBUG" = 'true' ; then
5371 # Optimization messes up debuggers, so turn it off for
5372 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005373 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005374 else
5375 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5376 fi
5377 ;;
5378 *)
5379 OPT="-O3 -Wall $STRICT_PROTO"
5380 ;;
5381 esac
5382 case $ac_sys_system in
5383 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5384 ;;
5385 esac
5386 ;;
5387
5388 *)
5389 OPT="-O"
5390 ;;
5391 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005392fi
5393
5394
5395
5396# The -arch flags for universal builds on OSX
5397UNIVERSAL_ARCH_FLAGS=
5398
5399
5400# tweak BASECFLAGS based on compiler and platform
5401case $GCC in
5402yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005403 # Python doesn't violate C99 aliasing rules, but older versions of
5404 # GCC produce warnings for legal Python code. Enable
5405 # -fno-strict-aliasing on versions of GCC that support but produce
5406 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5408$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 ac_save_cc="$CC"
5410 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005411 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005412 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005413 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005414else
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005417
Matthias Kloseb159a552010-04-25 21:00:44 +00005418
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005419int
5420main ()
5421{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005422
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005423 ;
5424 return 0;
5425}
Matthias Kloseb159a552010-04-25 21:00:44 +00005426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005428if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005429
5430 CC="$ac_save_cc -fstrict-aliasing"
5431 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433/* end confdefs.h. */
5434
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005435 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005436int
5437main ()
5438{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005439double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005440 ;
5441 return 0;
5442}
Matthias Kloseb159a552010-04-25 21:00:44 +00005443
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005445if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005446
5447 ac_cv_no_strict_aliasing=no
5448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449else
Matthias Kloseb159a552010-04-25 21:00:44 +00005450
5451 ac_cv_no_strict_aliasing=yes
5452
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005453fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005455
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005456else
Matthias Kloseb159a552010-04-25 21:00:44 +00005457
5458 ac_cv_no_strict_aliasing=no
5459
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005462fi
5463
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005464 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5467$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005468 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469 then
5470 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5471 fi
5472
5473 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5474 # support. Without this, treatment of subnormals doesn't follow
5475 # the standard.
5476 case $ac_sys_machine in
5477 alpha*)
5478 BASECFLAGS="$BASECFLAGS -mieee"
5479 ;;
5480 esac
5481
5482 case $ac_sys_system in
5483 SCO_SV*)
5484 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5485 ;;
5486 # is there any other compiler on Darwin besides gcc?
5487 Darwin*)
5488 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5489 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005490 if test "${CC}" = gcc
5491 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5493$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005494 case "${UNIVERSALSDK}" in
5495 */MacOSX10.4u.sdk)
5496 # Build using 10.4 SDK, force usage of gcc when the
5497 # compiler is gcc, otherwise the user will get very
5498 # confusing error messages when building on OSX 10.6
5499 CC=gcc-4.0
5500 CPP=cpp-4.0
5501 ;;
5502 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5504$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005505 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506
5507
5508 if test "${enable_universalsdk}"; then
5509 UNIVERSAL_ARCH_FLAGS=""
5510 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5511 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5512 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005513 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5515 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005516 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005517 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518
5519 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5520 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005521 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005522 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005523
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005524 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5525 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005526 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005527 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005528
5529 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5530 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005531 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005532 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005533
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005535 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536
5537 fi
5538
5539
Ronald Oussoren666028b2010-04-18 19:07:43 +00005540 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5541 if test "${UNIVERSALSDK}" != "/"
5542 then
5543 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5544 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005545 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546 fi
5547 fi
5548
5549 # Calculate the right deployment target for this build.
5550 #
5551 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5552 if test ${cur_target} '>' 10.2; then
5553 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005554 if test ${enable_universalsdk}; then
5555 if test "${UNIVERSAL_ARCHS}" = "all"; then
5556 # Ensure that the default platform for a
5557 # 4-way universal build is OSX 10.5,
5558 # that's the first OS release where
5559 # 4-way builds make sense.
5560 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005561
5562 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5563 cur_target='10.5'
5564
5565 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5566 cur_target='10.5'
5567
5568 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5569 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005570 fi
5571 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005572 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005573 # On Intel macs default to a deployment
5574 # target of 10.4, that's the first OSX
5575 # release with Intel support.
5576 cur_target="10.4"
5577 fi
5578 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579 fi
5580 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5581
5582 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5583 # environment with a value that is the same as what we'll use
5584 # in the Makefile to ensure that we'll get the same compiler
5585 # environment during configure and build time.
5586 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5587 export MACOSX_DEPLOYMENT_TARGET
5588 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5589
5590 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 esac
5592 ;;
5593
5594*)
5595 case $ac_sys_system in
5596 OpenUNIX*|UnixWare*)
5597 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5598 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 SCO_SV*)
5600 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5601 ;;
5602 esac
5603 ;;
5604esac
5605
5606if test "$Py_DEBUG" = 'true'; then
5607 :
5608else
5609 OPT="-DNDEBUG $OPT"
5610fi
5611
5612if test "$ac_arch_flags"
5613then
5614 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5615fi
5616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617# Check whether GCC supports PyArg_ParseTuple format
5618if test "$GCC" = "yes"
5619then
Matthias Kloseb9621712010-04-24 17:59:49 +00005620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5621$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 save_CFLAGS=$CFLAGS
5623 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625/* end confdefs.h. */
5626
5627 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628int
5629main ()
5630{
5631
5632 ;
5633 return 0;
5634}
Matthias Kloseb159a552010-04-25 21:00:44 +00005635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005637if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638
Matthias Kloseb159a552010-04-25 21:00:44 +00005639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
Matthias Kloseb159a552010-04-25 21:00:44 +00005642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005643$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005644
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645else
Matthias Kloseb159a552010-04-25 21:00:44 +00005646
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005648$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649
5650fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5652 CFLAGS=$save_CFLAGS
5653fi
5654
5655# On some compilers, pthreads are available without further options
5656# (e.g. MacOS X). On some of these systems, the compiler will not
5657# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5658# So we have to see first whether pthreads are available without
5659# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5661$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005662if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664else
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 ac_cv_pthread_is_default=no
5667else
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669/* end confdefs.h. */
5670
5671#include <pthread.h>
5672
5673void* routine(void* p){return NULL;}
5674
5675int main(){
5676 pthread_t p;
5677 if(pthread_create(&p,NULL,routine,NULL)!=0)
5678 return 1;
5679 (void)pthread_detach(p);
5680 return 0;
5681}
5682
5683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005684if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685
5686 ac_cv_pthread_is_default=yes
5687 ac_cv_kthread=no
5688 ac_cv_pthread=no
5689
5690else
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
5696
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
5699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5701$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702
5703
5704if test $ac_cv_pthread_is_default = yes
5705then
5706 ac_cv_kpthread=no
5707else
5708# -Kpthread, if available, provides the right #defines
5709# and linker options to make pthread_create available
5710# Some compilers won't report that they do not support -Kpthread,
5711# so we need to run a program to see whether it really made the
5712# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5714$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005715if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717else
5718 ac_save_cc="$CC"
5719CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005720if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721 ac_cv_kpthread=no
5722else
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 Kloseb9621712010-04-24 17:59:49 +00005739if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740 ac_cv_kpthread=yes
5741else
Matthias Kloseb9621712010-04-24 17:59:49 +00005742 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746fi
5747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748CC="$ac_save_cc"
5749fi
5750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5752$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753fi
5754
5755if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5756then
5757# -Kthread, if available, provides the right #defines
5758# and linker options to make pthread_create available
5759# Some compilers won't report that they do not support -Kthread,
5760# so we need to run a program to see whether it really made the
5761# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5763$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005764if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766else
5767 ac_save_cc="$CC"
5768CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005769if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 ac_cv_kthread=no
5771else
Matthias Kloseb9621712010-04-24 17:59:49 +00005772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773/* end confdefs.h. */
5774
5775#include <pthread.h>
5776
5777void* routine(void* p){return NULL;}
5778
5779int main(){
5780 pthread_t p;
5781 if(pthread_create(&p,NULL,routine,NULL)!=0)
5782 return 1;
5783 (void)pthread_detach(p);
5784 return 0;
5785}
5786
5787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005788if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789 ac_cv_kthread=yes
5790else
Matthias Kloseb9621712010-04-24 17:59:49 +00005791 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795fi
5796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797CC="$ac_save_cc"
5798fi
5799
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5801$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802fi
5803
5804if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5805then
5806# -pthread, if available, provides the right #defines
5807# and linker options to make pthread_create available
5808# Some compilers won't report that they do not support -pthread,
5809# so we need to run a program to see whether it really made the
5810# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5812$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005813if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005814 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815else
5816 ac_save_cc="$CC"
5817CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005818if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 ac_cv_pthread=no
5820else
Matthias Kloseb9621712010-04-24 17:59:49 +00005821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822/* end confdefs.h. */
5823
5824#include <pthread.h>
5825
5826void* routine(void* p){return NULL;}
5827
5828int main(){
5829 pthread_t p;
5830 if(pthread_create(&p,NULL,routine,NULL)!=0)
5831 return 1;
5832 (void)pthread_detach(p);
5833 return 0;
5834}
5835
5836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838 ac_cv_pthread=yes
5839else
Matthias Kloseb9621712010-04-24 17:59:49 +00005840 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
5845
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846CC="$ac_save_cc"
5847fi
5848
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5850$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851fi
5852
5853# If we have set a CC compiler flag for thread support then
5854# check if it works for CXX, too.
5855ac_cv_cxx_thread=no
5856if test ! -z "$CXX"
5857then
Matthias Kloseb9621712010-04-24 17:59:49 +00005858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5859$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860ac_save_cxx="$CXX"
5861
5862if test "$ac_cv_kpthread" = "yes"
5863then
5864 CXX="$CXX -Kpthread"
5865 ac_cv_cxx_thread=yes
5866elif test "$ac_cv_kthread" = "yes"
5867then
5868 CXX="$CXX -Kthread"
5869 ac_cv_cxx_thread=yes
5870elif test "$ac_cv_pthread" = "yes"
5871then
5872 CXX="$CXX -pthread"
5873 ac_cv_cxx_thread=yes
5874fi
5875
5876if test $ac_cv_cxx_thread = yes
5877then
5878 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5879 $CXX -c conftest.$ac_ext 2>&5
5880 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5881 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5882 then
5883 ac_cv_cxx_thread=yes
5884 else
5885 ac_cv_cxx_thread=no
5886 fi
5887 rm -fr conftest*
5888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5890$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891fi
5892CXX="$ac_save_cxx"
5893
5894
5895# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5897$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005898if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900else
Matthias Kloseb9621712010-04-24 17:59:49 +00005901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902/* end confdefs.h. */
5903#include <stdlib.h>
5904#include <stdarg.h>
5905#include <string.h>
5906#include <float.h>
5907
5908int
5909main ()
5910{
5911
5912 ;
5913 return 0;
5914}
5915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005916if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ac_cv_header_stdc=yes
5918else
Matthias Kloseb9621712010-04-24 17:59:49 +00005919 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5922
5923if test $ac_cv_header_stdc = yes; then
5924 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926/* end confdefs.h. */
5927#include <string.h>
5928
5929_ACEOF
5930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 $EGREP "memchr" >/dev/null 2>&1; then :
5932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933else
5934 ac_cv_header_stdc=no
5935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005936rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
5938fi
5939
5940if test $ac_cv_header_stdc = yes; then
5941 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943/* end confdefs.h. */
5944#include <stdlib.h>
5945
5946_ACEOF
5947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $EGREP "free" >/dev/null 2>&1; then :
5949
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950else
5951 ac_cv_header_stdc=no
5952fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005953rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
5955fi
5956
5957if test $ac_cv_header_stdc = yes; then
5958 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 :
5961else
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963/* end confdefs.h. */
5964#include <ctype.h>
5965#include <stdlib.h>
5966#if ((' ' & 0x0FF) == 0x020)
5967# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5968# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5969#else
5970# define ISLOWER(c) \
5971 (('a' <= (c) && (c) <= 'i') \
5972 || ('j' <= (c) && (c) <= 'r') \
5973 || ('s' <= (c) && (c) <= 'z'))
5974# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5975#endif
5976
5977#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5978int
5979main ()
5980{
5981 int i;
5982 for (i = 0; i < 256; i++)
5983 if (XOR (islower (i), ISLOWER (i))
5984 || toupper (i) != TOUPPER (i))
5985 return 2;
5986 return 0;
5987}
5988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005989if ac_fn_c_try_run "$LINENO"; then :
5990
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
5997
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998fi
5999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6001$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002if test $ac_cv_header_stdc = yes; then
6003
Matthias Kloseb9621712010-04-24 17:59:49 +00006004$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005
6006fi
6007
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006008for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6009fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006010ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006011shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006012unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006013sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6014sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006015sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6016sys/stat.h sys/termio.h sys/time.h \
6017sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6018libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006019bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006020do :
6021 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6022ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006023if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006025#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006026_ACEOF
6027
6028fi
6029
Guido van Rossum627b2d71993-12-24 10:39:16 +00006030done
6031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006033for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6036$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006037if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006039else
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006041/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042#include <sys/types.h>
6043#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006044
Martin v. Löwis11437992002-04-12 09:54:03 +00006045int
6046main ()
6047{
6048if ((DIR *) 0)
6049return 0;
6050 ;
6051 return 0;
6052}
6053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006055 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006056else
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006061eval ac_res=\$$as_ac_Header
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6063$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006064if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006065 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006066#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006067_ACEOF
6068
6069ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006072done
6073# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6074if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6076$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006077if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006079else
Martin v. Löwis11437992002-04-12 09:54:03 +00006080 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084/* Override any GCC internal prototype to avoid an error.
6085 Use char because int might match the return type of a GCC
6086 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006087#ifdef __cplusplus
6088extern "C"
6089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006090char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006091int
6092main ()
6093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006094return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 ;
6096 return 0;
6097}
6098_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006099for ac_lib in '' dir; do
6100 if test -z "$ac_lib"; then
6101 ac_res="none required"
6102 else
6103 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006104 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006107 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006109rm -f core conftest.err conftest.$ac_objext \
6110 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006111 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006115if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006117else
6118 ac_cv_search_opendir=no
6119fi
6120rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006121LIBS=$ac_func_search_save_LIBS
6122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6124$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006125ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006126if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006128
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006129fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006130
Michael W. Hudson54241132001-12-07 15:38:26 +00006131else
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6133$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006134if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006136else
6137 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006140
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006141/* Override any GCC internal prototype to avoid an error.
6142 Use char because int might match the return type of a GCC
6143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006144#ifdef __cplusplus
6145extern "C"
6146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006147char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006148int
6149main ()
6150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006151return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006152 ;
6153 return 0;
6154}
6155_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006156for ac_lib in '' x; do
6157 if test -z "$ac_lib"; then
6158 ac_res="none required"
6159 else
6160 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006161 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006166rm -f core conftest.err conftest.$ac_objext \
6167 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006168 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006172if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174else
6175 ac_cv_search_opendir=no
6176fi
6177rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006178LIBS=$ac_func_search_save_LIBS
6179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6181$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006182ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006183if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006184 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186fi
6187
6188fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006189
Matthias Kloseb9621712010-04-24 17:59:49 +00006190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6191$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006192if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006194else
Matthias Kloseb9621712010-04-24 17:59:49 +00006195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006198int
6199main ()
6200{
6201return makedev(0, 0);
6202 ;
6203 return 0;
6204}
6205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006206if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207 ac_cv_header_sys_types_h_makedev=yes
6208else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006211rm -f core conftest.err conftest.$ac_objext \
6212 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006213
6214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6216$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217
6218if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006219ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006220if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006223
6224fi
6225
6226
6227
6228 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006230if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006231
Matthias Kloseb9621712010-04-24 17:59:49 +00006232$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006233
6234fi
6235
6236
6237 fi
6238fi
6239
Michael W. Hudson54241132001-12-07 15:38:26 +00006240
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006241# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006242for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006243do :
6244 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006245#ifdef HAVE_CURSES_H
6246#include <curses.h>
6247#endif
6248
Matthias Kloseb9621712010-04-24 17:59:49 +00006249"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006250if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006252#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006253_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006254
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006255fi
6256
6257done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006258
6259
Martin v. Löwis11017b12006-01-14 18:12:57 +00006260# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006261for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006262do :
6263 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 +00006264#ifdef HAVE_ASM_TYPES_H
6265#include <asm/types.h>
6266#endif
6267#ifdef HAVE_SYS_SOCKET_H
6268#include <sys/socket.h>
6269#endif
6270
Matthias Kloseb9621712010-04-24 17:59:49 +00006271"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006272if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006274#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006275_ACEOF
6276
6277fi
6278
6279done
6280
6281
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006283was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6285$as_echo_n "checking for clock_t in time.h... " >&6; }
6286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006287/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006288#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006289
6290_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006292 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006293 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294else
Martin v. Löwis11437992002-04-12 09:54:03 +00006295
6296
Matthias Kloseb9621712010-04-24 17:59:49 +00006297$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006298
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006299
Guido van Rossum627b2d71993-12-24 10:39:16 +00006300fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006301rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006302
Matthias Kloseb9621712010-04-24 17:59:49 +00006303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6304$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006305
Matthias Kloseb9621712010-04-24 17:59:49 +00006306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6307$as_echo_n "checking for makedev... " >&6; }
6308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006309/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006310
Jesus Cea740f53a2010-04-28 11:35:30 +00006311#if defined(MAJOR_IN_MKDEV)
6312#include <sys/mkdev.h>
6313#elif defined(MAJOR_IN_SYSMACROS)
6314#include <sys/sysmacros.h>
6315#else
6316#include <sys/types.h>
6317#endif
6318
Neal Norwitz11690112002-07-30 01:08:28 +00006319int
6320main ()
6321{
Jesus Cea740f53a2010-04-28 11:35:30 +00006322
6323 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006324 ;
6325 return 0;
6326}
Matthias Kloseb159a552010-04-25 21:00:44 +00006327
Neal Norwitz11690112002-07-30 01:08:28 +00006328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006329if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006330 ac_cv_has_makedev=yes
6331else
Matthias Kloseb9621712010-04-24 17:59:49 +00006332 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006334rm -f core conftest.err conftest.$ac_objext \
6335 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6337$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006338if test "$ac_cv_has_makedev" = "yes"; then
6339
Matthias Kloseb9621712010-04-24 17:59:49 +00006340$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006341
6342fi
6343
Martin v. Löwis399a6892002-10-04 10:22:02 +00006344# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6345# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6346# defined, but the compiler does not support pragma redefine_extname,
6347# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6348# structures (such as rlimit64) without declaring them. As a
6349# work-around, disable LFS on such configurations
6350
6351use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6353$as_echo_n "checking Solaris LFS bug... " >&6; }
6354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006355/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006356
6357#define _LARGEFILE_SOURCE 1
6358#define _FILE_OFFSET_BITS 64
6359#include <sys/resource.h>
6360
Martin v. Löwis399a6892002-10-04 10:22:02 +00006361int
6362main ()
6363{
6364struct rlimit foo;
6365 ;
6366 return 0;
6367}
6368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006370 sol_lfs_bug=no
6371else
Matthias Kloseb9621712010-04-24 17:59:49 +00006372 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6376$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006377if test "$sol_lfs_bug" = "yes"; then
6378 use_lfs=no
6379fi
6380
6381if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006382# Two defines needed to enable largefile support on various platforms
6383# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006384case $ac_sys_system/$ac_sys_release in
6385AIX*)
6386
6387$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6388
6389 ;;
6390esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006391
Matthias Kloseb9621712010-04-24 17:59:49 +00006392$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006393
6394
Matthias Kloseb9621712010-04-24 17:59:49 +00006395$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006396
Martin v. Löwis399a6892002-10-04 10:22:02 +00006397fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006398
Guido van Rossum84e7b241996-08-19 21:59:00 +00006399# Add some code to confdefs.h so that the test for off_t works on SCO
6400cat >> confdefs.h <<\EOF
6401#if defined(SCO_DS)
6402#undef _OFF_T
6403#endif
6404EOF
6405
Guido van Rossumef2255b2000-03-10 22:30:29 +00006406# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006407ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006408if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006409
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410else
Martin v. Löwis11437992002-04-12 09:54:03 +00006411
6412cat >>confdefs.h <<_ACEOF
6413#define mode_t int
6414_ACEOF
6415
6416fi
6417
Matthias Kloseb9621712010-04-24 17:59:49 +00006418ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006419if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006420
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006421else
Martin v. Löwis11437992002-04-12 09:54:03 +00006422
6423cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006425_ACEOF
6426
6427fi
6428
Matthias Kloseb9621712010-04-24 17:59:49 +00006429ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006430if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006432else
Martin v. Löwis11437992002-04-12 09:54:03 +00006433
6434cat >>confdefs.h <<_ACEOF
6435#define pid_t int
6436_ACEOF
6437
6438fi
6439
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006440
Martin v. Löwis11437992002-04-12 09:54:03 +00006441cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006442#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006443_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444
Matthias Kloseb9621712010-04-24 17:59:49 +00006445ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006446if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448else
Martin v. Löwis11437992002-04-12 09:54:03 +00006449
6450cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006451#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006452_ACEOF
6453
6454fi
6455
Matthias Kloseb9621712010-04-24 17:59:49 +00006456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6457$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006458if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006459 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006462/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006464
6465_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468 ac_cv_type_uid_t=yes
6469else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470 ac_cv_type_uid_t=no
6471fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006472rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6476$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006477if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478
Matthias Kloseb9621712010-04-24 17:59:49 +00006479$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006480
6481
Matthias Kloseb9621712010-04-24 17:59:49 +00006482$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483
6484fi
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6487case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006488 no|yes) ;; #(
6489 *)
6490
Matthias Kloseb9621712010-04-24 17:59:49 +00006491$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006492
6493
6494cat >>confdefs.h <<_ACEOF
6495#define uint32_t $ac_cv_c_uint32_t
6496_ACEOF
6497;;
6498 esac
6499
Matthias Kloseb9621712010-04-24 17:59:49 +00006500ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6501case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006502 no|yes) ;; #(
6503 *)
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006506
6507
6508cat >>confdefs.h <<_ACEOF
6509#define uint64_t $ac_cv_c_uint64_t
6510_ACEOF
6511;;
6512 esac
6513
Matthias Kloseb9621712010-04-24 17:59:49 +00006514ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6515case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006516 no|yes) ;; #(
6517 *)
6518
6519cat >>confdefs.h <<_ACEOF
6520#define int32_t $ac_cv_c_int32_t
6521_ACEOF
6522;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006523esac
6524
Matthias Kloseb9621712010-04-24 17:59:49 +00006525ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6526case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006527 no|yes) ;; #(
6528 *)
6529
6530cat >>confdefs.h <<_ACEOF
6531#define int64_t $ac_cv_c_int64_t
6532_ACEOF
6533;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006534esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006535
Matthias Kloseb9621712010-04-24 17:59:49 +00006536ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006537if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006538
Matthias Kloseb9621712010-04-24 17:59:49 +00006539$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006540
6541fi
6542
Jack Jansendd19cf82001-12-06 22:36:17 +00006543
Michael W. Hudson54241132001-12-07 15:38:26 +00006544# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006545# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006546# The cast to long int works around a bug in the HP C Compiler
6547# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6548# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6549# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6551$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006552if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006553 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006554else
Matthias Kloseb9621712010-04-24 17:59:49 +00006555 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 +00006556
Martin v. Löwis11437992002-04-12 09:54:03 +00006557else
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 if test "$ac_cv_type_int" = yes; then
6559 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6560$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006561as_fn_error 77 "cannot compute sizeof (int)
6562See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006563 else
6564 ac_cv_sizeof_int=0
6565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006567
Martin v. Löwis11437992002-04-12 09:54:03 +00006568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6570$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006571
6572
6573
Martin v. Löwis11437992002-04-12 09:54:03 +00006574cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006575#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006576_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006577
6578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579# The cast to long int works around a bug in the HP C Compiler
6580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6582# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6584$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006585if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006587else
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 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 +00006589
Martin v. Löwis11437992002-04-12 09:54:03 +00006590else
Matthias Kloseb9621712010-04-24 17:59:49 +00006591 if test "$ac_cv_type_long" = yes; then
6592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006594as_fn_error 77 "cannot compute sizeof (long)
6595See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006596 else
6597 ac_cv_sizeof_long=0
6598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600
Martin v. Löwis11437992002-04-12 09:54:03 +00006601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6603$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006604
6605
6606
Martin v. Löwis11437992002-04-12 09:54:03 +00006607cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006608#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006609_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006610
6611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006612# The cast to long int works around a bug in the HP C Compiler
6613# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6614# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6615# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6617$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006618if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 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 +00006622
Martin v. Löwis11437992002-04-12 09:54:03 +00006623else
Matthias Kloseb9621712010-04-24 17:59:49 +00006624 if test "$ac_cv_type_void_p" = yes; then
6625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006627as_fn_error 77 "cannot compute sizeof (void *)
6628See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006629 else
6630 ac_cv_sizeof_void_p=0
6631 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006633
Martin v. Löwis11437992002-04-12 09:54:03 +00006634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6636$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006637
6638
6639
Martin v. Löwis11437992002-04-12 09:54:03 +00006640cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006641#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006642_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006643
6644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006645# The cast to long int works around a bug in the HP C Compiler
6646# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6647# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6648# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6650$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006651if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006653else
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 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 +00006655
Martin v. Löwis11437992002-04-12 09:54:03 +00006656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 if test "$ac_cv_type_short" = yes; then
6658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006660as_fn_error 77 "cannot compute sizeof (short)
6661See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006662 else
6663 ac_cv_sizeof_short=0
6664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006666
Martin v. Löwis11437992002-04-12 09:54:03 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6669$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670
6671
6672
Martin v. Löwis11437992002-04-12 09:54:03 +00006673cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006674#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006675_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006676
6677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006678# The cast to long int works around a bug in the HP C Compiler
6679# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6680# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6681# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6683$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006684if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 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 +00006688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 if test "$ac_cv_type_float" = yes; then
6691 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006693as_fn_error 77 "cannot compute sizeof (float)
6694See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006695 else
6696 ac_cv_sizeof_float=0
6697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006699
Martin v. Löwis11437992002-04-12 09:54:03 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6702$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006703
6704
6705
Martin v. Löwis11437992002-04-12 09:54:03 +00006706cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006708_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709
6710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711# The cast to long int works around a bug in the HP C Compiler
6712# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6713# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6714# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6716$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006717if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 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 +00006721
Martin v. Löwis11437992002-04-12 09:54:03 +00006722else
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 if test "$ac_cv_type_double" = yes; then
6724 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006726as_fn_error 77 "cannot compute sizeof (double)
6727See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728 else
6729 ac_cv_sizeof_double=0
6730 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006732
Martin v. Löwis11437992002-04-12 09:54:03 +00006733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6735$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006736
6737
6738
Martin v. Löwis11437992002-04-12 09:54:03 +00006739cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006740#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006741_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742
6743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744# The cast to long int works around a bug in the HP C Compiler
6745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6749$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006750if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006751 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006752else
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 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 +00006754
Martin v. Löwis11437992002-04-12 09:54:03 +00006755else
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 if test "$ac_cv_type_fpos_t" = yes; then
6757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006759as_fn_error 77 "cannot compute sizeof (fpos_t)
6760See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761 else
6762 ac_cv_sizeof_fpos_t=0
6763 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006765
Martin v. Löwis11437992002-04-12 09:54:03 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6768$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006769
6770
6771
Martin v. Löwis11437992002-04-12 09:54:03 +00006772cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006773#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006774_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006775
Michael W. Hudson54241132001-12-07 15:38:26 +00006776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006777# The cast to long int works around a bug in the HP C Compiler
6778# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6779# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6780# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6782$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006783if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006784 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 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 +00006787
Martin v. Löwis18e16552006-02-15 17:27:45 +00006788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 if test "$ac_cv_type_size_t" = yes; then
6790 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6791$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006792as_fn_error 77 "cannot compute sizeof (size_t)
6793See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794 else
6795 ac_cv_sizeof_size_t=0
6796 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798
Martin v. Löwis18e16552006-02-15 17:27:45 +00006799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6801$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802
6803
6804
Martin v. Löwis18e16552006-02-15 17:27:45 +00006805cat >>confdefs.h <<_ACEOF
6806#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6807_ACEOF
6808
6809
Christian Heimes400adb02008-02-01 08:12:03 +00006810# The cast to long int works around a bug in the HP C Compiler
6811# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6812# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6813# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6815$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006816if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00006820
Christian Heimes400adb02008-02-01 08:12:03 +00006821else
Matthias Kloseb9621712010-04-24 17:59:49 +00006822 if test "$ac_cv_type_pid_t" = yes; then
6823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006825as_fn_error 77 "cannot compute sizeof (pid_t)
6826See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006827 else
6828 ac_cv_sizeof_pid_t=0
6829 fi
6830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006831
Christian Heimes400adb02008-02-01 08:12:03 +00006832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6834$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006835
6836
6837
6838cat >>confdefs.h <<_ACEOF
6839#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6840_ACEOF
6841
6842
Michael W. Hudson54241132001-12-07 15:38:26 +00006843
Matthias Kloseb9621712010-04-24 17:59:49 +00006844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6845$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006846have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006848/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006849
Martin v. Löwis11437992002-04-12 09:54:03 +00006850int
6851main ()
6852{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006853long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006854 ;
6855 return 0;
6856}
6857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006859
6860
Matthias Kloseb9621712010-04-24 17:59:49 +00006861$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006862
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006863 have_long_long=yes
6864
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6868$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006869if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870# The cast to long int works around a bug in the HP C Compiler
6871# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6872# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6873# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6875$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006876if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006877 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006878else
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 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 +00006880
Martin v. Löwis11437992002-04-12 09:54:03 +00006881else
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 if test "$ac_cv_type_long_long" = yes; then
6883 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006885as_fn_error 77 "cannot compute sizeof (long long)
6886See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887 else
6888 ac_cv_sizeof_long_long=0
6889 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006891
Martin v. Löwis11437992002-04-12 09:54:03 +00006892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6894$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895
6896
6897
Martin v. Löwis11437992002-04-12 09:54:03 +00006898cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006899#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006900_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006901
Michael W. Hudson54241132001-12-07 15:38:26 +00006902
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006903fi
6904
Matthias Kloseb9621712010-04-24 17:59:49 +00006905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6906$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006907have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006909/* end confdefs.h. */
6910
6911int
6912main ()
6913{
6914long double x; x = (long double)0;
6915 ;
6916 return 0;
6917}
6918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006919if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006920
6921
Matthias Kloseb9621712010-04-24 17:59:49 +00006922$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006923
6924 have_long_double=yes
6925
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006926fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6929$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006930if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006931# The cast to long int works around a bug in the HP C Compiler
6932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6934# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6936$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006937if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939else
Matthias Kloseb9621712010-04-24 17:59:49 +00006940 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006941
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006942else
Matthias Kloseb9621712010-04-24 17:59:49 +00006943 if test "$ac_cv_type_long_double" = yes; then
6944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006946as_fn_error 77 "cannot compute sizeof (long double)
6947See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006948 else
6949 ac_cv_sizeof_long_double=0
6950 fi
6951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006952
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6955$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956
6957
6958
6959cat >>confdefs.h <<_ACEOF
6960#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6961_ACEOF
6962
6963
6964fi
6965
6966
Matthias Kloseb9621712010-04-24 17:59:49 +00006967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6968$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006969have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006971/* end confdefs.h. */
6972
6973int
6974main ()
6975{
6976_Bool x; x = (_Bool)0;
6977 ;
6978 return 0;
6979}
6980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006981if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006982
6983
Matthias Kloseb9621712010-04-24 17:59:49 +00006984$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006985
6986 have_c99_bool=yes
6987
Thomas Woutersb2137042007-02-01 18:02:27 +00006988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6991$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006992if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006993# The cast to long int works around a bug in the HP C Compiler
6994# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6995# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6996# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6998$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006999if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007000 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007001else
Matthias Kloseb9621712010-04-24 17:59:49 +00007002 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007003
Thomas Woutersb2137042007-02-01 18:02:27 +00007004else
Matthias Kloseb9621712010-04-24 17:59:49 +00007005 if test "$ac_cv_type__Bool" = yes; then
7006 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007008as_fn_error 77 "cannot compute sizeof (_Bool)
7009See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010 else
7011 ac_cv_sizeof__Bool=0
7012 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007014
Thomas Woutersb2137042007-02-01 18:02:27 +00007015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7017$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018
7019
7020
Thomas Woutersb2137042007-02-01 18:02:27 +00007021cat >>confdefs.h <<_ACEOF
7022#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7023_ACEOF
7024
7025
7026fi
7027
Matthias Kloseb9621712010-04-24 17:59:49 +00007028ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007029 #include <stdint.h>
7030 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007031 #ifdef HAVE_INTTYPES_H
7032 #include <inttypes.h>
7033 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007034"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007035if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007036
7037cat >>confdefs.h <<_ACEOF
7038#define HAVE_UINTPTR_T 1
7039_ACEOF
7040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041# The cast to long int works around a bug in the HP C Compiler
7042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7044# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7046$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007047if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 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 +00007051
Martin v. Löwis11437992002-04-12 09:54:03 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 if test "$ac_cv_type_uintptr_t" = yes; then
7054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007056as_fn_error 77 "cannot compute sizeof (uintptr_t)
7057See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058 else
7059 ac_cv_sizeof_uintptr_t=0
7060 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062
Martin v. Löwis11437992002-04-12 09:54:03 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7065$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066
7067
7068
Martin v. Löwis11437992002-04-12 09:54:03 +00007069cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007070#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007071_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007072
Michael W. Hudson54241132001-12-07 15:38:26 +00007073
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007074fi
7075
Thomas Wouters89f507f2006-12-13 04:49:30 +00007076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7082$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007083if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007085else
Matthias Kloseb9621712010-04-24 17:59:49 +00007086 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007087#ifdef HAVE_SYS_TYPES_H
7088#include <sys/types.h>
7089#endif
7090
Matthias Kloseb9621712010-04-24 17:59:49 +00007091"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007093else
Matthias Kloseb9621712010-04-24 17:59:49 +00007094 if test "$ac_cv_type_off_t" = yes; then
7095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007097as_fn_error 77 "cannot compute sizeof (off_t)
7098See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007099 else
7100 ac_cv_sizeof_off_t=0
7101 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7106$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007108
7109
Martin v. Löwis11437992002-04-12 09:54:03 +00007110cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007111#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007112_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007113
Michael W. Hudson54241132001-12-07 15:38:26 +00007114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007115
Matthias Kloseb9621712010-04-24 17:59:49 +00007116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7117$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007118if test "$have_long_long" = yes
7119then
7120if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007121 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007122
Matthias Kloseb9621712010-04-24 17:59:49 +00007123$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7126$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007127else
Matthias Kloseb9621712010-04-24 17:59:49 +00007128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007130fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007134fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007135
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007136# The cast to long int works around a bug in the HP C Compiler
7137# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7138# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7139# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7141$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007142if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007144else
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007146#ifdef HAVE_SYS_TYPES_H
7147#include <sys/types.h>
7148#endif
7149#ifdef HAVE_TIME_H
7150#include <time.h>
7151#endif
7152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007155else
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 if test "$ac_cv_type_time_t" = yes; then
7157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007159as_fn_error 77 "cannot compute sizeof (time_t)
7160See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007161 else
7162 ac_cv_sizeof_time_t=0
7163 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007165
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7168$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007170
7171
Martin v. Löwis11437992002-04-12 09:54:03 +00007172cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007173#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007174_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007175
Michael W. Hudson54241132001-12-07 15:38:26 +00007176
7177
Trent Mick635f6fb2000-08-23 21:33:05 +00007178# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007179ac_save_cc="$CC"
7180if test "$ac_cv_kpthread" = "yes"
7181then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007182elif test "$ac_cv_kthread" = "yes"
7183then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007184elif test "$ac_cv_pthread" = "yes"
7185then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007186fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007187
Matthias Kloseb9621712010-04-24 17:59:49 +00007188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7189$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007190have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007192/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007193
7194 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007195int
7196main ()
7197{
Guido van Rossum12580492000-09-24 16:47:19 +00007198pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007199 ;
7200 return 0;
7201}
Matthias Kloseb159a552010-04-25 21:00:44 +00007202
Martin v. Löwis11437992002-04-12 09:54:03 +00007203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007204if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007205 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7209$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007210if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007212# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7213# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7214# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7216$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007217if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007218 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007219else
Matthias Kloseb9621712010-04-24 17:59:49 +00007220 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007221#ifdef HAVE_PTHREAD_H
7222#include <pthread.h>
7223#endif
7224
Matthias Kloseb9621712010-04-24 17:59:49 +00007225"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 if test "$ac_cv_type_pthread_t" = yes; then
7229 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007231as_fn_error 77 "cannot compute sizeof (pthread_t)
7232See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007233 else
7234 ac_cv_sizeof_pthread_t=0
7235 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007237
Trent Mick635f6fb2000-08-23 21:33:05 +00007238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7240$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242
7243
Martin v. Löwis11437992002-04-12 09:54:03 +00007244cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007245#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007246_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007248
Trent Mick635f6fb2000-08-23 21:33:05 +00007249fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007250CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007251
Michael W. Hudson54241132001-12-07 15:38:26 +00007252
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007253case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007254 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007255 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7256 ;;
7257 Darwin/*)
7258 OTHER_LIBTOOL_OPT=""
7259 ;;
7260esac
7261
7262
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007263ARCH_RUN_32BIT=""
7264
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007265case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007266 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007267 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7268 if test "${enable_universalsdk}"; then
7269 :
7270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007271 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007272 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007274 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007275 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007276 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007277 if test ${gcc_version} '<' 4.0
7278 then
7279 LIBTOOL_CRUFT="-lcc_dynamic"
7280 else
7281 LIBTOOL_CRUFT=""
7282 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007283 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007284 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007285else
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007287/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007288
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007289 #include <unistd.h>
7290 int main(int argc, char*argv[])
7291 {
7292 if (sizeof(long) == 4) {
7293 return 0;
7294 } else {
7295 return 1;
7296 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007297 }
7298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007300if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007301 ac_osx_32bit=yes
7302else
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007307fi
7308
7309
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007310 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007311 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007312 i386)
7313 MACOSX_DEFAULT_ARCH="i386"
7314 ;;
7315 ppc)
7316 MACOSX_DEFAULT_ARCH="ppc"
7317 ;;
7318 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007319 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007320 ;;
7321 esac
7322 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007323 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007324 i386)
7325 MACOSX_DEFAULT_ARCH="x86_64"
7326 ;;
7327 ppc)
7328 MACOSX_DEFAULT_ARCH="ppc64"
7329 ;;
7330 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007331 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007332 ;;
7333 esac
7334
7335 #ARCH_RUN_32BIT="true"
7336 fi
7337
7338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007340 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007341esac
7342
Matthias Kloseb9621712010-04-24 17:59:49 +00007343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7344$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007345if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007346then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007347 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007349 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7354$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007355 if test $enable_shared = "yes"
7356 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007357 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00007358 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007359else
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007362fi
7363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7365$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007366case $ac_sys_system/$ac_sys_release in
7367 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007370
Matthias Kloseb9621712010-04-24 17:59:49 +00007371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7372$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007373 ;;
7374 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7376$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007377 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007378esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007379
Guido van Rossum0a516c91994-09-12 10:58:40 +00007380# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
7383
7384
7385
Benjamin Peterson99f03762010-04-11 22:15:28 +00007386
Thomas Wouters477c8d52006-05-27 19:21:47 +00007387
Georg Brandlb1441c72009-01-03 22:33:39 +00007388
Thomas Wouters477c8d52006-05-27 19:21:47 +00007389cat >>confdefs.h <<_ACEOF
7390#define SHLIB_EXT "$SO"
7391_ACEOF
7392
Guido van Rossum0a516c91994-09-12 10:58:40 +00007393# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007394# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007395# (Shared libraries in this instance are shared modules to be loaded into
7396# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7398$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007399if test -z "$LDSHARED"
7400then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007401 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007402 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007403 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007404 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007405 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007406 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007407 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007408 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007409 if test "$GCC" = "yes" ; then
7410 LDSHARED='$(CC) -shared'
7411 LDCXXSHARED='$(CXX) -shared'
7412 else
7413 LDSHARED='$(CC) -G'
7414 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007415 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007416 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007417 if test "$GCC" = "yes" ; then
7418 LDSHARED='$(CC) -shared'
7419 LDCXXSHARED='$(CXX) -shared'
7420 else
7421 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007422 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007423 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007424 LDSHARED='$(CC) -bundle'
7425 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007426 if test "$enable_framework" ; then
7427 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007428 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7429 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007430 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007431 else
7432 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007433 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007434 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007435 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007436 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007437 LDSHARED='$(CC) -bundle'
7438 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007439 if test "$enable_framework" ; then
7440 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007441 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7442 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007443 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007444 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007445 # No framework, use the Python app as bundle-loader
7446 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007447 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007448 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007449 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007450 Darwin/*)
7451 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7452 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007453
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007454 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007455 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007456 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007457 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007458 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007459 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7460 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007461 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007462 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007463 LDSHARED='$(CC) -bundle'
7464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007465 if test "$enable_framework" ; then
7466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007470 else
7471 # No framework, use the Python app as bundle-loader
7472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007474 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007475 fi
7476 fi
7477 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007478 Linux*|GNU*|QNX*)
7479 LDSHARED='$(CC) -shared'
7480 LDCXXSHARED='$(CXX) -shared';;
7481 BSD/OS*/4*)
7482 LDSHARED="gcc -shared"
7483 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007484 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007485 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007486 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007487 LDSHARED='$(CC) -shared'
7488 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007489 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007490 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007491 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007492 OpenBSD*)
7493 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7494 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007495 LDSHARED='$(CC) -shared $(CCSHARED)'
7496 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007497 else
7498 case `uname -r` in
7499 [01].* | 2.[0-7] | 2.[0-7].*)
7500 LDSHARED="ld -Bshareable ${LDFLAGS}"
7501 ;;
7502 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007503 LDSHARED='$(CC) -shared $(CCSHARED)'
7504 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007505 ;;
7506 esac
7507 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007508 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007509 LDSHARED='$(CC) -shared'
7510 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007511 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007512 if test "$GCC" = "yes" ; then
7513 LDSHARED='$(CC) -shared'
7514 LDCXXSHARED='$(CXX) -shared'
7515 else
7516 LDSHARED='$(CC) -G'
7517 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007518 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007519 SCO_SV*)
7520 LDSHARED='$(CC) -Wl,-G,-Bexport'
7521 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7522 CYGWIN*)
7523 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7524 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007525 *) LDSHARED="ld";;
7526 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7529$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007530LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007531BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007532# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007533# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7535$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007536if test -z "$CCSHARED"
7537then
Guido van Rossum07397971997-04-29 21:49:50 +00007538 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007539 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007540 then CCSHARED="-fPIC";
7541 elif test `uname -p` = sparc;
7542 then CCSHARED="-xcode=pic32";
7543 else CCSHARED="-Kpic";
7544 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007545 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007546 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007547 else CCSHARED="+z";
7548 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007549 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007550 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007551 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007552 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007553 if test "$GCC" = "yes"
7554 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007555 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007556 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007557 SCO_SV*)
7558 if test "$GCC" = "yes"
7559 then CCSHARED="-fPIC"
7560 else CCSHARED="-Kpic -belf"
7561 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007562 IRIX*/6*) case $CC in
7563 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007564 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007565 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7569$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007570# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007571# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7573$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007574if test -z "$LINKFORSHARED"
7575then
Guido van Rossum07397971997-04-29 21:49:50 +00007576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007577 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007578 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007579 LINKFORSHARED="-Wl,-E -Wl,+s";;
7580# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007581 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007582 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007583 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007584 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007585 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007586 if test "$enable_framework"
7587 then
Jack Jansenda49e192005-01-07 13:08:22 +00007588 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007589 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007590 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007591 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007592 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007593 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007594 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007595 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7596 then
7597 LINKFORSHARED="-Wl,--export-dynamic"
7598 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007599 SunOS/5*) case $CC in
7600 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007601 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007602 then
7603 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007604 fi;;
7605 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007606 CYGWIN*)
7607 if test $enable_shared = "no"
7608 then
7609 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7610 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007611 QNX*)
7612 # -Wl,-E causes the symbols to be added to the dynamic
7613 # symbol table so that they can be found when a module
7614 # is loaded. -N 2048K causes the stack size to be set
7615 # to 2048 kilobytes so that the stack doesn't overflow
7616 # when running test_compile.py.
7617 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007618 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7621$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007622
Michael W. Hudson54241132001-12-07 15:38:26 +00007623
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007624
Matthias Kloseb9621712010-04-24 17:59:49 +00007625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7626$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007627if test ! "$LIBRARY" = "$LDLIBRARY"
7628then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007629 case $ac_sys_system in
7630 CYGWIN*)
7631 # Cygwin needs CCSHARED when building extension DLLs
7632 # but not when building the interpreter DLL.
7633 CFLAGSFORSHARED='';;
7634 *)
7635 CFLAGSFORSHARED='$(CCSHARED)'
7636 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7639$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007640
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007641# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7642# library (with --enable-shared).
7643# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007644# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7645# if it is not required, since it creates a dependency of the shared library
7646# to LIBS. This, in turn, means that applications linking the shared libpython
7647# don't need to link LIBS explicitly. The default should be only changed
7648# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007649
Matthias Kloseb9621712010-04-24 17:59:49 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7651$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007652case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007653 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007654 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007655esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7657$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007658
7659
Guido van Rossum627b2d71993-12-24 10:39:16 +00007660# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7662$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007663if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007664 $as_echo_n "(cached) " >&6
7665else
7666 ac_check_lib_save_LIBS=$LIBS
7667LIBS="-lsendfile $LIBS"
7668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7669/* end confdefs.h. */
7670
7671/* Override any GCC internal prototype to avoid an error.
7672 Use char because int might match the return type of a GCC
7673 builtin and then its argument prototype would still apply. */
7674#ifdef __cplusplus
7675extern "C"
7676#endif
7677char sendfile ();
7678int
7679main ()
7680{
7681return sendfile ();
7682 ;
7683 return 0;
7684}
7685_ACEOF
7686if ac_fn_c_try_link "$LINENO"; then :
7687 ac_cv_lib_sendfile_sendfile=yes
7688else
7689 ac_cv_lib_sendfile_sendfile=no
7690fi
7691rm -f core conftest.err conftest.$ac_objext \
7692 conftest$ac_exeext conftest.$ac_ext
7693LIBS=$ac_check_lib_save_LIBS
7694fi
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7696$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007697if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007698 cat >>confdefs.h <<_ACEOF
7699#define HAVE_LIBSENDFILE 1
7700_ACEOF
7701
7702 LIBS="-lsendfile $LIBS"
7703
7704fi
7705
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7707$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007708if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710else
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007712LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716/* Override any GCC internal prototype to avoid an error.
7717 Use char because int might match the return type of a GCC
7718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007719#ifdef __cplusplus
7720extern "C"
7721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007722char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007723int
7724main ()
7725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007727 ;
7728 return 0;
7729}
7730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007736rm -f core conftest.err conftest.$ac_objext \
7737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7741$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007742if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007743 cat >>confdefs.h <<_ACEOF
7744#define HAVE_LIBDL 1
7745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007747 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007749fi
7750 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7752$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007753if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755else
Martin v. Löwis11437992002-04-12 09:54:03 +00007756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007757LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761/* Override any GCC internal prototype to avoid an error.
7762 Use char because int might match the return type of a GCC
7763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007764#ifdef __cplusplus
7765extern "C"
7766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007767char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007768int
7769main ()
7770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007771return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 ;
7773 return 0;
7774}
7775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781rm -f core conftest.err conftest.$ac_objext \
7782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7786$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007787if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007788 cat >>confdefs.h <<_ACEOF
7789#define HAVE_LIBDLD 1
7790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007792 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794fi
7795 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007796
Georg Brandlb1441c72009-01-03 22:33:39 +00007797# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007798if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7800$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007801if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007803else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007804 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808/* Override any GCC internal prototype to avoid an error.
7809 Use char because int might match the return type of a GCC
7810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007811#ifdef __cplusplus
7812extern "C"
7813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007814char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007815int
7816main ()
7817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007819 ;
7820 return 0;
7821}
7822_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823for ac_lib in '' pthread rt posix4; do
7824 if test -z "$ac_lib"; then
7825 ac_res="none required"
7826 else
7827 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007833rm -f core conftest.err conftest.$ac_objext \
7834 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007835 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007839if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841else
7842 ac_cv_search_sem_init=no
7843fi
7844rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007845LIBS=$ac_func_search_save_LIBS
7846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7848$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007850if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007852
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007853fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007854 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007855 # posix4 on Solaris 2.6
7856 # pthread (first!) on Linux
7857fi
7858
Martin v. Löwis19d17342003-06-14 21:03:05 +00007859# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7861$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007862if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007864else
7865 ac_check_lib_save_LIBS=$LIBS
7866LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007868/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870/* Override any GCC internal prototype to avoid an error.
7871 Use char because int might match the return type of a GCC
7872 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007873#ifdef __cplusplus
7874extern "C"
7875#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007877int
7878main ()
7879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007881 ;
7882 return 0;
7883}
7884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007886 ac_cv_lib_intl_textdomain=yes
7887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890rm -f core conftest.err conftest.$ac_objext \
7891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007892LIBS=$ac_check_lib_save_LIBS
7893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7895$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007896if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007897
Matthias Kloseb9621712010-04-24 17:59:49 +00007898$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899
Brett Cannonc6d936e2009-06-07 20:09:53 +00007900 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007901fi
7902
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007903
7904# checks for system dependent C++ extensions support
7905case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7907$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007910
Georg Brandl59e87bd2011-02-15 19:48:59 +00007911 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007912int
7913main ()
7914{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007915loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 ;
7917 return 0;
7918}
Matthias Kloseb159a552010-04-25 21:00:44 +00007919
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007921if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007922
Matthias Kloseb159a552010-04-25 21:00:44 +00007923
Matthias Kloseb9621712010-04-24 17:59:49 +00007924$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007925
Matthias Kloseb159a552010-04-25 21:00:44 +00007926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007927$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007928
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007929else
Matthias Kloseb159a552010-04-25 21:00:44 +00007930
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007933
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935rm -f core conftest.err conftest.$ac_objext \
7936 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007937 *) ;;
7938esac
7939
Guido van Rossum70c7f481998-03-26 18:44:10 +00007940# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7942$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007943if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007944 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007945else
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007947LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951/* Override any GCC internal prototype to avoid an error.
7952 Use char because int might match the return type of a GCC
7953 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007954#ifdef __cplusplus
7955extern "C"
7956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007957char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007958int
7959main ()
7960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ;
7963 return 0;
7964}
7965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007968else
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971rm -f core conftest.err conftest.$ac_objext \
7972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7976$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007977if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007978 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007979fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007980 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7982$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007983if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007985else
Martin v. Löwis11437992002-04-12 09:54:03 +00007986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007987LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991/* Override any GCC internal prototype to avoid an error.
7992 Use char because int might match the return type of a GCC
7993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007994#ifdef __cplusplus
7995extern "C"
7996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007997char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 ;
8003 return 0;
8004}
8005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008007 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008008else
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011rm -f core conftest.err conftest.$ac_objext \
8012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8016$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008017if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008018 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008019fi
8020 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008021
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8023$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008026if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8029$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008030LIBS="$withval $LIBS"
8031
8032else
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8034$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035fi
8036
Guido van Rossum7f43da71994-08-01 12:15:30 +00008037
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008038if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008039 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8042$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008043if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008044 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008045else
8046 case $PKG_CONFIG in
8047 [\\/]* | ?:[\\/]*)
8048 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8049 ;;
8050 *)
8051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052for as_dir in $PATH
8053do
8054 IFS=$as_save_IFS
8055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008057 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8058 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008060 break 2
8061 fi
8062done
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008064IFS=$as_save_IFS
8065
8066 ;;
8067esac
8068fi
8069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8070if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8072$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008073else
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008076fi
8077
8078
8079fi
8080if test -z "$ac_cv_path_PKG_CONFIG"; then
8081 ac_pt_PKG_CONFIG=$PKG_CONFIG
8082 # Extract the first word of "pkg-config", so it can be a program name with args.
8083set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8085$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008086if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008088else
8089 case $ac_pt_PKG_CONFIG in
8090 [\\/]* | ?:[\\/]*)
8091 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8092 ;;
8093 *)
8094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8095for as_dir in $PATH
8096do
8097 IFS=$as_save_IFS
8098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008100 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8101 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103 break 2
8104 fi
8105done
Matthias Kloseb9621712010-04-24 17:59:49 +00008106 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008107IFS=$as_save_IFS
8108
8109 ;;
8110esac
8111fi
8112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8113if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008116else
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008119fi
8120
8121 if test "x$ac_pt_PKG_CONFIG" = x; then
8122 PKG_CONFIG=""
8123 else
8124 case $cross_compiling:$ac_tool_warned in
8125yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008128ac_tool_warned=yes ;;
8129esac
8130 PKG_CONFIG=$ac_pt_PKG_CONFIG
8131 fi
8132else
8133 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8134fi
8135
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008136
8137# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8139$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008140
8141# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008142if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008143 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008144else
8145 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008146fi
8147
8148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8150$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008151
8152# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8154$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008155
8156# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008158 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008159else
8160 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008161fi
8162
8163
8164if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008165 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8166else
8167 LIBFFI_INCLUDEDIR=""
8168fi
8169
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8172$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008173
Benjamin Peterson076ed002010-10-31 17:11:02 +00008174# Check for support for loadable sqlite extensions
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8176$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8177# Check whether --enable-loadable-sqlite-extensions was given.
8178if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8179 enableval=$enable_loadable_sqlite_extensions;
8180else
8181 enable_loadable_sqlite_extensions="no"
8182fi
8183
8184
8185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8186$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8187
Matthias Klose55708cc2009-04-30 08:06:49 +00008188# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8190$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008191
8192# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008193if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008194 withval=$with_dbmliborder;
8195if test x$with_dbmliborder = xyes
8196then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008197as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008198else
8199 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8200 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8201 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008202 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008203 fi
8204 done
8205fi
8206fi
8207
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8209$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008210
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008211# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008212
8213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8215$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008218if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 withval=$with_signal_module;
8220fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008221
8222
8223if test -z "$with_signal_module"
8224then with_signal_module="yes"
8225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8227$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008228
8229if test "${with_signal_module}" = "yes"; then
8230 USE_SIGNAL_MODULE=""
8231 SIGNAL_OBJS=""
8232else
8233 USE_SIGNAL_MODULE="#"
8234 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8235fi
8236
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008237# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008238
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008239USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008241
Martin v. Löwis11437992002-04-12 09:54:03 +00008242
8243# Templates for things AC_DEFINEd more than once.
8244# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008245
8246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8250$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008253if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 withval=$with_threads;
8255fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008256
8257
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008258# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262 withval=$with_thread; with_threads=$with_thread
8263fi
8264
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008265
8266if test -z "$with_threads"
8267then with_threads="yes"
8268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8270$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008271
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008272
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008273if test "$with_threads" = "no"
8274then
8275 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008276elif test "$ac_cv_pthread_is_default" = yes
8277then
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008279
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008280 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008282
8283 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008284 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008285elif test "$ac_cv_kpthread" = "yes"
8286then
8287 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008288 if test "$ac_cv_cxx_thread" = "yes"; then
8289 CXX="$CXX -Kpthread"
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008292
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008293 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008294 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008295elif test "$ac_cv_kthread" = "yes"
8296then
8297 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008298 if test "$ac_cv_cxx_thread" = "yes"; then
8299 CXX="$CXX -Kthread"
8300 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008302
8303 posix_threads=yes
8304 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008305elif test "$ac_cv_pthread" = "yes"
8306then
8307 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008308 if test "$ac_cv_cxx_thread" = "yes"; then
8309 CXX="$CXX -pthread"
8310 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008312
8313 posix_threads=yes
8314 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008315else
8316 if test ! -z "$with_threads" -a -d "$with_threads"
8317 then LDFLAGS="$LDFLAGS -L$with_threads"
8318 fi
8319 if test ! -z "$withval" -a -d "$withval"
8320 then LDFLAGS="$LDFLAGS -L$withval"
8321 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008322
8323 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008324 # define _POSIX_THREADS in unistd.h. Some apparently don't
8325 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8327$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008329/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008330
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008331#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008332#ifdef _POSIX_THREADS
8333yes
8334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008335
8336_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008337if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008339 unistd_defines_pthreads=yes
8340else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008341 unistd_defines_pthreads=no
8342fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008343rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8346$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008351if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008353
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008358
8359 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008360 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008364if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008371
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008372 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008373else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008374
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008375 # Just looking for pthread_create in libpthread is not enough:
8376 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8377 # So we really have to include pthread.h, and then link.
8378 _libs=$LIBS
8379 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8381$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008383/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008384#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008386void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008387int
8388main ()
8389{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008390
8391pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 ;
8393 return 0;
8394}
8395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8399$as_echo "yes" >&6; }
8400 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008401
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008402 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008403 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008404else
Martin v. Löwis11437992002-04-12 09:54:03 +00008405
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008406 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008408if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008410
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008411 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008412 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008413else
Guido van Rossumad678af1998-10-02 14:42:15 +00008414
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8416$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008417if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008419else
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008421LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008424
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425/* Override any GCC internal prototype to avoid an error.
8426 Use char because int might match the return type of a GCC
8427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008428#ifdef __cplusplus
8429extern "C"
8430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008431char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008432int
8433main ()
8434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008436 ;
8437 return 0;
8438}
8439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008444fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008445rm -f core conftest.err conftest.$ac_objext \
8446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008447LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8450$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008451if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008453
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008454 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008455 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008456 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008457else
Greg Steinadf63d62000-07-05 10:38:09 +00008458
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8460$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008461if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008463else
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008465LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469/* Override any GCC internal prototype to avoid an error.
8470 Use char because int might match the return type of a GCC
8471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472#ifdef __cplusplus
8473extern "C"
8474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008475char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008476int
8477main ()
8478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ;
8481 return 0;
8482}
8483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489rm -f core conftest.err conftest.$ac_objext \
8490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008491LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8494$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008495if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008497
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008498 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008499 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008500 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008501else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8504$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008505if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008507else
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008509LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008512
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513/* Override any GCC internal prototype to avoid an error.
8514 Use char because int might match the return type of a GCC
8515 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008516#ifdef __cplusplus
8517extern "C"
8518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008519char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008520int
8521main ()
8522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008524 ;
8525 return 0;
8526}
8527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533rm -f core conftest.err conftest.$ac_objext \
8534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008535LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8538$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008539if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008541
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008542 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008543 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008544 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008545else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008546
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8548$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008549if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008551else
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008553LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008557/* Override any GCC internal prototype to avoid an error.
8558 Use char because int might match the return type of a GCC
8559 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008560#ifdef __cplusplus
8561extern "C"
8562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008563char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008564int
8565main ()
8566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ;
8569 return 0;
8570}
8571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008572if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008574else
Matthias Kloseb9621712010-04-24 17:59:49 +00008575 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577rm -f core conftest.err conftest.$ac_objext \
8578 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008579LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8582$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008583if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008585
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008586 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008587 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008588 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008589else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008590
Martin v. Löwis130fb172001-07-19 11:00:41 +00008591 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008592fi
8593
Guido van Rossum627b2d71993-12-24 10:39:16 +00008594
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008595fi
8596
Guido van Rossum0be3e491997-05-22 20:33:33 +00008597fi
8598
Guido van Rossum49545951997-12-02 19:28:29 +00008599fi
8600
Guido van Rossumb93a8621998-05-07 13:27:32 +00008601fi
8602
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008604rm -f core conftest.err conftest.$ac_objext \
8605 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606fi
8607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
8609fi
8610
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008611
Michael W. Hudson54241132001-12-07 15:38:26 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8614$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008615if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008617else
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008619LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623/* Override any GCC internal prototype to avoid an error.
8624 Use char because int might match the return type of a GCC
8625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626#ifdef __cplusplus
8627extern "C"
8628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008629char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008630int
8631main ()
8632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008634 ;
8635 return 0;
8636}
8637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008640else
Matthias Kloseb9621712010-04-24 17:59:49 +00008641 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643rm -f core conftest.err conftest.$ac_objext \
8644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008645LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8648$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008649if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008651
Martin v. Löwis130fb172001-07-19 11:00:41 +00008652 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008653 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008654 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008655fi
8656
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008657
Neal Norwitza978ab02002-11-02 16:58:05 +00008658 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8660$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008661if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008663else
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008665LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#ifdef __cplusplus
8673extern "C"
8674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008675char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ;
8681 return 0;
8682}
8683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8694$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008695if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008697
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008698 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008699 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008700 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008701fi
8702
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008703 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008704fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008705
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008706if test "$posix_threads" = "yes"; then
8707 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008708
Matthias Kloseb9621712010-04-24 17:59:49 +00008709$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008710
8711 fi
8712
8713 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8714 case $ac_sys_system/$ac_sys_release in
8715 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008716$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008717
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008718 ;;
8719 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008720$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008721
8722 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008723 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008724$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008725
8726 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008727 AIX/6)
8728$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8729
8730 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008731 esac
8732
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8734$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008735 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008739 ac_cv_pthread_system_supported=no
8740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008742/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008743#include <pthread.h>
8744 void *foo(void *parm) {
8745 return NULL;
8746 }
8747 main() {
8748 pthread_attr_t attr;
8749 pthread_t id;
8750 if (pthread_attr_init(&attr)) exit(-1);
8751 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8752 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8753 exit(0);
8754 }
8755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008756if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008757 ac_cv_pthread_system_supported=yes
8758else
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008763fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765
Guido van Rossum627b2d71993-12-24 10:39:16 +00008766fi
8767
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8769$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008770 if test "$ac_cv_pthread_system_supported" = "yes"; then
8771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773
8774 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 for ac_func in pthread_sigmask
8776do :
8777 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008778if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008780#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008781_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008782 case $ac_sys_system in
8783 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008784
Matthias Kloseb9621712010-04-24 17:59:49 +00008785$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008786
8787 ;;
8788 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008789fi
8790done
8791
8792fi
8793
8794
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008795# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8798$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008800if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008802 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008805 ipv6=no
8806 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8808$as_echo "yes" >&6; }
8809 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008810
8811 ipv6=yes
8812 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008814else
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008817
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008820 ipv6=no
8821
8822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008825 /* AF_INET6 available check */
8826#include <sys/types.h>
8827#include <sys/socket.h>
8828main()
8829{
8830 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8831 exit(1);
8832 else
8833 exit(0);
8834}
8835
Martin v. Löwis11437992002-04-12 09:54:03 +00008836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008837if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008838
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8840$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008841 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008843else
Matthias Kloseb159a552010-04-25 21:00:44 +00008844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008847 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008852fi
8853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008855if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8857$as_echo_n "checking if RFC2553 API is available... " >&6; }
8858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008860
8861 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008862#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008863int
8864main ()
8865{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008866struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008867 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ;
8869 return 0;
8870}
Matthias Kloseb159a552010-04-25 21:00:44 +00008871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008873if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008874
8875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008876$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008877 ipv6=yes
8878
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008879else
Matthias Kloseb159a552010-04-25 21:00:44 +00008880
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008882$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008883 ipv6=no
8884
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008887fi
8888
8889if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008891
8892fi
8893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894fi
8895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008896
8897ipv6type=unknown
8898ipv6lib=none
8899ipv6trylibc=no
8900
8901if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8903$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008904 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8905 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008906 case $i in
8907 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008911#include <netinet/in.h>
8912#ifdef IPV6_INRIA_VERSION
8913yes
8914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008918 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008919fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008920rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008921
8922 ;;
8923 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008925/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008927#include <netinet/in.h>
8928#ifdef __KAME__
8929yes
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008934 ipv6type=$i;
8935 ipv6lib=inet6
8936 ipv6libdir=/usr/local/v6/lib
8937 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008938fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008939rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008940
8941 ;;
8942 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008944/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946#include <features.h>
8947#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8948yes
8949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008953 ipv6type=$i;
8954 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008956rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957
8958 ;;
8959 linux-inet6)
8960 if test -d /usr/inet6; then
8961 ipv6type=$i
8962 ipv6lib=inet6
8963 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008964 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008965 fi
8966 ;;
8967 solaris)
8968 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008969 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970 ipv6type=$i
8971 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008972 fi
8973 fi
8974 ;;
8975 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008979#include <sys/param.h>
8980#ifdef _TOSHIBA_INET6
8981yes
8982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008986 ipv6type=$i;
8987 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008988 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008989fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008990rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008991
8992 ;;
8993 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008995/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008996
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008997#include </usr/local/v6/include/sys/v6config.h>
8998#ifdef __V6D__
8999yes
9000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009001_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009003 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009004 ipv6type=$i;
9005 ipv6lib=v6;
9006 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009007 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009010
9011 ;;
9012 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016#include <sys/param.h>
9017#ifdef _ZETA_MINAMI_INET6
9018yes
9019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009023 ipv6type=$i;
9024 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009025 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009026fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009027rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009028
9029 ;;
9030 esac
9031 if test "$ipv6type" != "unknown"; then
9032 break
9033 fi
9034 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9036$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009037fi
9038
9039if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9040 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9041 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9042 echo "using lib$ipv6lib"
9043 else
9044 if test $ipv6trylibc = "yes"; then
9045 echo "using libc"
9046 else
9047 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9048 echo "You need to fetch lib$ipv6lib.a from appropriate"
9049 echo 'ipv6 kit and compile beforehand.'
9050 exit 1
9051 fi
9052 fi
9053fi
9054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9056$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009058/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009059
9060 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009061int
9062main ()
9063{
9064FSIORefNum fRef = 0
9065 ;
9066 return 0;
9067}
Matthias Kloseb159a552010-04-25 21:00:44 +00009068
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009070if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009071
Matthias Kloseb159a552010-04-25 21:00:44 +00009072
Matthias Kloseb9621712010-04-24 17:59:49 +00009073$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9076$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009078else
Matthias Kloseb159a552010-04-25 21:00:44 +00009079
Matthias Kloseb9621712010-04-24 17:59:49 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009082
9083fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9085
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009086# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9088$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009091if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009092 withval=$with_doc_strings;
9093fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009095
9096if test -z "$with_doc_strings"
9097then with_doc_strings="yes"
9098fi
9099if test "$with_doc_strings" != "no"
9100then
9101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009103
9104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9106$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009107
Antoine Pitrou042b1282010-08-13 21:15:58 +00009108# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9110$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009112# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009113if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009115if test "$withval" != no
9116then
9117
Matthias Kloseb9621712010-04-24 17:59:49 +00009118$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9121$as_echo "yes" >&6; }
9122else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9123$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009124fi
9125else
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9127$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009128fi
9129
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009130
9131# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9133$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137 withval=$with_pymalloc;
9138fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009139
Neil Schemenauera35c6882001-02-27 04:45:05 +00009140
Neil Schemenauer16c22972002-03-22 15:34:49 +00009141if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009142then
9143 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009144 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009145fi
9146if test "$with_pymalloc" != "no"
9147then
Martin v. Löwis11437992002-04-12 09:54:03 +00009148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009150
9151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9153$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009154
Benjamin Peterson05159c42009-12-03 03:01:27 +00009155# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9157$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009158
9159# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009160if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009161 withval=$with_valgrind;
9162else
9163 with_valgrind=no
9164fi
9165
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9167$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009168if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009169 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009170if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009171
Matthias Kloseb9621712010-04-24 17:59:49 +00009172$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009173
9174else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009175 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009176
9177fi
9178
9179
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009180 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009181fi
9182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009183# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009184
Guido van Rossum98935bf2001-09-05 19:13:16 +00009185DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009186
Guido van Rossume97ee181999-12-20 21:27:22 +00009187# the dlopen() function means we might want to use dynload_shlib.o. some
9188# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009189for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009190do :
9191 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009192if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009194#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009195_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009196
Guido van Rossume97ee181999-12-20 21:27:22 +00009197fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009198done
Guido van Rossume97ee181999-12-20 21:27:22 +00009199
Michael W. Hudson54241132001-12-07 15:38:26 +00009200
Guido van Rossume97ee181999-12-20 21:27:22 +00009201# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9202# loading of modules.
9203
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9205$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009206if test -z "$DYNLOADFILE"
9207then
9208 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009209 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9210 if test "$ac_cv_func_dlopen" = yes
9211 then DYNLOADFILE="dynload_shlib.o"
9212 else DYNLOADFILE="dynload_aix.o"
9213 fi
9214 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009215 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009216 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9217 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009218 *)
9219 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9220 # out any dynamic loading
9221 if test "$ac_cv_func_dlopen" = yes
9222 then DYNLOADFILE="dynload_shlib.o"
9223 else DYNLOADFILE="dynload_stub.o"
9224 fi
9225 ;;
9226 esac
9227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9229$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009230if test "$DYNLOADFILE" != "dynload_stub.o"
9231then
Martin v. Löwis11437992002-04-12 09:54:03 +00009232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009234
9235fi
9236
Neil Schemenauer4e425612001-06-19 15:44:15 +00009237# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9238
Michael W. Hudson54241132001-12-07 15:38:26 +00009239
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9241$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009242if test -z "$MACHDEP_OBJS"
9243then
Jack Jansene578a632001-08-15 01:27:14 +00009244 MACHDEP_OBJS=$extra_machdep_objs
9245else
9246 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9249$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009250
Guido van Rossum627b2d71993-12-24 10:39:16 +00009251# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009252for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009253 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
9254 fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009255 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009256 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009257 initgroups kill killpg lchmod lchown linkat lstat mbrtowc mkdirat mkfifo \
9258 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
9259 pthread_init putenv readlink readlinkat realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009260 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009261 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009262 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009263 sigaction siginterrupt sigrelse snprintf strftime strlcpy symlinkat \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009264 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009265 truncate uname unlinkat unsetenv utimensat utimes waitpid wait3 wait4 \
Martin v. Löwis113a0852009-05-29 17:25:39 +00009266 wcscoll wcsftime wcsxfrm _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009267do :
9268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9269ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009270if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009272#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009275fi
9276done
9277
Michael W. Hudson54241132001-12-07 15:38:26 +00009278
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009279# For some functions, having a definition is not sufficient, since
9280# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9282$as_echo_n "checking for chroot... " >&6; }
9283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009285#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009286int
9287main ()
9288{
9289void *x=chroot
9290 ;
9291 return 0;
9292}
9293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009297
Matthias Kloseb159a552010-04-25 21:00:44 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009299$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009300else
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009303
9304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9307$as_echo_n "checking for link... " >&6; }
9308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009309/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009310#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311int
9312main ()
9313{
9314void *x=link
9315 ;
9316 return 0;
9317}
9318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009320
Matthias Kloseb9621712010-04-24 17:59:49 +00009321$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009322
Matthias Kloseb159a552010-04-25 21:00:44 +00009323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009324$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009325else
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9327$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328
9329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9332$as_echo_n "checking for symlink... " >&6; }
9333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009334/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009335#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336int
9337main ()
9338{
9339void *x=symlink
9340 ;
9341 return 0;
9342}
9343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009347
Matthias Kloseb159a552010-04-25 21:00:44 +00009348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009349$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009350else
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353
9354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9357$as_echo_n "checking for fchdir... " >&6; }
9358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009360#include <unistd.h>
9361int
9362main ()
9363{
9364void *x=fchdir
9365 ;
9366 return 0;
9367}
9368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009370
Matthias Kloseb9621712010-04-24 17:59:49 +00009371$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009372
Matthias Kloseb159a552010-04-25 21:00:44 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009374$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009375else
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009378
9379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9382$as_echo_n "checking for fsync... " >&6; }
9383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009385#include <unistd.h>
9386int
9387main ()
9388{
9389void *x=fsync
9390 ;
9391 return 0;
9392}
9393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009395
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009397
Matthias Kloseb159a552010-04-25 21:00:44 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009399$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009400else
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009403
9404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9407$as_echo_n "checking for fdatasync... " >&6; }
9408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009409/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009410#include <unistd.h>
9411int
9412main ()
9413{
9414void *x=fdatasync
9415 ;
9416 return 0;
9417}
9418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009420
Matthias Kloseb9621712010-04-24 17:59:49 +00009421$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009422
Matthias Kloseb159a552010-04-25 21:00:44 +00009423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009424$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009425else
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9427$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428
9429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9432$as_echo_n "checking for epoll... " >&6; }
9433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009434/* end confdefs.h. */
9435#include <sys/epoll.h>
9436int
9437main ()
9438{
9439void *x=epoll_create
9440 ;
9441 return 0;
9442}
9443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009447
Matthias Kloseb159a552010-04-25 21:00:44 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009449$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009450else
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9452$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009453
9454fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9457$as_echo_n "checking for kqueue... " >&6; }
9458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009459/* end confdefs.h. */
9460
9461#include <sys/types.h>
9462#include <sys/event.h>
9463
9464int
9465main ()
9466{
9467int x=kqueue()
9468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009473
Matthias Kloseb9621712010-04-24 17:59:49 +00009474$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009475
Matthias Kloseb159a552010-04-25 21:00:44 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009477$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009478else
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009481
9482fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009484# On some systems (eg. FreeBSD 5), we would find a definition of the
9485# functions ctermid_r, setgroups in the library, but no prototype
9486# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9487# address to avoid compiler warnings and potential miscompilations
9488# because of the missing prototypes.
9489
Matthias Kloseb9621712010-04-24 17:59:49 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9491$as_echo_n "checking for ctermid_r... " >&6; }
9492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009493/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009494
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495#include <stdio.h>
9496
Martin v. Löwisd5843682002-11-21 20:41:28 +00009497int
9498main ()
9499{
9500void* p = ctermid_r
9501 ;
9502 return 0;
9503}
9504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009506
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009508
Matthias Kloseb159a552010-04-25 21:00:44 +00009509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009510$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009511else
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009514
9515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9517
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9519$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009520if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009521 $as_echo_n "(cached) " >&6
9522else
9523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009525#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009526int
9527main ()
9528{
9529void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009530
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009531 ;
9532 return 0;
9533}
9534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009535if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009536 ac_cv_flock_decl=yes
9537else
9538 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009539
9540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009542
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009543fi
9544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9545$as_echo "$ac_cv_flock_decl" >&6; }
9546if test "x${ac_cv_flock_decl}" = xyes; then
9547 for ac_func in flock
9548do :
9549 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009550if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009551 cat >>confdefs.h <<_ACEOF
9552#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009553_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009554
Antoine Pitroua3000072010-09-07 14:52:42 +00009555else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009557$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009558if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009559 $as_echo_n "(cached) " >&6
9560else
9561 ac_check_lib_save_LIBS=$LIBS
9562LIBS="-lbsd $LIBS"
9563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9564/* end confdefs.h. */
9565
9566/* Override any GCC internal prototype to avoid an error.
9567 Use char because int might match the return type of a GCC
9568 builtin and then its argument prototype would still apply. */
9569#ifdef __cplusplus
9570extern "C"
9571#endif
9572char flock ();
9573int
9574main ()
9575{
9576return flock ();
9577 ;
9578 return 0;
9579}
9580_ACEOF
9581if ac_fn_c_try_link "$LINENO"; then :
9582 ac_cv_lib_bsd_flock=yes
9583else
9584 ac_cv_lib_bsd_flock=no
9585fi
9586rm -f core conftest.err conftest.$ac_objext \
9587 conftest$ac_exeext conftest.$ac_ext
9588LIBS=$ac_check_lib_save_LIBS
9589fi
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9591$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009592if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009593 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009594
9595
9596$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9597
9598
9599fi
9600
9601
9602fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009603done
9604
Antoine Pitroua3000072010-09-07 14:52:42 +00009605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9608$as_echo_n "checking for getpagesize... " >&6; }
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009611
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612#include <unistd.h>
9613
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009614int
9615main ()
9616{
9617void* p = getpagesize
9618 ;
9619 return 0;
9620}
9621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009622if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009625
Matthias Kloseb159a552010-04-25 21:00:44 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009628else
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9630$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009631
9632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009634
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009635for ac_prog in true
9636do
9637 # Extract the first word of "$ac_prog", so it can be a program name with args.
9638set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009641if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009643else
9644 if test -n "$TRUE"; then
9645 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9646else
9647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648for as_dir in $PATH
9649do
9650 IFS=$as_save_IFS
9651 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653 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 +00009654 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009655 $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 +00009656 break 2
9657 fi
9658done
Matthias Kloseb9621712010-04-24 17:59:49 +00009659 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009660IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009661
9662fi
9663fi
9664TRUE=$ac_cv_prog_TRUE
9665if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9667$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009668else
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9670$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009671fi
9672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009673
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009674 test -n "$TRUE" && break
9675done
9676test -n "$TRUE" || TRUE="/bin/true"
9677
9678
Matthias Kloseb9621712010-04-24 17:59:49 +00009679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9680$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009681if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009683else
9684 ac_check_lib_save_LIBS=$LIBS
9685LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009687/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689/* Override any GCC internal prototype to avoid an error.
9690 Use char because int might match the return type of a GCC
9691 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009692#ifdef __cplusplus
9693extern "C"
9694#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009695char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009696int
9697main ()
9698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009700 ;
9701 return 0;
9702}
9703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009705 ac_cv_lib_c_inet_aton=yes
9706else
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009709rm -f core conftest.err conftest.$ac_objext \
9710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009711LIBS=$ac_check_lib_save_LIBS
9712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9714$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009715if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009716 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009717else
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9719$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009720if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009722else
9723 ac_check_lib_save_LIBS=$LIBS
9724LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009726/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728/* Override any GCC internal prototype to avoid an error.
9729 Use char because int might match the return type of a GCC
9730 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009731#ifdef __cplusplus
9732extern "C"
9733#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009734char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009735int
9736main ()
9737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009739 ;
9740 return 0;
9741}
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009744 ac_cv_lib_resolv_inet_aton=yes
9745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core conftest.err conftest.$ac_objext \
9749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009750LIBS=$ac_check_lib_save_LIBS
9751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9753$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009754if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009755 cat >>confdefs.h <<_ACEOF
9756#define HAVE_LIBRESOLV 1
9757_ACEOF
9758
9759 LIBS="-lresolv $LIBS"
9760
9761fi
9762
9763
9764fi
9765
9766
Christian Heimesd0764e22007-12-04 15:00:33 +00009767# On Tru64, chflags seems to be present, but calling it will
9768# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9770$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009771if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009773else
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009775 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009776else
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009778/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009779[
Christian Heimesd0764e22007-12-04 15:00:33 +00009780#include <sys/stat.h>
9781#include <unistd.h>
9782int main(int argc, char*argv[])
9783{
9784 if(chflags(argv[0], 0) != 0)
9785 return 1;
9786 return 0;
9787}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009788]
Christian Heimesd0764e22007-12-04 15:00:33 +00009789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009791 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009792else
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009797fi
9798
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009799
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9802$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009803if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009805if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009806 ac_cv_have_chflags="yes"
9807else
9808 ac_cv_have_chflags="no"
9809fi
9810
9811fi
9812if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009815
9816fi
9817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9819$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009820if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009822else
Matthias Kloseb9621712010-04-24 17:59:49 +00009823 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009824 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009825else
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009827/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009828[
Christian Heimesd0764e22007-12-04 15:00:33 +00009829#include <sys/stat.h>
9830#include <unistd.h>
9831int main(int argc, char*argv[])
9832{
9833 if(lchflags(argv[0], 0) != 0)
9834 return 1;
9835 return 0;
9836}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009837]
Christian Heimesd0764e22007-12-04 15:00:33 +00009838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009839if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009840 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009841else
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009846fi
9847
9848
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9851$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009852if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009854if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009855 ac_cv_have_lchflags="yes"
9856else
9857 ac_cv_have_lchflags="no"
9858fi
9859
9860fi
9861if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009862
Matthias Kloseb9621712010-04-24 17:59:49 +00009863$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009864
9865fi
9866
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009867case $ac_sys_system/$ac_sys_release in
9868Darwin/*)
9869 _CUR_CFLAGS="${CFLAGS}"
9870 _CUR_LDFLAGS="${LDFLAGS}"
9871 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9872 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9873 ;;
9874esac
9875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9877$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009878if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009880else
9881 ac_check_lib_save_LIBS=$LIBS
9882LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009884/* end confdefs.h. */
9885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886/* Override any GCC internal prototype to avoid an error.
9887 Use char because int might match the return type of a GCC
9888 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009889#ifdef __cplusplus
9890extern "C"
9891#endif
9892char inflateCopy ();
9893int
9894main ()
9895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009897 ;
9898 return 0;
9899}
9900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009902 ac_cv_lib_z_inflateCopy=yes
9903else
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009908LIBS=$ac_check_lib_save_LIBS
9909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9911$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009912if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009915
9916fi
9917
9918
9919case $ac_sys_system/$ac_sys_release in
9920Darwin/*)
9921 CFLAGS="${_CUR_CFLAGS}"
9922 LDFLAGS="${_CUR_LDFLAGS}"
9923 ;;
9924esac
9925
Matthias Kloseb9621712010-04-24 17:59:49 +00009926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9927$as_echo_n "checking for hstrerror... " >&6; }
9928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009930
Martin v. Löwise9416172003-05-03 10:12:45 +00009931#include <netdb.h>
9932
Martin v. Löwise9416172003-05-03 10:12:45 +00009933int
9934main ()
9935{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009936void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009937 ;
9938 return 0;
9939}
9940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009942
Matthias Kloseb9621712010-04-24 17:59:49 +00009943$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009944
Matthias Kloseb159a552010-04-25 21:00:44 +00009945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009947else
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009950
9951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952rm -f core conftest.err conftest.$ac_objext \
9953 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9956$as_echo_n "checking for inet_aton... " >&6; }
9957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009958/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009959
Martin v. Löwis86d66262006-02-17 08:40:11 +00009960#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009961#include <sys/socket.h>
9962#include <netinet/in.h>
9963#include <arpa/inet.h>
9964
Martin v. Löwise9416172003-05-03 10:12:45 +00009965int
9966main ()
9967{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009968void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009979else
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009982
9983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009984rm -f core conftest.err conftest.$ac_objext \
9985 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9988$as_echo_n "checking for inet_pton... " >&6; }
9989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009990/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009991
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009992#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009993#include <sys/socket.h>
9994#include <netinet/in.h>
9995#include <arpa/inet.h>
9996
Martin v. Löwise9416172003-05-03 10:12:45 +00009997int
9998main ()
9999{
10000void* p = inet_pton
10001 ;
10002 return 0;
10003}
10004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010008
Matthias Kloseb159a552010-04-25 21:00:44 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010011else
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010014
10015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010017
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010018# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10020$as_echo_n "checking for setgroups... " >&6; }
10021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010023
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010024#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010025#ifdef HAVE_GRP_H
10026#include <grp.h>
10027#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010028
Martin v. Löwisd5843682002-11-21 20:41:28 +000010029int
10030main ()
10031{
10032void* p = setgroups
10033 ;
10034 return 0;
10035}
10036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010037if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010038
Matthias Kloseb9621712010-04-24 17:59:49 +000010039$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010040
Matthias Kloseb159a552010-04-25 21:00:44 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010042$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010043else
Matthias Kloseb9621712010-04-24 17:59:49 +000010044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010046
10047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010050# check for openpty and forkpty
10051
10052for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010053do :
10054 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010055if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010057#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010058_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010059
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010060else
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10062$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010063if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010065else
Martin v. Löwis11437992002-04-12 09:54:03 +000010066 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010067LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010071/* Override any GCC internal prototype to avoid an error.
10072 Use char because int might match the return type of a GCC
10073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010074#ifdef __cplusplus
10075extern "C"
10076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010077char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010078int
10079main ()
10080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010082 ;
10083 return 0;
10084}
10085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010088else
Matthias Kloseb9621712010-04-24 17:59:49 +000010089 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010091rm -f core conftest.err conftest.$ac_objext \
10092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010093LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10096$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010097if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010099 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010100else
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10102$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010103if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010105else
10106 ac_check_lib_save_LIBS=$LIBS
10107LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010109/* end confdefs.h. */
10110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111/* Override any GCC internal prototype to avoid an error.
10112 Use char because int might match the return type of a GCC
10113 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010114#ifdef __cplusplus
10115extern "C"
10116#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010117char openpty ();
10118int
10119main ()
10120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010122 ;
10123 return 0;
10124}
10125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010127 ac_cv_lib_bsd_openpty=yes
10128else
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010131rm -f core conftest.err conftest.$ac_objext \
10132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010133LIBS=$ac_check_lib_save_LIBS
10134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10136$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010137if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010139 LIBS="$LIBS -lbsd"
10140fi
10141
10142
10143fi
10144
Fred Drake8cef4cf2000-06-28 16:40:38 +000010145
10146fi
10147done
10148
10149for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010150do :
10151 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010152if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010154#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010156
Fred Drake8cef4cf2000-06-28 16:40:38 +000010157else
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10159$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010160if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010161 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010162else
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010164LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010168/* Override any GCC internal prototype to avoid an error.
10169 Use char because int might match the return type of a GCC
10170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010171#ifdef __cplusplus
10172extern "C"
10173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010174char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010175int
10176main ()
10177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 ;
10180 return 0;
10181}
10182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010185else
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188rm -f core conftest.err conftest.$ac_objext \
10189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010190LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10193$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010194if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010196 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010197else
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10199$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010200if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010202else
10203 ac_check_lib_save_LIBS=$LIBS
10204LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010206/* end confdefs.h. */
10207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208/* Override any GCC internal prototype to avoid an error.
10209 Use char because int might match the return type of a GCC
10210 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010211#ifdef __cplusplus
10212extern "C"
10213#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010214char forkpty ();
10215int
10216main ()
10217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010218return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010219 ;
10220 return 0;
10221}
10222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010224 ac_cv_lib_bsd_forkpty=yes
10225else
Matthias Kloseb9621712010-04-24 17:59:49 +000010226 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010228rm -f core conftest.err conftest.$ac_objext \
10229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010230LIBS=$ac_check_lib_save_LIBS
10231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10233$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010234if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010236 LIBS="$LIBS -lbsd"
10237fi
10238
10239
10240fi
10241
Fred Drake8cef4cf2000-06-28 16:40:38 +000010242
10243fi
10244done
10245
Jack Jansendd19cf82001-12-06 22:36:17 +000010246
Christian Heimesb186d002008-03-18 15:15:01 +000010247# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010248for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010249do :
10250 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010251if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010252 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010253#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010254_ACEOF
10255
10256fi
10257done
10258
10259
Michael W. Hudson54241132001-12-07 15:38:26 +000010260# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010261for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010262do :
10263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10264ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010265if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010269
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010270fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010271done
10272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010274ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10275if test "x$ac_cv_func_dup2" = xyes; then :
10276 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010277
Martin v. Löwis1142de32002-03-29 16:28:31 +000010278else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010280 *" dup2.$ac_objext "* ) ;;
10281 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010283esac
10284
Martin v. Löwis1142de32002-03-29 16:28:31 +000010285fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010286
10287ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10288if test "x$ac_cv_func_getcwd" = xyes; then :
10289 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10290
10291else
10292 case " $LIBOBJS " in
10293 *" getcwd.$ac_objext "* ) ;;
10294 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10295 ;;
10296esac
10297
10298fi
10299
10300ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10301if test "x$ac_cv_func_strdup" = xyes; then :
10302 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10303
10304else
10305 case " $LIBOBJS " in
10306 *" strdup.$ac_objext "* ) ;;
10307 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10308 ;;
10309esac
10310
10311fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010312
10313
10314for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010315do :
10316 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010317if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010319#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010323#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010324int
10325main ()
10326{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010327getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ;
10329 return 0;
10330}
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010335
Guido van Rossum627b2d71993-12-24 10:39:16 +000010336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010338
Guido van Rossum627b2d71993-12-24 10:39:16 +000010339fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010340done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010341
Jack Jansen150753c2003-03-29 22:07:47 +000010342for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010343do :
10344 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010345if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010346 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010347#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010350/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010351#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010352int
10353main ()
10354{
10355setpgrp(0,0);
10356 ;
10357 return 0;
10358}
10359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010361
Matthias Kloseb9621712010-04-24 17:59:49 +000010362$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010363
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010366
10367fi
10368done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010369
Thomas Wouters3a584202000-08-05 23:28:51 +000010370for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010371do :
10372 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010373if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010374 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010375#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010378/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010379#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010380int
10381main ()
10382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010383gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388if ac_fn_c_try_compile "$LINENO"; then :
10389
Guido van Rossum627b2d71993-12-24 10:39:16 +000010390else
Skip Montanaro6dead952003-09-25 14:50:04 +000010391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010393
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Guido van Rossum627b2d71993-12-24 10:39:16 +000010395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010398fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010399done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010400
Michael W. Hudson54241132001-12-07 15:38:26 +000010401
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10403$as_echo_n "checking for major... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010406
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010407#if defined(MAJOR_IN_MKDEV)
10408#include <sys/mkdev.h>
10409#elif defined(MAJOR_IN_SYSMACROS)
10410#include <sys/sysmacros.h>
10411#else
10412#include <sys/types.h>
10413#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010414
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010415int
10416main ()
10417{
10418
10419 makedev(major(0),minor(0));
10420
10421 ;
10422 return 0;
10423}
10424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010426
10427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010429
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10431$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010432
10433else
Skip Montanaro6dead952003-09-25 14:50:04 +000010434
Matthias Kloseb9621712010-04-24 17:59:49 +000010435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010437
10438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010439rm -f core conftest.err conftest.$ac_objext \
10440 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010441
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010442# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010443# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10445$as_echo_n "checking for getaddrinfo... " >&6; }
10446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010448
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010449#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010450#include <sys/socket.h>
10451#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010452#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010453
Martin v. Löwis11437992002-04-12 09:54:03 +000010454int
10455main ()
10456{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010457getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ;
10459 return 0;
10460}
10461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010462if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010463 have_getaddrinfo=yes
10464else
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467rm -f core conftest.err conftest.$ac_objext \
10468 conftest$ac_exeext conftest.$ac_ext
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10470$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010471if test $have_getaddrinfo = yes
10472then
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10474$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010475 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010477else
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010479 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010480else
Matthias Kloseb9621712010-04-24 17:59:49 +000010481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010483
10484#include <sys/types.h>
10485#include <netdb.h>
10486#include <string.h>
10487#include <sys/socket.h>
10488#include <netinet/in.h>
10489
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010490int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010491{
10492 int passive, gaierr, inet4 = 0, inet6 = 0;
10493 struct addrinfo hints, *ai, *aitop;
10494 char straddr[INET6_ADDRSTRLEN], strport[16];
10495
10496 for (passive = 0; passive <= 1; passive++) {
10497 memset(&hints, 0, sizeof(hints));
10498 hints.ai_family = AF_UNSPEC;
10499 hints.ai_flags = passive ? AI_PASSIVE : 0;
10500 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010501 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010502 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10503 (void)gai_strerror(gaierr);
10504 goto bad;
10505 }
10506 for (ai = aitop; ai; ai = ai->ai_next) {
10507 if (ai->ai_addr == NULL ||
10508 ai->ai_addrlen == 0 ||
10509 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10510 straddr, sizeof(straddr), strport, sizeof(strport),
10511 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10512 goto bad;
10513 }
10514 switch (ai->ai_family) {
10515 case AF_INET:
10516 if (strcmp(strport, "54321") != 0) {
10517 goto bad;
10518 }
10519 if (passive) {
10520 if (strcmp(straddr, "0.0.0.0") != 0) {
10521 goto bad;
10522 }
10523 } else {
10524 if (strcmp(straddr, "127.0.0.1") != 0) {
10525 goto bad;
10526 }
10527 }
10528 inet4++;
10529 break;
10530 case AF_INET6:
10531 if (strcmp(strport, "54321") != 0) {
10532 goto bad;
10533 }
10534 if (passive) {
10535 if (strcmp(straddr, "::") != 0) {
10536 goto bad;
10537 }
10538 } else {
10539 if (strcmp(straddr, "::1") != 0) {
10540 goto bad;
10541 }
10542 }
10543 inet6++;
10544 break;
10545 case AF_UNSPEC:
10546 goto bad;
10547 break;
10548 default:
10549 /* another family support? */
10550 break;
10551 }
10552 }
10553 }
10554
10555 if (!(inet4 == 0 || inet4 == 2))
10556 goto bad;
10557 if (!(inet6 == 0 || inet6 == 2))
10558 goto bad;
10559
10560 if (aitop)
10561 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010562 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010563
10564 bad:
10565 if (aitop)
10566 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010567 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010568}
10569
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010571if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010572 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010580fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010581
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10585$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10586
Mark Dickinson2df5d282009-12-31 21:22:50 +000010587if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010588then
10589 if test $ipv6 = yes
10590 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010591 echo 'Fatal: You must get working getaddrinfo() function.'
10592 echo ' or you can specify "--disable-ipv6"'.
10593 exit 1
10594 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010595else
Martin v. Löwis11437992002-04-12 09:54:03 +000010596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010598
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010599fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010600
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010601for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010602do :
10603 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010604if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010606#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010608
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010609fi
10610done
10611
Michael W. Hudson54241132001-12-07 15:38:26 +000010612
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010613# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10615$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010616if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010618else
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010620/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010621#include <sys/types.h>
10622#include <sys/time.h>
10623#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010624
Martin v. Löwis11437992002-04-12 09:54:03 +000010625int
10626main ()
10627{
10628if ((struct tm *) 0)
10629return 0;
10630 ;
10631 return 0;
10632}
10633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010634if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010635 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010636else
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10642$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010643if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010646
10647fi
10648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10650$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010651if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010656#include <sys/types.h>
10657#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Martin v. Löwis11437992002-04-12 09:54:03 +000010659int
10660main ()
10661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662struct tm tm;
10663 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010665 ;
10666 return 0;
10667}
10668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010670 ac_cv_struct_tm=time.h
10671else
Matthias Kloseb9621712010-04-24 17:59:49 +000010672 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10677$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010678if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Matthias Kloseb9621712010-04-24 17:59:49 +000010680$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010681
10682fi
10683
Matthias Kloseb9621712010-04-24 17:59:49 +000010684ac_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 +000010685#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686
Matthias Kloseb9621712010-04-24 17:59:49 +000010687"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010688if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010689
10690cat >>confdefs.h <<_ACEOF
10691#define HAVE_STRUCT_TM_TM_ZONE 1
10692_ACEOF
10693
10694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010696
Martin v. Löwis11437992002-04-12 09:54:03 +000010697if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010700
10701else
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10703"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010704if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706else
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708fi
10709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712_ACEOF
10713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10715$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010716if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718else
Matthias Kloseb9621712010-04-24 17:59:49 +000010719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010720/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010721#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722#if !HAVE_DECL_TZNAME
10723extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010725
Martin v. Löwis11437992002-04-12 09:54:03 +000010726int
10727main ()
10728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ;
10731 return 0;
10732}
10733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010735 ac_cv_var_tzname=yes
10736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010739rm -f core conftest.err conftest.$ac_objext \
10740 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10743$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010744 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010745
Matthias Kloseb9621712010-04-24 17:59:49 +000010746$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010748 fi
10749fi
10750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010752if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
10754cat >>confdefs.h <<_ACEOF
10755#define HAVE_STRUCT_STAT_ST_RDEV 1
10756_ACEOF
10757
10758
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010759fi
10760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010762if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010763
Martin v. Löwis11437992002-04-12 09:54:03 +000010764cat >>confdefs.h <<_ACEOF
10765#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10766_ACEOF
10767
10768
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010769fi
10770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010772if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010773
10774cat >>confdefs.h <<_ACEOF
10775#define HAVE_STRUCT_STAT_ST_FLAGS 1
10776_ACEOF
10777
10778
10779fi
10780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010782if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010783
10784cat >>confdefs.h <<_ACEOF
10785#define HAVE_STRUCT_STAT_ST_GEN 1
10786_ACEOF
10787
10788
10789fi
10790
Matthias Kloseb9621712010-04-24 17:59:49 +000010791ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010792if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010793
10794cat >>confdefs.h <<_ACEOF
10795#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10796_ACEOF
10797
10798
10799fi
10800
Matthias Kloseb9621712010-04-24 17:59:49 +000010801ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010802if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010803
Martin v. Löwis11437992002-04-12 09:54:03 +000010804cat >>confdefs.h <<_ACEOF
10805#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10806_ACEOF
10807
10808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010810
10811else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010813 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010814 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10815 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010816esac
10817
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010818fi
10819
Michael W. Hudson54241132001-12-07 15:38:26 +000010820
Martin v. Löwis11437992002-04-12 09:54:03 +000010821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10823$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010824if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010826else
Matthias Kloseb159a552010-04-25 21:00:44 +000010827
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010830#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010831int
10832main ()
10833{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010834return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010835 ;
10836 return 0;
10837}
10838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010840 ac_cv_header_time_altzone=yes
10841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010843fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846fi
10847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10849$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010853
10854fi
10855
Guido van Rossumda88dad1995-01-26 00:46:29 +000010856was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10858$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010861
10862#include <sys/types.h>
10863#include <sys/select.h>
10864#include <sys/time.h>
10865
Martin v. Löwis11437992002-04-12 09:54:03 +000010866int
10867main ()
10868{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010869;
Martin v. Löwis11437992002-04-12 09:54:03 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010875
10876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010878
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010879 was_it_defined=yes
10880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10884$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10887$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010888if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010892/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010893#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010894int
10895main ()
10896{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010897struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010898 ;
10899 return 0;
10900}
10901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010902if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010903 ac_cv_struct_addrinfo=yes
10904else
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10908fi
10909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10911$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010912if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010915
10916fi
10917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10919$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010920if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010922else
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010925
10926# include <sys/types.h>
10927# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010928int
10929main ()
10930{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010931struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010932 ;
10933 return 0;
10934}
10935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010937 ac_cv_struct_sockaddr_storage=yes
10938else
Matthias Kloseb9621712010-04-24 17:59:49 +000010939 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10942fi
10943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10945$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010946if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010949
10950fi
10951
Guido van Rossum627b2d71993-12-24 10:39:16 +000010952# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10955$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010956if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010961$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010962int
10963main ()
10964{
10965static int test_array [1 - 2 * !(((char) -1) < 0)];
10966test_array [0] = 0
10967
10968 ;
10969 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010970}
Martin v. Löwis11437992002-04-12 09:54:03 +000010971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010973 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010974else
Matthias Kloseb9621712010-04-24 17:59:49 +000010975 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10980$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010981if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010983
10984fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10987$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010988if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010990else
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993
Martin v. Löwis11437992002-04-12 09:54:03 +000010994int
10995main ()
10996{
10997/* FIXME: Include the comments suggested by Paul. */
10998#ifndef __cplusplus
10999 /* Ultrix mips cc rejects this. */
11000 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003 char const *const *pcpcc;
11004 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 /* NEC SVR4.0.2 mips cc rejects this. */
11006 struct point {int x, y;};
11007 static struct point const zero = {0,0};
11008 /* AIX XL C 1.02.0.0 rejects this.
11009 It does not let you subtract one const X* pointer from another in
11010 an arm of an if-expression whose if-part is not a constant
11011 expression */
11012 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011014 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011015 ++pcpcc;
11016 ppc = (char**) pcpcc;
11017 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011018 { /* SCO 3.2v4 cc rejects this. */
11019 char *t;
11020 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011021
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011024 }
11025 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11026 int x[] = {25, 17};
11027 const int *foo = &x[0];
11028 ++foo;
11029 }
11030 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11031 typedef const int *iptr;
11032 iptr p = 0;
11033 ++p;
11034 }
11035 { /* AIX XL C 1.02.0.0 rejects this saying
11036 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11037 struct s { int j; const int *ap[3]; };
11038 struct s *b; b->j = 5;
11039 }
11040 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11041 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011043 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011045#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011046
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 ;
11048 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011049}
Martin v. Löwis11437992002-04-12 09:54:03 +000011050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011052 ac_cv_c_const=yes
11053else
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11059$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011063
11064fi
11065
Michael W. Hudson54241132001-12-07 15:38:26 +000011066
Guido van Rossumda88dad1995-01-26 00:46:29 +000011067works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11069$as_echo_n "checking for working volatile... " >&6; }
11070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011072
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011076volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 ;
11078 return 0;
11079}
11080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011082 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011083else
Skip Montanaro6dead952003-09-25 14:50:04 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011087
Guido van Rossum627b2d71993-12-24 10:39:16 +000011088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11091$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011092
Guido van Rossumda88dad1995-01-26 00:46:29 +000011093works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11095$as_echo_n "checking for working signed char... " >&6; }
11096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011097/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011098
Martin v. Löwis11437992002-04-12 09:54:03 +000011099int
11100main ()
11101{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011102signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 ;
11104 return 0;
11105}
11106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011107if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011108 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011109else
Skip Montanaro6dead952003-09-25 14:50:04 +000011110
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011112
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011113
Guido van Rossum7f43da71994-08-01 12:15:30 +000011114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11117$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011118
Guido van Rossumda88dad1995-01-26 00:46:29 +000011119have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11121$as_echo_n "checking for prototypes... " >&6; }
11122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011123/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011124int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011128return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Matthias Kloseb9621712010-04-24 17:59:49 +000011135$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
Matthias Kloseb159a552010-04-25 21:00:44 +000011137 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11141$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011142
Guido van Rossumda88dad1995-01-26 00:46:29 +000011143works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11145$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011148
11149#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011150int foo(int x, ...) {
11151 va_list va;
11152 va_start(va, x);
11153 va_arg(va, int);
11154 va_arg(va, char *);
11155 va_arg(va, double);
11156 return 0;
11157}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011158
Martin v. Löwis11437992002-04-12 09:54:03 +000011159int
11160main ()
11161{
Guido van Rossum90eea071996-08-30 20:58:57 +000011162return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011163 ;
11164 return 0;
11165}
11166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011168
11169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011171
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011172 works=yes
11173
Guido van Rossum627b2d71993-12-24 10:39:16 +000011174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11177$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011178
Martin v. Löwisd6320502004-08-12 13:45:08 +000011179# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11181$as_echo_n "checking for socketpair... " >&6; }
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011183/* end confdefs.h. */
11184
11185#include <sys/types.h>
11186#include <sys/socket.h>
11187
11188int
11189main ()
11190{
11191void *x=socketpair
11192 ;
11193 return 0;
11194}
11195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011197
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011199
Matthias Kloseb159a552010-04-25 21:00:44 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011201$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011202else
Matthias Kloseb9621712010-04-24 17:59:49 +000011203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11204$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011205
11206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011208
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011209# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11211$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011214#include <sys/types.h>
11215#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011216int
11217main ()
11218{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219struct sockaddr x;
11220x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011221 ;
11222 return 0;
11223}
11224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011225if ac_fn_c_try_compile "$LINENO"; then :
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11227$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
Matthias Kloseb9621712010-04-24 17:59:49 +000011229$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011230
11231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011234
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011237
Guido van Rossumda88dad1995-01-26 00:46:29 +000011238va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11240$as_echo_n "checking whether va_list is an array... " >&6; }
11241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243
11244#ifdef HAVE_STDARG_PROTOTYPES
11245#include <stdarg.h>
11246#else
11247#include <varargs.h>
11248#endif
11249
Martin v. Löwis11437992002-04-12 09:54:03 +000011250int
11251main ()
11252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011253va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258if ac_fn_c_try_compile "$LINENO"; then :
11259
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011260else
Skip Montanaro6dead952003-09-25 14:50:04 +000011261
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011264
Guido van Rossumda88dad1995-01-26 00:46:29 +000011265 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011266
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11270$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011271
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011272# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011273
11274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011276if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11281$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011282 OLD_CFLAGS=$CFLAGS
11283 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011286
11287# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Martin v. Löwis11437992002-04-12 09:54:03 +000011289int
11290main ()
11291{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011292
11293 char *name;
11294 struct hostent *he, *res;
11295 char buffer[2048];
11296 int buflen = 2048;
11297 int h_errnop;
11298
11299 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011300
11301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11313$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011314
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011315else
Skip Montanaro6dead952003-09-25 14:50:04 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11320$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011323
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011329
11330 char *name;
11331 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011332 char buffer[2048];
11333 int buflen = 2048;
11334 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011335
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
11338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346
Matthias Kloseb159a552010-04-25 21:00:44 +000011347$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11350$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011352else
Skip Montanaro6dead952003-09-25 14:50:04 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11357$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359/* end confdefs.h. */
11360
11361# include <netdb.h>
11362
11363int
11364main ()
11365{
11366
11367 char *name;
11368 struct hostent *he;
11369 struct hostent_data data;
11370
11371 (void) gethostbyname_r(name, he, &data);
11372
11373 ;
11374 return 0;
11375}
11376_ACEOF
11377if ac_fn_c_try_compile "$LINENO"; then :
11378
11379 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11380
11381
11382$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11383
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11385$as_echo "yes" >&6; }
11386
11387else
11388
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11390$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011394
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011397
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011400 CFLAGS=$OLD_CFLAGS
11401
11402else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 for ac_func in gethostbyname
11405do :
11406 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011407if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011410_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011411
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011413done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011414
Michael W. Hudson54241132001-12-07 15:38:26 +000011415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011416fi
11417
Michael W. Hudson54241132001-12-07 15:38:26 +000011418
11419
11420
11421
11422
11423
Guido van Rossum627b2d71993-12-24 10:39:16 +000011424# checks for system services
11425# (none yet)
11426
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011428ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011429if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011430
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011431else
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11433$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011434if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011435 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011436else
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011438LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442/* Override any GCC internal prototype to avoid an error.
11443 Use char because int might match the return type of a GCC
11444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011445#ifdef __cplusplus
11446extern "C"
11447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011448char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011449int
11450main ()
11451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011452return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ;
11454 return 0;
11455}
11456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459else
Matthias Kloseb9621712010-04-24 17:59:49 +000011460 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011462rm -f core conftest.err conftest.$ac_objext \
11463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11467$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011468if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 cat >>confdefs.h <<_ACEOF
11470#define HAVE_LIBIEEE 1
11471_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011472
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011473 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474
Guido van Rossum627b2d71993-12-24 10:39:16 +000011475fi
11476
Michael W. Hudson54241132001-12-07 15:38:26 +000011477
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011478fi
11479
Michael W. Hudson54241132001-12-07 15:38:26 +000011480
Guido van Rossum7f253911997-05-09 02:42:48 +000011481# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11483$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011486if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011487 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011488if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011489then
11490
Matthias Kloseb9621712010-04-24 17:59:49 +000011491$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011492
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11494$as_echo "yes" >&6; }
11495else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011497fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011498else
Matthias Kloseb9621712010-04-24 17:59:49 +000011499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501fi
11502
Guido van Rossum7f253911997-05-09 02:42:48 +000011503
Guido van Rossum7f43da71994-08-01 12:15:30 +000011504# check for --with-libm=...
11505
Guido van Rossum563e7081996-09-10 18:20:48 +000011506case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011507Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011508*) LIBM=-lm
11509esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11511$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011514if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011516if test "$withval" = no
11517then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11519$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011520elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011521then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11523$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011524else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011525fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11528$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529fi
11530
Guido van Rossum7f43da71994-08-01 12:15:30 +000011531
11532# check for --with-libc=...
11533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11535$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011537# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011538if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011539 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011540if test "$withval" = no
11541then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11543$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011544elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011545then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11547$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011548else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011549fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011550else
Matthias Kloseb9621712010-04-24 17:59:49 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11552$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553fi
11554
Guido van Rossum7f43da71994-08-01 12:15:30 +000011555
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011556# **************************************************
11557# * Check for various properties of floating point *
11558# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011559
Matthias Kloseb9621712010-04-24 17:59:49 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11561$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011562if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011564else
11565
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011567 ac_cv_little_endian_double=no
11568else
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011570/* end confdefs.h. */
11571
11572#include <string.h>
11573int main() {
11574 double x = 9006104071832581.0;
11575 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11576 return 0;
11577 else
11578 return 1;
11579}
11580
11581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011582if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011583 ac_cv_little_endian_double=yes
11584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011589fi
11590
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011591fi
11592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11594$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011595if test "$ac_cv_little_endian_double" = yes
11596then
11597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011599
11600fi
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11603$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011604if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011606else
11607
Matthias Kloseb9621712010-04-24 17:59:49 +000011608if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011609 ac_cv_big_endian_double=no
11610else
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011612/* end confdefs.h. */
11613
11614#include <string.h>
11615int main() {
11616 double x = 9006104071832581.0;
11617 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11618 return 0;
11619 else
11620 return 1;
11621}
11622
11623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625 ac_cv_big_endian_double=yes
11626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631fi
11632
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011633fi
11634
Matthias Kloseb9621712010-04-24 17:59:49 +000011635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11636$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011637if test "$ac_cv_big_endian_double" = yes
11638then
11639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011641
11642fi
11643
11644# Some ARM platforms use a mixed-endian representation for doubles.
11645# While Python doesn't currently have full support for these platforms
11646# (see e.g., issue 1762561), we can at least make sure that float <-> string
11647# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11649$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011650if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011652else
11653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011655 ac_cv_mixed_endian_double=no
11656else
Matthias Kloseb9621712010-04-24 17:59:49 +000011657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011658/* end confdefs.h. */
11659
11660#include <string.h>
11661int main() {
11662 double x = 9006104071832581.0;
11663 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11664 return 0;
11665 else
11666 return 1;
11667}
11668
11669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011671 ac_cv_mixed_endian_double=yes
11672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011677fi
11678
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011679fi
11680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11682$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011683if test "$ac_cv_mixed_endian_double" = yes
11684then
11685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011687
11688fi
11689
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011690# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011691# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011692# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011693# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011694# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011695# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011696
11697# This inline assembler syntax may also work for suncc and icc,
11698# so we try it on all platforms.
11699
Matthias Kloseb9621712010-04-24 17:59:49 +000011700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11701$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011703/* end confdefs.h. */
11704
11705int
11706main ()
11707{
11708
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011709 unsigned short cw;
11710 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11711 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011712
11713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011718 have_gcc_asm_for_x87=yes
11719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011721fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11724$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011725if test "$have_gcc_asm_for_x87" = yes
11726then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011729
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011731
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011732# Detect whether system arithmetic is subject to x87-style double
11733# rounding issues. The result of this test has little meaning on non
11734# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11735# mode is round-to-nearest and double rounding issues are present, and
11736# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11738$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011739# $BASECFLAGS may affect the result
11740ac_save_cc="$CC"
11741CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011743 ac_cv_x87_double_rounding=no
11744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011746/* end confdefs.h. */
11747
11748#include <stdlib.h>
11749#include <math.h>
11750int main() {
11751 volatile double x, y, z;
11752 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11753 x = 0.99999999999999989; /* 1-2**-53 */
11754 y = 1./x;
11755 if (y != 1.)
11756 exit(0);
11757 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11758 x = 1e16;
11759 y = 2.99999;
11760 z = x + y;
11761 if (z != 1e16+4.)
11762 exit(0);
11763 /* both tests show evidence of double rounding */
11764 exit(1);
11765}
11766
11767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011768if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011769 ac_cv_x87_double_rounding=no
11770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011773rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11774 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011775fi
11776
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011777CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11779$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011780if test "$ac_cv_x87_double_rounding" = yes
11781then
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011784
11785fi
11786
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011787# ************************************
11788# * Check for mathematical functions *
11789# ************************************
11790
11791LIBS_SAVE=$LIBS
11792LIBS="$LIBS $LIBM"
11793
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011794for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11795do :
11796 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11797ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011798if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011799 cat >>confdefs.h <<_ACEOF
11800#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11801_ACEOF
11802
11803fi
11804done
11805
11806for ac_func in hypot lgamma log1p round tgamma
11807do :
11808 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11809ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011810if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011811 cat >>confdefs.h <<_ACEOF
11812#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11813_ACEOF
11814
11815fi
11816done
11817
11818ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11819"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011820if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011821 ac_have_decl=1
11822else
11823 ac_have_decl=0
11824fi
11825
11826cat >>confdefs.h <<_ACEOF
11827#define HAVE_DECL_ISINF $ac_have_decl
11828_ACEOF
11829ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11830"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011831if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011832 ac_have_decl=1
11833else
11834 ac_have_decl=0
11835fi
11836
11837cat >>confdefs.h <<_ACEOF
11838#define HAVE_DECL_ISNAN $ac_have_decl
11839_ACEOF
11840ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11841"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011842if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011843 ac_have_decl=1
11844else
11845 ac_have_decl=0
11846fi
11847
11848cat >>confdefs.h <<_ACEOF
11849#define HAVE_DECL_ISFINITE $ac_have_decl
11850_ACEOF
11851
11852
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011853# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11854# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11856$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011857if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011859else
11860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011862 ac_cv_tanh_preserves_zero_sign=no
11863else
Matthias Kloseb9621712010-04-24 17:59:49 +000011864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011865/* end confdefs.h. */
11866
11867#include <math.h>
11868#include <stdlib.h>
11869int main() {
11870 /* return 0 if either negative zeros don't exist
11871 on this platform or if negative zeros exist
11872 and tanh(-0.) == -0. */
11873 if (atan2(0., -1.) == atan2(-0., -1.) ||
11874 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11875 else exit(1);
11876}
11877
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011880 ac_cv_tanh_preserves_zero_sign=yes
11881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011883fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011886fi
11887
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011888fi
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11891$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011892if test "$ac_cv_tanh_preserves_zero_sign" = yes
11893then
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011896
11897fi
11898
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011899if test "$ac_cv_func_log1p" = yes
11900then
11901 # On some versions of AIX, log1p(-0.) returns 0. instead of
11902 # -0. See issue #9920.
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11904$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011905 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011906 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011907else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011909 if test "$cross_compiling" = yes; then :
11910 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011911else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011914
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011915 #include <math.h>
11916 #include <stdlib.h>
11917 int main() {
11918 /* Fail if the signs of log1p(-0.) and -0. can be
11919 distinguished. */
11920 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11921 return 0;
11922 else
11923 return 1;
11924 }
11925
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011926_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011927if ac_fn_c_try_run "$LINENO"; then :
11928 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011929else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011930 ac_cv_log1p_drops_zero_sign=yes
11931fi
11932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011934fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011936fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011937
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11939$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11940fi
11941if test "$ac_cv_log1p_drops_zero_sign" = yes
11942then
11943
11944$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11945
11946fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011947
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011948LIBS=$LIBS_SAVE
11949
Mark Dickinsona614f042009-11-28 12:48:43 +000011950# For multiprocessing module, check that sem_open
11951# actually works. For FreeBSD versions <= 7.2,
11952# the kernel module that provides POSIX semaphores
11953# isn't loaded by default, so an attempt to call
11954# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11956$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011957if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011961 ac_cv_posix_semaphores_enabled=yes
11962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011964/* end confdefs.h. */
11965
11966#include <unistd.h>
11967#include <fcntl.h>
11968#include <stdio.h>
11969#include <semaphore.h>
11970#include <sys/stat.h>
11971
11972int main(void) {
11973 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11974 if (a == SEM_FAILED) {
11975 perror("sem_open");
11976 return 1;
11977 }
11978 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011979 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011980 return 0;
11981}
11982
11983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011984if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011985 ac_cv_posix_semaphores_enabled=yes
11986else
Matthias Kloseb9621712010-04-24 17:59:49 +000011987 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011991fi
11992
11993
Mark Dickinsona614f042009-11-28 12:48:43 +000011994fi
11995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11997$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011998if test $ac_cv_posix_semaphores_enabled = no
11999then
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012002
12003fi
12004
Mark Dickinson10683072009-04-18 21:18:19 +000012005# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12007$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012008if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012012 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012015/* end confdefs.h. */
12016
12017#include <unistd.h>
12018#include <fcntl.h>
12019#include <stdio.h>
12020#include <semaphore.h>
12021#include <sys/stat.h>
12022
12023int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012024 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012025 int count;
12026 int res;
12027 if(a==SEM_FAILED){
12028 perror("sem_open");
12029 return 1;
12030
12031 }
12032 res = sem_getvalue(a, &count);
12033 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012034 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012035 return res==-1 ? 1 : 0;
12036}
12037
Mark Dickinson10683072009-04-18 21:18:19 +000012038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012039if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012040 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012041else
Matthias Kloseb9621712010-04-24 17:59:49 +000012042 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012046fi
12047
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012049fi
12050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12052$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012053if test $ac_cv_broken_sem_getvalue = yes
12054then
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012057
12058fi
12059
Mark Dickinsonbd792642009-03-18 20:06:12 +000012060# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12062$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012063# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012064if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012065 enableval=$enable_big_digits; case $enable_big_digits in
12066yes)
12067 enable_big_digits=30 ;;
12068no)
12069 enable_big_digits=15 ;;
1207015|30)
12071 ;;
12072*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012073 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000012074esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12076$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012077
12078cat >>confdefs.h <<_ACEOF
12079#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12080_ACEOF
12081
12082
12083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12085$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012086fi
12087
12088
Guido van Rossumef2255b2000-03-10 22:30:29 +000012089# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012090ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012091if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012092
12093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012096 wchar_h="yes"
12097
Guido van Rossumef2255b2000-03-10 22:30:29 +000012098else
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012100
12101fi
12102
Michael W. Hudson54241132001-12-07 15:38:26 +000012103
Martin v. Löwis11437992002-04-12 09:54:03 +000012104
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012105# determine wchar_t size
12106if test "$wchar_h" = yes
12107then
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12110# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12111# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12113$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012114if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12118"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Martin v. Löwis11437992002-04-12 09:54:03 +000012120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 if test "$ac_cv_type_wchar_t" = yes; then
12122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012124as_fn_error 77 "cannot compute sizeof (wchar_t)
12125See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126 else
12127 ac_cv_sizeof_wchar_t=0
12128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012130
Martin v. Löwis11437992002-04-12 09:54:03 +000012131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12133$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134
12135
12136
Martin v. Löwis11437992002-04-12 09:54:03 +000012137cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012138#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012139_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012140
Michael W. Hudson54241132001-12-07 15:38:26 +000012141
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012142fi
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12145$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012146have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012148/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012149
12150#include <tcl.h>
12151#if TCL_UTF_MAX != 6
12152# error "NOT UCS4_TCL"
12153#endif
12154int
12155main ()
12156{
12157
12158 ;
12159 return 0;
12160}
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012163
12164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012166
12167 have_ucs4_tcl=yes
12168
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12172$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012173
Skip Montanaro6dead952003-09-25 14:50:04 +000012174# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012175if test "$wchar_h" = yes
12176then
12177 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12179$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012180 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012182else
12183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012185 ac_cv_wchar_t_signed=yes
12186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012189
12190 #include <wchar.h>
12191 int main()
12192 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012193 /* Success: exit code 0 */
12194 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012195 }
12196
12197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012198if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012199 ac_cv_wchar_t_signed=yes
12200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12204 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012205fi
12206
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012207fi
12208
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12210$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211fi
12212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12214$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012215
12216# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012218 withval=$with_wide_unicode;
12219if test "$withval" != no
12220then unicode_size="4"
12221else unicode_size="2"
12222fi
12223
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012224else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225
Georg Brandl52d168a2008-01-07 18:10:24 +000012226case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012227 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012228 *) unicode_size="2" ;;
12229esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012230
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012231fi
12232
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012233
12234
Georg Brandl52d168a2008-01-07 18:10:24 +000012235case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012236 4)
12237 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12238
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012239 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012240 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012242 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012243esac
12244
Michael W. Hudson54241132001-12-07 15:38:26 +000012245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246
Georg Brandl52d168a2008-01-07 18:10:24 +000012247# wchar_t is only usable if it maps to an unsigned type
12248if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012249 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012250then
12251 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012256
Georg Brandl52d168a2008-01-07 18:10:24 +000012257elif test "$ac_cv_sizeof_short" = "$unicode_size"
12258then
12259 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012260 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012261
Georg Brandl52d168a2008-01-07 18:10:24 +000012262elif test "$ac_cv_sizeof_long" = "$unicode_size"
12263then
12264 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012266
Georg Brandl52d168a2008-01-07 18:10:24 +000012267else
12268 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12271$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012272
12273# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12275$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012276if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 ac_cv_c_bigendian=unknown
12280 # See if we're dealing with a universal compiler.
12281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12282/* end confdefs.h. */
12283#ifndef __APPLE_CC__
12284 not a universal capable compiler
12285 #endif
12286 typedef int dummy;
12287
Skip Montanaro6dead952003-09-25 14:50:04 +000012288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289if ac_fn_c_try_compile "$LINENO"; then :
12290
12291 # Check for potential -arch flags. It is not universal unless
12292 # there are at least two -arch flags with different values.
12293 ac_arch=
12294 ac_prev=
12295 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12296 if test -n "$ac_prev"; then
12297 case $ac_word in
12298 i?86 | x86_64 | ppc | ppc64)
12299 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12300 ac_arch=$ac_word
12301 else
12302 ac_cv_c_bigendian=universal
12303 break
12304 fi
12305 ;;
12306 esac
12307 ac_prev=
12308 elif test "x$ac_word" = "x-arch"; then
12309 ac_prev=arch
12310 fi
12311 done
12312fi
12313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12314 if test $ac_cv_c_bigendian = unknown; then
12315 # See if sys/param.h defines the BYTE_ORDER macro.
12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012317/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012318#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012320
Martin v. Löwis11437992002-04-12 09:54:03 +000012321int
12322main ()
12323{
Matthias Kloseb9621712010-04-24 17:59:49 +000012324#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12325 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12326 && LITTLE_ENDIAN)
12327 bogus endian macros
12328 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
12330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012335 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012337/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012338#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012344#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 not big endian
12346 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
12348 ;
12349 return 0;
12350}
12351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012352if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012353 ac_cv_c_bigendian=yes
12354else
Matthias Kloseb9621712010-04-24 17:59:49 +000012355 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012358fi
12359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12360 fi
12361 if test $ac_cv_c_bigendian = unknown; then
12362 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012365#include <limits.h>
12366
Martin v. Löwis11437992002-04-12 09:54:03 +000012367int
12368main ()
12369{
Matthias Kloseb9621712010-04-24 17:59:49 +000012370#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12371 bogus endian macros
12372 #endif
12373
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
12379 # It does; now see whether it defined to _BIG_ENDIAN or not.
12380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12381/* end confdefs.h. */
12382#include <limits.h>
12383
12384int
12385main ()
12386{
12387#ifndef _BIG_ENDIAN
12388 not big endian
12389 #endif
12390
12391 ;
12392 return 0;
12393}
12394_ACEOF
12395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12401fi
12402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12403 fi
12404 if test $ac_cv_c_bigendian = unknown; then
12405 # Compile a test program.
12406 if test "$cross_compiling" = yes; then :
12407 # Try to guess by grepping values from an object file.
12408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12409/* end confdefs.h. */
12410short int ascii_mm[] =
12411 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12412 short int ascii_ii[] =
12413 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12414 int use_ascii (int i) {
12415 return ascii_mm[i] + ascii_ii[i];
12416 }
12417 short int ebcdic_ii[] =
12418 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12419 short int ebcdic_mm[] =
12420 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12421 int use_ebcdic (int i) {
12422 return ebcdic_mm[i] + ebcdic_ii[i];
12423 }
12424 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426int
12427main ()
12428{
12429return use_ascii (foo) == use_ebcdic (foo);
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434if ac_fn_c_try_compile "$LINENO"; then :
12435 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12436 ac_cv_c_bigendian=yes
12437 fi
12438 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12439 if test "$ac_cv_c_bigendian" = unknown; then
12440 ac_cv_c_bigendian=no
12441 else
12442 # finding both strings is unlikely to happen, but who knows?
12443 ac_cv_c_bigendian=unknown
12444 fi
12445 fi
12446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012448else
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012450/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012452int
12453main ()
12454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 /* Are we little or big endian? From Harbison&Steele. */
12457 union
12458 {
12459 long int l;
12460 char c[sizeof (long int)];
12461 } u;
12462 u.l = 1;
12463 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464
12465 ;
12466 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012467}
Martin v. Löwis11437992002-04-12 09:54:03 +000012468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012469if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012470 ac_cv_c_bigendian=no
12471else
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12481$as_echo "$ac_cv_c_bigendian" >&6; }
12482 case $ac_cv_c_bigendian in #(
12483 yes)
12484 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12485;; #(
12486 no)
12487 ;; #(
12488 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 ;; #(
12493 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012494 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012495 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012497
Michael W. Hudson54241132001-12-07 15:38:26 +000012498
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012499# ABI version string for Python extension modules. This appears between the
12500# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12501# from the following attributes which affect the ABI of this Python build (in
12502# this order):
12503#
12504# * The Python implementation (always 'cpython-' for us)
12505# * The major and minor version numbers
12506# * --with-pydebug (adds a 'd')
12507# * --with-pymalloc (adds a 'm')
12508# * --with-wide-unicode (adds a 'u')
12509#
12510# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012511# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12512# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012513
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12515$as_echo_n "checking ABIFLAGS... " >&6; }
12516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12517$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12519$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012520SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12522$as_echo "$SOABI" >&6; }
12523
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12525$as_echo_n "checking LDVERSION... " >&6; }
12526LDVERSION='$(VERSION)$(ABIFLAGS)'
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12528$as_echo "$LDVERSION" >&6; }
12529
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012530# SO is the extension of shared libraries `(including the dot!)
12531# -- usually .so, .sl on HP-UX, .dll on Cygwin
12532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12533$as_echo_n "checking SO... " >&6; }
12534if test -z "$SO"
12535then
12536 case $ac_sys_system in
12537 hp*|HP*)
12538 case `uname -m` in
12539 ia64) SO=.so;;
12540 *) SO=.sl;;
12541 esac
12542 ;;
12543 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012544 Linux*|GNU*)
12545 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012546 *) SO=.so;;
12547 esac
12548else
12549 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012550 echo
12551 echo '====================================================================='
12552 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012553 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012554 echo '+ Do you really mean to change the extension for shared libraries? +'
12555 echo '+ Continuing in 10 seconds to let you to ponder. +'
12556 echo '+ +'
12557 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012558 sleep 10
12559fi
12560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12561$as_echo "$SO" >&6; }
12562
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012563# Check whether right shifting a negative integer extends the sign bit
12564# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12566$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012567if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012569else
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012572 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012576
12577int main()
12578{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012579 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012580}
12581
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012583if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012584 ac_cv_rshift_extends_sign=yes
12585else
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012590fi
12591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592fi
12593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12595$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012596if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012597then
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012600
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012601fi
12602
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012603# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12605$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012606if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012607 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012608else
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
Matthias Kloseb9621712010-04-24 17:59:49 +000012610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012612#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012613int
12614main ()
12615{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012616
12617 FILE *f = fopen("/dev/null", "r");
12618 flockfile(f);
12619 getc_unlocked(f);
12620 funlockfile(f);
12621
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 ;
12623 return 0;
12624}
12625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012627 ac_cv_have_getc_unlocked=yes
12628else
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 ac_cv_have_getc_unlocked=no
12630fi
12631rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12636$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012637if test "$ac_cv_have_getc_unlocked" = yes
12638then
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012641
12642fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012643
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012644# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012645# save the value of LIBS so we don't actually link Python with readline
12646LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012647
Gregory P. Smith18820942008-09-07 06:24:49 +000012648# On some systems we need to link readline to a termcap compatible
12649# library. NOTE: Keep the precedence of listed libraries synchronised
12650# with setup.py.
12651py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12653$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012654for py_libtermcap in "" ncursesw ncurses curses termcap; do
12655 if test -z "$py_libtermcap"; then
12656 READLINE_LIBS="-lreadline"
12657 else
12658 READLINE_LIBS="-lreadline -l$py_libtermcap"
12659 fi
12660 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012662/* end confdefs.h. */
12663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664/* Override any GCC internal prototype to avoid an error.
12665 Use char because int might match the return type of a GCC
12666 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012667#ifdef __cplusplus
12668extern "C"
12669#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012670char readline ();
12671int
12672main ()
12673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012680 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012682rm -f core conftest.err conftest.$ac_objext \
12683 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012684 if test $py_cv_lib_readline = yes; then
12685 break
12686 fi
12687done
12688# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12689#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012690if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12692$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12695$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012698
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012699fi
12700
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012701# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12703$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012704if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012706else
12707 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012708LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012710/* end confdefs.h. */
12711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712/* Override any GCC internal prototype to avoid an error.
12713 Use char because int might match the return type of a GCC
12714 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012715#ifdef __cplusplus
12716extern "C"
12717#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012718char rl_callback_handler_install ();
12719int
12720main ()
12721{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012723 ;
12724 return 0;
12725}
12726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012728 ac_cv_lib_readline_rl_callback_handler_install=yes
12729else
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012732rm -f core conftest.err conftest.$ac_objext \
12733 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012734LIBS=$ac_check_lib_save_LIBS
12735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12737$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012738if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012741
12742fi
12743
12744
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012745# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012747/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012748#include <readline/readline.h>
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012751 have_readline=yes
12752else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012753 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012754
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012755fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012756rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012757if test $have_readline = yes
12758then
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012760/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012761#include <readline/readline.h>
12762
12763_ACEOF
12764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012768
12769fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012770rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012773/* end confdefs.h. */
12774#include <readline/readline.h>
12775
12776_ACEOF
12777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012781
12782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012783rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012784
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012785fi
12786
Martin v. Löwis0daad592001-09-30 21:09:59 +000012787# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12789$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012790if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012792else
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012794LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798/* Override any GCC internal prototype to avoid an error.
12799 Use char because int might match the return type of a GCC
12800 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012801#ifdef __cplusplus
12802extern "C"
12803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012804char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012805int
12806main ()
12807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 ;
12810 return 0;
12811}
12812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012818rm -f core conftest.err conftest.$ac_objext \
12819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012820LIBS=$ac_check_lib_save_LIBS
12821fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12823$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012824if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012825
Matthias Kloseb9621712010-04-24 17:59:49 +000012826$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012827
Martin v. Löwis0daad592001-09-30 21:09:59 +000012828fi
12829
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
Thomas Wouters89d996e2007-09-08 17:39:28 +000012831# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12833$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012834if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012836else
12837 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012838LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012840/* end confdefs.h. */
12841
12842/* Override any GCC internal prototype to avoid an error.
12843 Use char because int might match the return type of a GCC
12844 builtin and then its argument prototype would still apply. */
12845#ifdef __cplusplus
12846extern "C"
12847#endif
12848char rl_completion_display_matches_hook ();
12849int
12850main ()
12851{
12852return rl_completion_display_matches_hook ();
12853 ;
12854 return 0;
12855}
12856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012857if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012858 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12859else
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012862rm -f core conftest.err conftest.$ac_objext \
12863 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012864LIBS=$ac_check_lib_save_LIBS
12865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12867$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012868if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012871
12872fi
12873
12874
Martin v. Löwis0daad592001-09-30 21:09:59 +000012875# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12877$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012878if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012880else
Martin v. Löwis11437992002-04-12 09:54:03 +000012881 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012882LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886/* Override any GCC internal prototype to avoid an error.
12887 Use char because int might match the return type of a GCC
12888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012889#ifdef __cplusplus
12890extern "C"
12891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012892char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012893int
12894main ()
12895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012896return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012897 ;
12898 return 0;
12899}
12900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012903else
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012906rm -f core conftest.err conftest.$ac_objext \
12907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012908LIBS=$ac_check_lib_save_LIBS
12909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12911$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012912if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012913
Matthias Kloseb9621712010-04-24 17:59:49 +000012914$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012915
Guido van Rossum353ae582001-07-10 16:45:32 +000012916fi
12917
Jack Jansendd19cf82001-12-06 22:36:17 +000012918
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012919# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012921/* end confdefs.h. */
12922#include <readline/readline.h>
12923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012925 have_readline=yes
12926else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012927 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012928
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012929fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012930rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012931if test $have_readline = yes
12932then
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012934/* end confdefs.h. */
12935#include <readline/readline.h>
12936
12937_ACEOF
12938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012940
Matthias Kloseb9621712010-04-24 17:59:49 +000012941$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012942
12943fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012944rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012945
12946fi
12947
Martin v. Löwis82bca632006-02-10 20:49:30 +000012948# End of readline checks: restore LIBS
12949LIBS=$LIBS_no_readline
12950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12952$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012953if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012955else
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012958 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012961/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012962
12963int main()
12964{
12965 int val1 = nice(1);
12966 if (val1 != -1 && val1 == nice(2))
12967 exit(0);
12968 exit(1);
12969}
12970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012972if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012973 ac_cv_broken_nice=yes
12974else
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012979fi
12980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981fi
12982
Matthias Kloseb9621712010-04-24 17:59:49 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12984$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012985if test "$ac_cv_broken_nice" = yes
12986then
Martin v. Löwis11437992002-04-12 09:54:03 +000012987
Matthias Kloseb9621712010-04-24 17:59:49 +000012988$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012989
12990fi
12991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12993$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012994if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012998 ac_cv_broken_poll=no
12999else
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013001/* end confdefs.h. */
13002
13003#include <poll.h>
13004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013005int main()
13006{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013007 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013008 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013009
13010 close (42);
13011
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013012 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013013 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013014 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013015 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013016 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013017 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013018 return 1;
13019}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013020
13021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013022if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013023 ac_cv_broken_poll=yes
13024else
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013031fi
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13034$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013035if test "$ac_cv_broken_poll" = yes
13036then
13037
Matthias Kloseb9621712010-04-24 17:59:49 +000013038$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013039
13040fi
13041
Brett Cannon43802422005-02-10 20:48:03 +000013042# 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 +000013043# (which is not required by ISO C or UNIX spec) and/or if we support
13044# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013045ac_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 +000013046#include <$ac_cv_struct_tm>
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013049if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013050
13051cat >>confdefs.h <<_ACEOF
13052#define HAVE_STRUCT_TM_TM_ZONE 1
13053_ACEOF
13054
13055
13056fi
13057
13058if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013061
13062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13064"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013065if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069fi
13070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013073_ACEOF
13074
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13076$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013077if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079else
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013081/* end confdefs.h. */
13082#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013083#if !HAVE_DECL_TZNAME
13084extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013085#endif
13086
13087int
13088main ()
13089{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013091 ;
13092 return 0;
13093}
13094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013095if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013096 ac_cv_var_tzname=yes
13097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013100rm -f core conftest.err conftest.$ac_objext \
13101 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13104$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013105 if test $ac_cv_var_tzname = yes; then
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013108
13109 fi
13110fi
13111
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013112
Martin v. Löwis1d459062005-03-14 21:23:33 +000013113# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13115$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013116if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013118else
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013121 ac_cv_working_tzset=no
13122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013124/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013125
13126#include <stdlib.h>
13127#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013128#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013129
13130#if HAVE_TZNAME
13131extern char *tzname[];
13132#endif
13133
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013134int main()
13135{
Brett Cannon18367812003-09-19 00:59:16 +000013136 /* Note that we need to ensure that not only does tzset(3)
13137 do 'something' with localtime, but it works as documented
13138 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013139 This includes making sure that tzname is set properly if
13140 tm->tm_zone does not exist since it is the alternative way
13141 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013142
13143 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013144 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013145 */
13146
Martin v. Löwis1d459062005-03-14 21:23:33 +000013147 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013148 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13149
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013150 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013151 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013152 if (localtime(&groundhogday)->tm_hour != 0)
13153 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013154#if HAVE_TZNAME
13155 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13156 if (strcmp(tzname[0], "UTC") ||
13157 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13158 exit(1);
13159#endif
Brett Cannon18367812003-09-19 00:59:16 +000013160
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013161 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013162 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013163 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013164 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013165#if HAVE_TZNAME
13166 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13167 exit(1);
13168#endif
Brett Cannon18367812003-09-19 00:59:16 +000013169
13170 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13171 tzset();
13172 if (localtime(&groundhogday)->tm_hour != 11)
13173 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013174#if HAVE_TZNAME
13175 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13176 exit(1);
13177#endif
13178
13179#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013180 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13181 exit(1);
13182 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13183 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013184#endif
Brett Cannon18367812003-09-19 00:59:16 +000013185
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013186 exit(0);
13187}
13188
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013191 ac_cv_working_tzset=yes
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013197fi
13198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199fi
13200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13202$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013203if test "$ac_cv_working_tzset" = yes
13204then
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013207
13208fi
13209
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013210# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13212$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013213if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013215else
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013217/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013218#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013219int
13220main ()
13221{
13222
13223struct stat st;
13224st.st_mtim.tv_nsec = 1;
13225
13226 ;
13227 return 0;
13228}
13229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013231 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13236fi
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13239$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013240if test "$ac_cv_stat_tv_nsec" = yes
13241then
13242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013244
13245fi
13246
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013247# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13249$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013250if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013252else
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013254/* end confdefs.h. */
13255#include <sys/stat.h>
13256int
13257main ()
13258{
13259
13260struct stat st;
13261st.st_mtimespec.tv_nsec = 1;
13262
13263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013268 ac_cv_stat_tv_nsec2=yes
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273fi
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13276$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013277if test "$ac_cv_stat_tv_nsec2" = yes
13278then
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013281
13282fi
13283
Jack Jansen666b1e72001-10-31 12:11:48 +000013284# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13286$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013287if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013289else
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013291/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013292#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013293int
13294main ()
13295{
Jack Jansen666b1e72001-10-31 12:11:48 +000013296
13297 int rtn;
13298 rtn = mvwdelch(0,0,0);
13299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300 ;
13301 return 0;
13302}
13303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013305 ac_cv_mvwdelch_is_expression=yes
13306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13310fi
13311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13313$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013314
13315if test "$ac_cv_mvwdelch_is_expression" = yes
13316then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013319
13320fi
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13323$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013324if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013329#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013330int
13331main ()
13332{
Jack Jansen666b1e72001-10-31 12:11:48 +000013333
13334 WINDOW *w;
13335 w->_flags = 0;
13336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337 ;
13338 return 0;
13339}
13340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013341if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013342 ac_cv_window_has_flags=yes
13343else
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13350$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013351
Jack Jansen666b1e72001-10-31 12:11:48 +000013352
13353if test "$ac_cv_window_has_flags" = yes
13354then
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013357
13358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13361$as_echo_n "checking for is_term_resized... " >&6; }
13362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013363/* end confdefs.h. */
13364#include <curses.h>
13365int
13366main ()
13367{
13368void *x=is_term_resized
13369 ;
13370 return 0;
13371}
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013376
Matthias Kloseb159a552010-04-25 21:00:44 +000013377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013378$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013382
13383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13387$as_echo_n "checking for resize_term... " >&6; }
13388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013389/* end confdefs.h. */
13390#include <curses.h>
13391int
13392main ()
13393{
13394void *x=resize_term
13395 ;
13396 return 0;
13397}
13398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013399if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013402
Matthias Kloseb159a552010-04-25 21:00:44 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13407$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013408
13409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13413$as_echo_n "checking for resizeterm... " >&6; }
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013415/* end confdefs.h. */
13416#include <curses.h>
13417int
13418main ()
13419{
13420void *x=resizeterm
13421 ;
13422 return 0;
13423}
13424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013425if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013428
Matthias Kloseb159a552010-04-25 21:00:44 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013430$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013431else
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13433$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013434
13435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13439$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013440
13441if test -r /dev/ptmx
13442then
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13444$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013445
Matthias Kloseb9621712010-04-24 17:59:49 +000013446$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013447
Thomas Wouters89f507f2006-12-13 04:49:30 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13450$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13454$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013455
13456if test -r /dev/ptc
13457then
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13459$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013462
Thomas Wouters89f507f2006-12-13 04:49:30 +000013463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13465$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013466fi
13467
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013468if test "$have_long_long" = yes
13469then
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13471$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013472 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013476 ac_cv_have_long_long_format=no
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013479/* end confdefs.h. */
13480
13481 #include <stdio.h>
13482 #include <stddef.h>
13483 #include <string.h>
13484
13485 #ifdef HAVE_SYS_TYPES_H
13486 #include <sys/types.h>
13487 #endif
13488
13489 int main()
13490 {
13491 char buffer[256];
13492
13493 if (sprintf(buffer, "%lld", (long long)123) < 0)
13494 return 1;
13495 if (strcmp(buffer, "123"))
13496 return 1;
13497
13498 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13499 return 1;
13500 if (strcmp(buffer, "-123"))
13501 return 1;
13502
13503 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13504 return 1;
13505 if (strcmp(buffer, "123"))
13506 return 1;
13507
13508 return 0;
13509 }
13510
13511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013512if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013513 ac_cv_have_long_long_format=yes
13514else
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013516fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13518 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013519fi
13520
13521
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013522fi
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13525$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013526fi
13527
Mark Dickinson89d7d412009-12-31 20:50:59 +000013528if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013529then
13530
Matthias Kloseb9621712010-04-24 17:59:49 +000013531$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013532
13533fi
13534
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013535if test $ac_sys_system = Darwin
13536then
13537 LIBS="$LIBS -framework CoreFoundation"
13538fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13541$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013542if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013546 ac_cv_have_size_t_format="cross -- assuming yes"
13547
Thomas Wouters477c8d52006-05-27 19:21:47 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013550/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013551
Thomas Wouters477c8d52006-05-27 19:21:47 +000013552#include <stdio.h>
13553#include <stddef.h>
13554#include <string.h>
13555
Christian Heimes2c181612007-12-17 20:04:13 +000013556#ifdef HAVE_SYS_TYPES_H
13557#include <sys/types.h>
13558#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013559
13560#ifdef HAVE_SSIZE_T
13561typedef ssize_t Py_ssize_t;
13562#elif SIZEOF_VOID_P == SIZEOF_LONG
13563typedef long Py_ssize_t;
13564#else
13565typedef int Py_ssize_t;
13566#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013567
Christian Heimes2c181612007-12-17 20:04:13 +000013568int main()
13569{
13570 char buffer[256];
13571
Thomas Wouters477c8d52006-05-27 19:21:47 +000013572 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13573 return 1;
13574
Thomas Wouters89f507f2006-12-13 04:49:30 +000013575 if (strcmp(buffer, "123"))
13576 return 1;
13577
13578 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13579 return 1;
13580
13581 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013582 return 1;
13583
13584 return 0;
13585}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013586
Thomas Wouters477c8d52006-05-27 19:21:47 +000013587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013588if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013590else
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013593rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13594 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013595fi
13596
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13599$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013600if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013603
13604fi
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013607#ifdef HAVE_SYS_TYPES_H
13608#include <sys/types.h>
13609#endif
13610#ifdef HAVE_SYS_SOCKET_H
13611#include <sys/socket.h>
13612#endif
13613
Matthias Kloseb9621712010-04-24 17:59:49 +000013614"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013615if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013620
13621fi
13622
Michael W. Hudson54241132001-12-07 15:38:26 +000013623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13625$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013626if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013630 ac_cv_broken_mbstowcs=no
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013633/* end confdefs.h. */
13634
13635#include<stdlib.h>
13636int main() {
13637 size_t len = -1;
13638 const char *str = "text";
13639 len = mbstowcs(NULL, str, 0);
13640 return (len != 4);
13641}
13642
13643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013644if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013645 ac_cv_broken_mbstowcs=no
13646else
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013651fi
13652
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013653fi
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13656$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013657if test "$ac_cv_broken_mbstowcs" = yes
13658then
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013661
13662fi
13663
Antoine Pitrou042b1282010-08-13 21:15:58 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13665$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013666if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013667 $as_echo_n "(cached) " >&6
13668else
13669 if test "$cross_compiling" = yes; then :
13670 ac_cv_computed_gotos=no
13671else
13672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13673/* end confdefs.h. */
13674
13675int main(int argc, char **argv)
13676{
13677 static void *targets[1] = { &&LABEL1 };
13678 goto LABEL2;
13679LABEL1:
13680 return 0;
13681LABEL2:
13682 goto *targets[0];
13683 return 1;
13684}
13685
13686_ACEOF
13687if ac_fn_c_try_run "$LINENO"; then :
13688 ac_cv_computed_gotos=yes
13689else
13690 ac_cv_computed_gotos=no
13691fi
13692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13693 conftest.$ac_objext conftest.beam conftest.$ac_ext
13694fi
13695
13696fi
13697
13698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13699$as_echo "$ac_cv_computed_gotos" >&6; }
13700if test "$ac_cv_computed_gotos" = yes
13701then
13702
13703$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13704
13705fi
13706
Antoine Pitroub52ec782009-01-25 16:34:23 +000013707# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13709$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013710
13711# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013713 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013714if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013715then
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013718
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13720$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013721fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013722if test "$withval" = no
13723then
13724
13725$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13728$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013729fi
13730
Antoine Pitrou042b1282010-08-13 21:15:58 +000013731else
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13733$as_echo "no value specified" >&6; }
13734fi
13735
Antoine Pitroub52ec782009-01-25 16:34:23 +000013736
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013737case $ac_sys_system in
13738AIX*)
13739
13740$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13741 ;;
13742esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013743
Michael W. Hudson54241132001-12-07 15:38:26 +000013744
Gregory P. Smith138fa432010-12-13 08:00:52 +000013745ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013746if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013747
13748$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13749
13750fi
Jesus Cea6a792292010-05-03 21:18:48 +000013751
13752
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013753
13754
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013755for h in `(cd $srcdir;echo Python/thread_*.h)`
13756do
13757 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13758done
13759
Michael W. Hudson54241132001-12-07 15:38:26 +000013760
Neal Norwitzd24499d2005-12-18 21:36:39 +000013761SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13763$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013764for dir in $SRCDIRS; do
13765 if test ! -d $dir; then
13766 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013767 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013768done
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13770$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013771
Guido van Rossum627b2d71993-12-24 10:39:16 +000013772# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013773ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013774
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013775ac_config_files="$ac_config_files Modules/ld_so_aix"
13776
Martin v. Löwis11437992002-04-12 09:54:03 +000013777cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778# This file is a shell script that caches the results of configure
13779# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013780# scripts and configure runs, see configure's option --config-cache.
13781# It is not useful on other systems. If it contains results you don't
13782# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013783#
Martin v. Löwis11437992002-04-12 09:54:03 +000013784# config.status only pays attention to the cache file if you give it
13785# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013786#
Skip Montanaro6dead952003-09-25 14:50:04 +000013787# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013788# loading this file, other *unset* `ac_cv_foo' will be assigned the
13789# following values.
13790
13791_ACEOF
13792
Guido van Rossumf78abae1997-01-21 22:02:36 +000013793# The following way of writing the cache mishandles newlines in values,
13794# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013796# Ultrix sh set writes to stderr and can't be redirected directly,
13797# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798(
13799 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13800 eval ac_val=\$$ac_var
13801 case $ac_val in #(
13802 *${as_nl}*)
13803 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13805$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806 esac
13807 case $ac_var in #(
13808 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13810 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013811 esac ;;
13812 esac
13813 done
13814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13817 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013818 # `set' does not quote correctly, so add quotes: double-quote
13819 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013820 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013821 "s/'/'\\\\''/g;
13822 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013824 *)
13825 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013826 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013828 esac |
13829 sort
13830) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013835 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13836 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13838 :end' >>confcache
13839if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13840 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013841 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013842 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13843$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013844 if test ! -f "$cache_file" || test -h "$cache_file"; then
13845 cat confcache >"$cache_file"
13846 else
13847 case $cache_file in #(
13848 */* | ?:*)
13849 mv -f confcache "$cache_file"$$ &&
13850 mv -f "$cache_file"$$ "$cache_file" ;; #(
13851 *)
13852 mv -f confcache "$cache_file" ;;
13853 esac
13854 fi
13855 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013856 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13858$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013859 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013861rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013862
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013863test "x$prefix" = xNONE && prefix=$ac_default_prefix
13864# Let make expand exec_prefix.
13865test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013867DEFS=-DHAVE_CONFIG_H
13868
Skip Montanaro6dead952003-09-25 14:50:04 +000013869ac_libobjs=
13870ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013871U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013872for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13873 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13877 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13879 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013880done
13881LIBOBJS=$ac_libobjs
13882
13883LTLIBOBJS=$ac_ltlibobjs
13884
13885
Martin v. Löwis11437992002-04-12 09:54:03 +000013886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013888: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013889ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013890ac_clean_files_save=$ac_clean_files
13891ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13893$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13894as_write_fail=0
13895cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013896#! $SHELL
13897# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013898# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013899# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013900# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013901
Martin v. Löwis11437992002-04-12 09:54:03 +000013902debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013903ac_cs_recheck=false
13904ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013905
Matthias Kloseb9621712010-04-24 17:59:49 +000013906SHELL=\${CONFIG_SHELL-$SHELL}
13907export SHELL
13908_ASEOF
13909cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13910## -------------------- ##
13911## M4sh Initialization. ##
13912## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013914# Be more Bourne compatible
13915DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013916if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013917 emulate sh
13918 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013920 # is contrary to our usage. Disable this feature.
13921 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013923else
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 case `(set -o) 2>/dev/null` in #(
13925 *posix*) :
13926 set -o posix ;; #(
13927 *) :
13928 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013930fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013931
13932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933as_nl='
13934'
13935export as_nl
13936# Printing a long string crashes Solaris 7 /usr/bin/printf.
13937as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13938as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13939as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13940# Prefer a ksh shell builtin over an external printf program on Solaris,
13941# but without wasting forks for bash or zsh.
13942if test -z "$BASH_VERSION$ZSH_VERSION" \
13943 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13944 as_echo='print -r --'
13945 as_echo_n='print -rn --'
13946elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13947 as_echo='printf %s\n'
13948 as_echo_n='printf %s'
13949else
13950 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13951 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13952 as_echo_n='/usr/ucb/echo -n'
13953 else
13954 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13955 as_echo_n_body='eval
13956 arg=$1;
13957 case $arg in #(
13958 *"$as_nl"*)
13959 expr "X$arg" : "X\\(.*\\)$as_nl";
13960 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13961 esac;
13962 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13963 '
13964 export as_echo_n_body
13965 as_echo_n='sh -c $as_echo_n_body as_echo'
13966 fi
13967 export as_echo_body
13968 as_echo='sh -c $as_echo_body as_echo'
13969fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
13971# The user is always right.
13972if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 PATH_SEPARATOR=:
13974 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13975 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13976 PATH_SEPARATOR=';'
13977 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980
13981# IFS
13982# We need space, tab and new line, in precisely that order. Quoting is
13983# there to prevent editors from complaining about space-tab.
13984# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13985# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013986IFS=" "" $as_nl"
13987
13988# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013989as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000013990case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013991 *[\\/]* ) as_myself=$0 ;;
13992 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013993for as_dir in $PATH
13994do
13995 IFS=$as_save_IFS
13996 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013997 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13998 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013999IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014001 ;;
14002esac
14003# We did not find ourselves, most probably we were run as `sh COMMAND'
14004# in which case we are not to be found in the path.
14005if test "x$as_myself" = x; then
14006 as_myself=$0
14007fi
14008if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14010 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014011fi
14012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013# Unset variables that we do not need and which cause bugs (e.g. in
14014# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14015# suppresses any "Segmentation fault" message there. '((' could
14016# trigger a bug in pdksh 5.2.14.
14017for as_var in BASH_ENV ENV MAIL MAILPATH
14018do eval test x\${$as_var+set} = xset \
14019 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020done
14021PS1='$ '
14022PS2='> '
14023PS4='+ '
14024
14025# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014026LC_ALL=C
14027export LC_ALL
14028LANGUAGE=C
14029export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031# CDPATH.
14032(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14033
14034
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014035# as_fn_error STATUS ERROR [LINENO LOG_FD]
14036# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014037# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14038# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014039# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014040as_fn_error ()
14041{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014042 as_status=$1; test $as_status -eq 0 && as_status=1
14043 if test "$4"; then
14044 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14045 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014047 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 as_fn_exit $as_status
14049} # as_fn_error
14050
14051
14052# as_fn_set_status STATUS
14053# -----------------------
14054# Set $? to STATUS, without forking.
14055as_fn_set_status ()
14056{
14057 return $1
14058} # as_fn_set_status
14059
14060# as_fn_exit STATUS
14061# -----------------
14062# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14063as_fn_exit ()
14064{
14065 set +e
14066 as_fn_set_status $1
14067 exit $1
14068} # as_fn_exit
14069
14070# as_fn_unset VAR
14071# ---------------
14072# Portably unset VAR.
14073as_fn_unset ()
14074{
14075 { eval $1=; unset $1;}
14076}
14077as_unset=as_fn_unset
14078# as_fn_append VAR VALUE
14079# ----------------------
14080# Append the text in VALUE to the end of the definition contained in VAR. Take
14081# advantage of any shell optimizations that allow amortized linear growth over
14082# repeated appends, instead of the typical quadratic growth present in naive
14083# implementations.
14084if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14085 eval 'as_fn_append ()
14086 {
14087 eval $1+=\$2
14088 }'
14089else
14090 as_fn_append ()
14091 {
14092 eval $1=\$$1\$2
14093 }
14094fi # as_fn_append
14095
14096# as_fn_arith ARG...
14097# ------------------
14098# Perform arithmetic evaluation on the ARGs, and store the result in the
14099# global $as_val. Take advantage of shells that can avoid forks. The arguments
14100# must be portable across $(()) and expr.
14101if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14102 eval 'as_fn_arith ()
14103 {
14104 as_val=$(( $* ))
14105 }'
14106else
14107 as_fn_arith ()
14108 {
14109 as_val=`expr "$@" || test $? -eq 1`
14110 }
14111fi # as_fn_arith
14112
14113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114if expr a : '\(a\)' >/dev/null 2>&1 &&
14115 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14116 as_expr=expr
14117else
14118 as_expr=false
14119fi
14120
14121if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14122 as_basename=basename
14123else
14124 as_basename=false
14125fi
14126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14128 as_dirname=dirname
14129else
14130 as_dirname=false
14131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133as_me=`$as_basename -- "$0" ||
14134$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14135 X"$0" : 'X\(//\)$' \| \
14136 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014137$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138 sed '/^.*\/\([^/][^/]*\)\/*$/{
14139 s//\1/
14140 q
14141 }
14142 /^X\/\(\/\/\)$/{
14143 s//\1/
14144 q
14145 }
14146 /^X\/\(\/\).*/{
14147 s//\1/
14148 q
14149 }
14150 s/.*/./; q'`
14151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152# Avoid depending upon Character Ranges.
14153as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14154as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14155as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14156as_cr_digits='0123456789'
14157as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014158
14159ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014160case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 xy) ECHO_C='\c';;
14165 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14166 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167 esac;;
14168*)
14169 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014170esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014171
Martin v. Löwis11437992002-04-12 09:54:03 +000014172rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173if test -d conf$$.dir; then
14174 rm -f conf$$.dir/conf$$.file
14175else
14176 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014179if (echo >conf$$.file) 2>/dev/null; then
14180 if ln -s conf$$.file conf$$ 2>/dev/null; then
14181 as_ln_s='ln -s'
14182 # ... but there are two gotchas:
14183 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14184 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14185 # In both cases, we have to default to `cp -p'.
14186 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14187 as_ln_s='cp -p'
14188 elif ln conf$$.file conf$$ 2>/dev/null; then
14189 as_ln_s=ln
14190 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014193else
14194 as_ln_s='cp -p'
14195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14197rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199
14200# as_fn_mkdir_p
14201# -------------
14202# Create "$as_dir" as a directory, including parents if necessary.
14203as_fn_mkdir_p ()
14204{
14205
14206 case $as_dir in #(
14207 -*) as_dir=./$as_dir;;
14208 esac
14209 test -d "$as_dir" || eval $as_mkdir_p || {
14210 as_dirs=
14211 while :; do
14212 case $as_dir in #(
14213 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14214 *) as_qdir=$as_dir;;
14215 esac
14216 as_dirs="'$as_qdir' $as_dirs"
14217 as_dir=`$as_dirname -- "$as_dir" ||
14218$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14219 X"$as_dir" : 'X\(//\)[^/]' \| \
14220 X"$as_dir" : 'X\(//\)$' \| \
14221 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14222$as_echo X"$as_dir" |
14223 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14224 s//\1/
14225 q
14226 }
14227 /^X\(\/\/\)[^/].*/{
14228 s//\1/
14229 q
14230 }
14231 /^X\(\/\/\)$/{
14232 s//\1/
14233 q
14234 }
14235 /^X\(\/\).*/{
14236 s//\1/
14237 q
14238 }
14239 s/.*/./; q'`
14240 test -d "$as_dir" && break
14241 done
14242 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014243 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014244
14245
14246} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014247if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014249else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014250 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014251 as_mkdir_p=false
14252fi
14253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254if test -x / >/dev/null 2>&1; then
14255 as_test_x='test -x'
14256else
14257 if ls -dL / >/dev/null 2>&1; then
14258 as_ls_L_option=L
14259 else
14260 as_ls_L_option=
14261 fi
14262 as_test_x='
14263 eval sh -c '\''
14264 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 case $1 in #(
14268 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014269 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271 ???[sx]*):;;*)false;;esac;fi
14272 '\'' sh
14273 '
14274fi
14275as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
14277# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014278as_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 +000014279
14280# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014281as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014282
14283
Martin v. Löwis11437992002-04-12 09:54:03 +000014284exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014285## ----------------------------------- ##
14286## Main body of $CONFIG_STATUS script. ##
14287## ----------------------------------- ##
14288_ASEOF
14289test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14292# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014293# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014294# values after options handling.
14295ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014296This file was extended by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014297generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
14299 CONFIG_FILES = $CONFIG_FILES
14300 CONFIG_HEADERS = $CONFIG_HEADERS
14301 CONFIG_LINKS = $CONFIG_LINKS
14302 CONFIG_COMMANDS = $CONFIG_COMMANDS
14303 $ $0 $@
14304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305on `(hostname || uname -n) 2>/dev/null | sed 1q`
14306"
14307
Martin v. Löwis11437992002-04-12 09:54:03 +000014308_ACEOF
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310case $ac_config_files in *"
14311"*) set x $ac_config_files; shift; ac_config_files=$*;;
14312esac
14313
14314case $ac_config_headers in *"
14315"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14316esac
14317
14318
14319cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014320# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014321config_files="$ac_config_files"
14322config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014324_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014327ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014328\`$as_me' instantiates files and other configuration actions
14329from templates according to the current configuration. Unless the files
14330and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014333
14334 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 --config print configuration, then exit
14337 -q, --quiet, --silent
14338 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014339 -d, --debug don't remove temporary files
14340 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 --file=FILE[:TEMPLATE]
14342 instantiate the configuration file FILE
14343 --header=FILE[:TEMPLATE]
14344 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
14346Configuration files:
14347$config_files
14348
14349Configuration headers:
14350$config_headers
14351
Matthias Kloseb9621712010-04-24 17:59:49 +000014352Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14356ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014357ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014358python config.status 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014359configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014362Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014363This config.status script is free software; the Free Software Foundation
14364gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365
14366ac_pwd='$ac_pwd'
14367srcdir='$srcdir'
14368INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014369test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014370_ACEOF
14371
Matthias Kloseb9621712010-04-24 17:59:49 +000014372cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14373# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014374ac_need_defaults=:
14375while test $# != 0
14376do
14377 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014378 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014379 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14380 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014381 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014382 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014383 --*=)
14384 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14385 ac_optarg=
14386 ac_shift=:
14387 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014389 ac_option=$1
14390 ac_optarg=$2
14391 ac_shift=shift
14392 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014393 esac
14394
Skip Montanaro6dead952003-09-25 14:50:04 +000014395 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014397 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14398 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014399 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 $as_echo "$ac_cs_version"; exit ;;
14401 --config | --confi | --conf | --con | --co | --c )
14402 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014404 debug=: ;;
14405 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014406 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 case $ac_optarg in
14408 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014409 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 esac
14411 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014412 ac_need_defaults=false;;
14413 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014414 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 case $ac_optarg in
14416 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14417 esac
14418 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014419 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420 --he | --h)
14421 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014422 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014423Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014424 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014426 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14427 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14428 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
14430 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014431 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014432Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014435 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
14437 esac
14438 shift
14439done
14440
Skip Montanaro6dead952003-09-25 14:50:04 +000014441ac_configure_extra_args=
14442
14443if $ac_cs_silent; then
14444 exec 6>/dev/null
14445 ac_configure_extra_args="$ac_configure_extra_args --silent"
14446fi
14447
14448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014449cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014450if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14452 shift
14453 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14454 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014457fi
14458
Martin v. Löwis11437992002-04-12 09:54:03 +000014459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461exec 5>>config.log
14462{
14463 echo
14464 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14465## Running $as_me. ##
14466_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014468} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014473
Matthias Kloseb9621712010-04-24 17:59:49 +000014474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014475
14476# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014477for ac_config_target in $ac_config_targets
14478do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479 case $ac_config_target in
14480 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14481 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14482 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014483 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14484 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14486 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014487 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014488 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014490 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 esac
14492done
14493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495# If the user did not use the arguments to specify the items to instantiate,
14496# then the envvar interface is used. Set only those that are not.
14497# We use the long form for the default assignment because of an extremely
14498# bizarre bug on SunOS 4.1.3.
14499if $ac_need_defaults; then
14500 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14501 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14502fi
14503
Skip Montanaro6dead952003-09-25 14:50:04 +000014504# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014506# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507# Hook for its removal unless debugging.
14508# Note that there is a small window in which the directory will not be cleaned:
14509# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014510$debug ||
14511{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014512 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014514 : "${ac_tmp:=$tmp}"
14515 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014518}
Martin v. Löwis11437992002-04-12 09:54:03 +000014519# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014523 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014524} ||
14525{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014526 tmp=./conf$$-$RANDOM
14527 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014528} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14529ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
Matthias Kloseb9621712010-04-24 17:59:49 +000014531# Set up the scripts for CONFIG_FILES section.
14532# No need to generate them if there are no CONFIG_FILES.
14533# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014534if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536
14537ac_cr=`echo X | tr X '\015'`
14538# On cygwin, bash can eat \r inside `` if the user requested igncr.
14539# But we know of no other shell where ac_cr would be empty at this
14540# point, so we can use a bashism as a fallback.
14541if test "x$ac_cr" = x; then
14542 eval ac_cr=\$\'\\r\'
14543fi
14544ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14545if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014546 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014547else
14548 ac_cs_awk_cr=$ac_cr
14549fi
14550
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014551echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014552_ACEOF
14553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555{
14556 echo "cat >conf$$subs.awk <<_ACEOF" &&
14557 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14558 echo "_ACEOF"
14559} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014560 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14561ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562ac_delim='%!_!# '
14563for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014565 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14568 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569 break
14570 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014571 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572 else
14573 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014574 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575done
Matthias Kloseb9621712010-04-24 17:59:49 +000014576rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014579cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014581sed -n '
14582h
14583s/^/S["/; s/!.*/"]=/
14584p
14585g
14586s/^[^!]*!//
14587:repl
14588t repl
14589s/'"$ac_delim"'$//
14590t delim
14591:nl
14592h
14593s/\(.\{148\}\)..*/\1/
14594t more1
14595s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14596p
14597n
14598b repl
14599:more1
14600s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14601p
14602g
14603s/.\{148\}//
14604t nl
14605:delim
14606h
14607s/\(.\{148\}\)..*/\1/
14608t more2
14609s/["\\]/\\&/g; s/^/"/; s/$/"/
14610p
14611b
14612:more2
14613s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14614p
14615g
14616s/.\{148\}//
14617t delim
14618' <conf$$subs.awk | sed '
14619/^[^""]/{
14620 N
14621 s/\n//
14622}
14623' >>$CONFIG_STATUS || ac_write_fail=1
14624rm -f conf$$subs.awk
14625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14626_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014627cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 for (key in S) S_is_set[key] = 1
14629 FS = ""
14630
14631}
14632{
14633 line = $ 0
14634 nfields = split(line, field, "@")
14635 substed = 0
14636 len = length(field[1])
14637 for (i = 2; i < nfields; i++) {
14638 key = field[i]
14639 keylen = length(key)
14640 if (S_is_set[key]) {
14641 value = S[key]
14642 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14643 len += length(value) + length(field[++i])
14644 substed = 1
14645 } else
14646 len += 1 + keylen
14647 }
14648
14649 print line
14650}
14651
14652_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14655if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14656 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14657else
14658 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014659fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14660 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014661_ACEOF
14662
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014663# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14664# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665# trailing colons and then remove the whole line if VPATH becomes empty
14666# (actually we leave an empty line to preserve line numbers).
14667if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014668 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14669h
14670s///
14671s/^/:/
14672s/[ ]*$/:/
14673s/:\$(srcdir):/:/g
14674s/:\${srcdir}:/:/g
14675s/:@srcdir@:/:/g
14676s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014678x
14679s/\(=[ ]*\).*/\1/
14680G
14681s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682s/^[^=]*=[ ]*$//
14683}'
14684fi
14685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014687fi # test -n "$CONFIG_FILES"
14688
Matthias Kloseb9621712010-04-24 17:59:49 +000014689# Set up the scripts for CONFIG_HEADERS section.
14690# No need to generate them if there are no CONFIG_HEADERS.
14691# This happens for instance with `./config.status Makefile'.
14692if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014693cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014694BEGIN {
14695_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697# Transform confdefs.h into an awk script `defines.awk', embedded as
14698# here-document in config.status, that substitutes the proper values into
14699# config.h.in to produce config.h.
14700
14701# Create a delimiter string that does not exist in confdefs.h, to ease
14702# handling of long lines.
14703ac_delim='%!_!# '
14704for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014705 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14706 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 break
14708 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014709 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 else
14711 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14712 fi
14713done
14714
14715# For the awk script, D is an array of macro values keyed by name,
14716# likewise P contains macro parameters if any. Preserve backslash
14717# newline sequences.
14718
14719ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14720sed -n '
14721s/.\{148\}/&'"$ac_delim"'/g
14722t rset
14723:rset
14724s/^[ ]*#[ ]*define[ ][ ]*/ /
14725t def
14726d
14727:def
14728s/\\$//
14729t bsnl
14730s/["\\]/\\&/g
14731s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14732D["\1"]=" \3"/p
14733s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14734d
14735:bsnl
14736s/["\\]/\\&/g
14737s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14738D["\1"]=" \3\\\\\\n"\\/p
14739t cont
14740s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14741t cont
14742d
14743:cont
14744n
14745s/.\{148\}/&'"$ac_delim"'/g
14746t clear
14747:clear
14748s/\\$//
14749t bsnlc
14750s/["\\]/\\&/g; s/^/"/; s/$/"/p
14751d
14752:bsnlc
14753s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14754b cont
14755' <confdefs.h | sed '
14756s/'"$ac_delim"'/"\\\
14757"/g' >>$CONFIG_STATUS || ac_write_fail=1
14758
14759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14760 for (key in D) D_is_set[key] = 1
14761 FS = ""
14762}
14763/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14764 line = \$ 0
14765 split(line, arg, " ")
14766 if (arg[1] == "#") {
14767 defundef = arg[2]
14768 mac1 = arg[3]
14769 } else {
14770 defundef = substr(arg[1], 2)
14771 mac1 = arg[2]
14772 }
14773 split(mac1, mac2, "(") #)
14774 macro = mac2[1]
14775 prefix = substr(line, 1, index(line, defundef) - 1)
14776 if (D_is_set[macro]) {
14777 # Preserve the white space surrounding the "#".
14778 print prefix "define", macro P[macro] D[macro]
14779 next
14780 } else {
14781 # Replace #undef with comments. This is necessary, for example,
14782 # in the case of _POSIX_SOURCE, which is predefined and required
14783 # on some systems where configure will not decide to define it.
14784 if (defundef == "undef") {
14785 print "/*", prefix defundef, macro, "*/"
14786 next
14787 }
14788 }
14789}
14790{ print }
14791_ACAWK
14792_ACEOF
14793cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014794 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014795fi # test -n "$CONFIG_HEADERS"
14796
14797
14798eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14799shift
14800for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014801do
14802 case $ac_tag in
14803 :[FHLC]) ac_mode=$ac_tag; continue;;
14804 esac
14805 case $ac_mode$ac_tag in
14806 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014807 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808 :[FH]-) ac_tag=-:-;;
14809 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14810 esac
14811 ac_save_IFS=$IFS
14812 IFS=:
14813 set x $ac_tag
14814 IFS=$ac_save_IFS
14815 shift
14816 ac_file=$1
14817 shift
14818
14819 case $ac_mode in
14820 :L) ac_source=$1;;
14821 :[FH])
14822 ac_file_inputs=
14823 for ac_f
14824 do
14825 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014826 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827 *) # Look for the file first in the build tree, then in the source tree
14828 # (if the path is not absolute). The absolute path cannot be DOS-style,
14829 # because $ac_f cannot contain `:'.
14830 test -f "$ac_f" ||
14831 case $ac_f in
14832 [\\/$]*) false;;
14833 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14834 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014835 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14838 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014839 done
14840
14841 # Let's still pretend it is `configure' which instantiates (i.e., don't
14842 # use $as_me), people would be surprised to read:
14843 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 configure_input='Generated from '`
14845 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14846 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014847 if test x"$ac_file" != x-; then
14848 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14850$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 # Neutralize special characters interpreted by sed in replacement strings.
14853 case $configure_input in #(
14854 *\&* | *\|* | *\\* )
14855 ac_sed_conf_input=`$as_echo "$configure_input" |
14856 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14857 *) ac_sed_conf_input=$configure_input;;
14858 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859
14860 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014861 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14862 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014863 esac
14864 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 esac
14866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014868$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014869 X"$ac_file" : 'X\(//\)[^/]' \| \
14870 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014871 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014872$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014873 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14874 s//\1/
14875 q
14876 }
14877 /^X\(\/\/\)[^/].*/{
14878 s//\1/
14879 q
14880 }
14881 /^X\(\/\/\)$/{
14882 s//\1/
14883 q
14884 }
14885 /^X\(\/\).*/{
14886 s//\1/
14887 q
14888 }
14889 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014891 ac_builddir=.
14892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014893case "$ac_dir" in
14894.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14895*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014899 case $ac_top_builddir_sub in
14900 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14901 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14902 esac ;;
14903esac
14904ac_abs_top_builddir=$ac_pwd
14905ac_abs_builddir=$ac_pwd$ac_dir_suffix
14906# for backward compatibility:
14907ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014908
14909case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014910 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912 ac_top_srcdir=$ac_top_builddir_sub
14913 ac_abs_top_srcdir=$ac_pwd ;;
14914 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916 ac_top_srcdir=$srcdir
14917 ac_abs_top_srcdir=$srcdir ;;
14918 *) # Relative name.
14919 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14920 ac_top_srcdir=$ac_top_build_prefix$srcdir
14921 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014922esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014923ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014924
Martin v. Löwis11437992002-04-12 09:54:03 +000014925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014926 case $ac_mode in
14927 :F)
14928 #
14929 # CONFIG_FILE
14930 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014931
14932 case $INSTALL in
14933 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014936_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937
Matthias Kloseb9621712010-04-24 17:59:49 +000014938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939# If the template does not know about datarootdir, expand it.
14940# FIXME: This hack should be removed a few years after 2.60.
14941ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014942ac_sed_dataroot='
14943/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944 p
14945 q
14946}
14947/@datadir@/p
14948/@docdir@/p
14949/@infodir@/p
14950/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014951/@mandir@/p'
14952case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953*datarootdir*) ac_datarootdir_seen=yes;;
14954*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14956$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014958cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 ac_datarootdir_hack='
14960 s&@datadir@&$datadir&g
14961 s&@docdir@&$docdir&g
14962 s&@infodir@&$infodir&g
14963 s&@localedir@&$localedir&g
14964 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966esac
14967_ACEOF
14968
14969# Neutralize VPATH when `$srcdir' = `.'.
14970# Shell code in configure.ac might set extrasub.
14971# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14973ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014974$extrasub
14975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014977:t
14978/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014979s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014981s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982s&@srcdir@&$ac_srcdir&;t t
14983s&@abs_srcdir@&$ac_abs_srcdir&;t t
14984s&@top_srcdir@&$ac_top_srcdir&;t t
14985s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14986s&@builddir@&$ac_builddir&;t t
14987s&@abs_builddir@&$ac_abs_builddir&;t t
14988s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14989s&@INSTALL@&$ac_INSTALL&;t t
14990$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014991"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014992eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
14993 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014996 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
14997 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
14998 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015000which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015001$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015002which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015003
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015004 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015006 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15007 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015009 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010 ;;
15011 :H)
15012 #
15013 # CONFIG_HEADER
15014 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015015 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 {
15017 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015018 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15019 } >"$ac_tmp/config.h" \
15020 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15021 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15023$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015026 mv "$ac_tmp/config.h" "$ac_file" \
15027 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 fi
15029 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015031 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15032 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015034 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036
15037 esac
15038
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015039
15040 case $ac_file$ac_mode in
15041 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15042
15043 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044done # for ac_tag
15045
Guido van Rossum627b2d71993-12-24 10:39:16 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015048_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015049ac_clean_files=$ac_clean_files_save
15050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015052 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015053
Martin v. Löwis11437992002-04-12 09:54:03 +000015054
15055# configure is writing to config.log, and then calls config.status.
15056# config.status does its own redirection, appending to config.log.
15057# Unfortunately, on DOS this fails, as config.log is still kept open
15058# by configure, so config.status won't be able to write to it; its
15059# output is simply discarded. So we exec the FD to /dev/null,
15060# effectively closing config.log, so it can be properly (re)opened and
15061# appended to by config.status. When coming back to configure, we
15062# need to make the FD available again.
15063if test "$no_create" != yes; then
15064 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015065 ac_config_status_args=
15066 test "$silent" = yes &&
15067 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015068 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015069 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 exec 5>>config.log
15071 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15072 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015073 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015074fi
15075if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15077$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015078fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015079
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015080
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015081echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015082if test ! -f Modules/Setup
15083then
15084 cp $srcdir/Modules/Setup.dist Modules/Setup
15085fi
15086
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015087echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015088if test ! -f Modules/Setup.local
15089then
15090 echo "# Edit this file for local setup changes" >Modules/Setup.local
15091fi
15092
15093echo "creating Makefile"
15094$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15095 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015096 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015097mv config.c Modules