blob: 6d3f85efbdbf97484a233162ba9f45e7dd29f52b [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.
Martin v. Löwis4e9da472011-05-09 07:41:32 +02004# 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
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200670NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000671MAINCC
672CXX
673OBJEXT
674EXEEXT
675ac_ct_CC
676CPPFLAGS
677LDFLAGS
678CFLAGS
679CC
680EXPORT_MACOSX_DEPLOYMENT_TARGET
681CONFIGURE_MACOSX_DEPLOYMENT_TARGET
682SGI_ABI
683MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000684FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000685FRAMEWORKUNIXTOOLSPREFIX
686FRAMEWORKALTINSTALLLAST
687FRAMEWORKALTINSTALLFIRST
688FRAMEWORKINSTALLLAST
689FRAMEWORKINSTALLFIRST
690PYTHONFRAMEWORKINSTALLDIR
691PYTHONFRAMEWORKPREFIX
692PYTHONFRAMEWORKDIR
693PYTHONFRAMEWORKIDENTIFIER
694PYTHONFRAMEWORK
695LIPO_32BIT_FLAGS
696ARCH_RUN_32BIT
697UNIVERSALSDK
698CONFIG_ARGS
699SOVERSION
700VERSION
701target_alias
702host_alias
703build_alias
704LIBS
705ECHO_T
706ECHO_N
707ECHO_C
708DEFS
709mandir
710localedir
711libdir
712psdir
713pdfdir
714dvidir
715htmldir
716infodir
717docdir
718oldincludedir
719includedir
720localstatedir
721sharedstatedir
722sysconfdir
723datadir
724datarootdir
725libexecdir
726sbindir
727bindir
728program_transform_name
729prefix
730exec_prefix
731PACKAGE_URL
732PACKAGE_BUGREPORT
733PACKAGE_STRING
734PACKAGE_VERSION
735PACKAGE_TARNAME
736PACKAGE_NAME
737PATH_SEPARATOR
738SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000740ac_user_opts='
741enable_option_checking
742enable_universalsdk
743with_universal_archs
744with_framework_name
745enable_framework
746with_gcc
747with_cxx_main
748with_suffix
749enable_shared
750enable_profiling
751with_pydebug
752with_libs
753with_system_expat
754with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000755enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000756with_dbmliborder
757with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000758with_threads
759with_thread
760enable_ipv6
761with_doc_strings
762with_tsc
763with_pymalloc
764with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000765with_fpectl
766with_libm
767with_libc
768enable_big_digits
769with_wide_unicode
770with_computed_gotos
771'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000772 ac_precious_vars='build_alias
773host_alias
774target_alias
775CC
776CFLAGS
777LDFLAGS
778LIBS
779CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200780CPP'
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
Matthias Kloseb9621712010-04-24 17:59:49 +00001573# ac_fn_c_try_link LINENO
1574# -----------------------
1575# Try to link conftest.$ac_ext, and return whether this succeeded.
1576ac_fn_c_try_link ()
1577{
1578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1579 rm -f conftest.$ac_objext conftest$ac_exeext
1580 if { { ac_try="$ac_link"
1581case "(($ac_try" in
1582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583 *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587 (eval "$ac_link") 2>conftest.err
1588 ac_status=$?
1589 if test -s conftest.err; then
1590 grep -v '^ *+' conftest.err >conftest.er1
1591 cat conftest.er1 >&5
1592 mv -f conftest.er1 conftest.err
1593 fi
1594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1595 test $ac_status = 0; } && {
1596 test -z "$ac_c_werror_flag" ||
1597 test ! -s conftest.err
1598 } && test -s conftest$ac_exeext && {
1599 test "$cross_compiling" = yes ||
1600 $as_test_x conftest$ac_exeext
1601 }; then :
1602 ac_retval=0
1603else
1604 $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607 ac_retval=1
1608fi
1609 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1610 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1611 # interfere with the next link command; also delete a directory that is
1612 # left behind by Apple's compiler. We do this before executing the actions.
1613 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis48e14d32011-05-09 07:37:45 +02001614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 as_fn_set_status $ac_retval
1616
1617} # ac_fn_c_try_link
1618
Matthias Kloseb9621712010-04-24 17:59:49 +00001619# ac_fn_c_try_cpp LINENO
1620# ----------------------
1621# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1622ac_fn_c_try_cpp ()
1623{
1624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625 if { { ac_try="$ac_cpp conftest.$ac_ext"
1626case "(($ac_try" in
1627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628 *) ac_try_echo=$ac_try;;
1629esac
1630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631$as_echo "$ac_try_echo"; } >&5
1632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1633 ac_status=$?
1634 if test -s conftest.err; then
1635 grep -v '^ *+' conftest.err >conftest.er1
1636 cat conftest.er1 >&5
1637 mv -f conftest.er1 conftest.err
1638 fi
1639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1640 test $ac_status = 0; } > conftest.i && {
1641 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1642 test ! -s conftest.err
1643 }; then :
1644 ac_retval=0
1645else
1646 $as_echo "$as_me: failed program was:" >&5
1647sed 's/^/| /' conftest.$ac_ext >&5
1648
1649 ac_retval=1
1650fi
1651 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1652 as_fn_set_status $ac_retval
1653
1654} # ac_fn_c_try_cpp
1655
1656# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1657# -------------------------------------------------------
1658# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1659# the include files in INCLUDES and setting the cache variable VAR
1660# accordingly.
1661ac_fn_c_check_header_mongrel ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664 if eval \${$3+:} false; then :
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1666$as_echo_n "checking for $2... " >&6; }
1667if eval \${$3+:} false; then :
1668 $as_echo_n "(cached) " >&6
1669fi
1670eval ac_res=\$$3
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1672$as_echo "$ac_res" >&6; }
1673else
1674 # Is the header compilable?
1675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1676$as_echo_n "checking $2 usability... " >&6; }
1677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1678/* end confdefs.h. */
1679$4
1680#include <$2>
1681_ACEOF
1682if ac_fn_c_try_compile "$LINENO"; then :
1683 ac_header_compiler=yes
1684else
1685 ac_header_compiler=no
1686fi
1687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1689$as_echo "$ac_header_compiler" >&6; }
1690
1691# Is the header present?
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1693$as_echo_n "checking $2 presence... " >&6; }
1694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1695/* end confdefs.h. */
1696#include <$2>
1697_ACEOF
1698if ac_fn_c_try_cpp "$LINENO"; then :
1699 ac_header_preproc=yes
1700else
1701 ac_header_preproc=no
1702fi
1703rm -f conftest.err conftest.i conftest.$ac_ext
1704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1705$as_echo "$ac_header_preproc" >&6; }
1706
1707# So? What about this header?
1708case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1709 yes:no: )
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1711$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1713$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1714 ;;
1715 no:yes:* )
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1717$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1719$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1721$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1723$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1725$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1726( $as_echo "## -------------------------------------- ##
1727## Report this to http://bugs.python.org/ ##
1728## -------------------------------------- ##"
1729 ) | sed "s/^/$as_me: WARNING: /" >&2
1730 ;;
1731esac
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
1734if eval \${$3+:} false; then :
1735 $as_echo_n "(cached) " >&6
1736else
1737 eval "$3=\$ac_header_compiler"
1738fi
1739eval ac_res=\$$3
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1741$as_echo "$ac_res" >&6; }
1742fi
1743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744
1745} # ac_fn_c_check_header_mongrel
1746
1747# ac_fn_c_try_run LINENO
1748# ----------------------
1749# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1750# that executables *can* be run.
1751ac_fn_c_try_run ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 if { { ac_try="$ac_link"
1755case "(($ac_try" in
1756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757 *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761 (eval "$ac_link") 2>&5
1762 ac_status=$?
1763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1765 { { case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771 (eval "$ac_try") 2>&5
1772 ac_status=$?
1773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774 test $ac_status = 0; }; }; then :
1775 ac_retval=0
1776else
1777 $as_echo "$as_me: program exited with status $ac_status" >&5
1778 $as_echo "$as_me: failed program was:" >&5
1779sed 's/^/| /' conftest.$ac_ext >&5
1780
1781 ac_retval=$ac_status
1782fi
1783 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1785 as_fn_set_status $ac_retval
1786
1787} # ac_fn_c_try_run
1788
1789# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1790# -------------------------------------------------------
1791# Tests whether HEADER exists and can be compiled using the include files in
1792# INCLUDES, setting the cache variable VAR accordingly.
1793ac_fn_c_check_header_compile ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797$as_echo_n "checking for $2... " >&6; }
1798if eval \${$3+:} false; then :
1799 $as_echo_n "(cached) " >&6
1800else
1801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h. */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807 eval "$3=yes"
1808else
1809 eval "$3=no"
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812fi
1813eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
1816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1817
1818} # ac_fn_c_check_header_compile
1819
Matthias Kloseb9621712010-04-24 17:59:49 +00001820# 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öwis48e14d32011-05-09 07:37:45 +02004169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4170$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4171save_LDFLAGS="$LDFLAGS"
4172LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004173
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4175/* end confdefs.h. */
4176
4177int
4178main ()
4179{
4180
4181 ;
4182 return 0;
4183}
4184_ACEOF
4185if ac_fn_c_try_link "$LINENO"; then :
4186 NO_AS_NEEDED="-Wl,--no-as-needed"
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4188$as_echo "yes" >&6; }
4189else
4190 NO_AS_NEEDED=""
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4192$as_echo "no" >&6; }
4193fi
4194rm -f core conftest.err conftest.$ac_objext \
4195 conftest$ac_exeext conftest.$ac_ext
4196LDFLAGS="$save_LDFLAGS"
4197
4198
4199
4200# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004201ac_ext=c
4202ac_cpp='$CPP $CPPFLAGS'
4203ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4204ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4205ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4207$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004208# On Suns, sometimes $CPP names a directory.
4209if test -n "$CPP" && test -d "$CPP"; then
4210 CPP=
4211fi
4212if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004213 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004215else
Martin v. Löwis11437992002-04-12 09:54:03 +00004216 # Double quotes because CPP needs to be expanded
4217 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4218 do
4219 ac_preproc_ok=false
4220for ac_c_preproc_warn_flag in '' yes
4221do
4222 # Use a header file that comes with gcc, so configuring glibc
4223 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004224 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4225 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004226 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004227 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
4230#ifdef __STDC__
4231# include <limits.h>
4232#else
4233# include <assert.h>
4234#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004235 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004237if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004238
Matthias Kloseb9621712010-04-24 17:59:49 +00004239else
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 # Broken: fails on valid input.
4241continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004242fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004243rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004246 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004249#include <ac_nonexistent.h>
4250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 # Broken: success on invalid input.
4253continue
4254else
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # Passes both tests.
4256ac_preproc_ok=:
4257break
4258fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004259rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004260
4261done
4262# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004263rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 break
4266fi
4267
4268 done
4269 ac_cv_prog_CPP=$CPP
4270
4271fi
4272 CPP=$ac_cv_prog_CPP
4273else
4274 ac_cv_prog_CPP=$CPP
4275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4277$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004278ac_preproc_ok=false
4279for ac_c_preproc_warn_flag in '' yes
4280do
4281 # Use a header file that comes with gcc, so configuring glibc
4282 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004283 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4284 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004285 # On the NeXT, cc -E runs the code through the compiler's parser,
4286 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* end confdefs.h. */
4289#ifdef __STDC__
4290# include <limits.h>
4291#else
4292# include <assert.h>
4293#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004296if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004297
Matthias Kloseb9621712010-04-24 17:59:49 +00004298else
Martin v. Löwis11437992002-04-12 09:54:03 +00004299 # Broken: fails on valid input.
4300continue
4301fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004302rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004308#include <ac_nonexistent.h>
4309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004310if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004311 # Broken: success on invalid input.
4312continue
4313else
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 # Passes both tests.
4315ac_preproc_ok=:
4316break
4317fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004318rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004319
4320done
4321# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004322rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004323if $ac_preproc_ok; then :
4324
Martin v. Löwis11437992002-04-12 09:54:03 +00004325else
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004328as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4329See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004330fi
4331
4332ac_ext=c
4333ac_cpp='$CPP $CPPFLAGS'
4334ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4335ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4336ac_compiler_gnu=$ac_cv_c_compiler_gnu
4337
4338
Matthias Kloseb9621712010-04-24 17:59:49 +00004339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4340$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004341if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004343else
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 # Loop through the user's path and test for each of PROGNAME-LIST
4347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4349do
4350 IFS=$as_save_IFS
4351 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 for ac_prog in grep ggrep; do
4353 for ac_exec_ext in '' $ac_executable_extensions; do
4354 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4355 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4356# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 # Check for GNU $ac_path_GREP
4358case `"$ac_path_GREP" --version 2>&1` in
4359*GNU*)
4360 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4361*)
4362 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364 while :
4365 do
4366 cat "conftest.in" "conftest.in" >"conftest.tmp"
4367 mv "conftest.tmp" "conftest.in"
4368 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4371 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4374 # Best one so far, save it but keep looking for a better one
4375 ac_cv_path_GREP="$ac_path_GREP"
4376 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 # 10*(2^10) chars as input seems more than enough
4379 test $ac_count -gt 10 && break
4380 done
4381 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4382esac
4383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 $ac_path_GREP_found && break 3
4385 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004390 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 +00004391 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392else
4393 ac_cv_path_GREP=$GREP
4394fi
4395
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4398$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 GREP="$ac_cv_path_GREP"
4400
4401
Matthias Kloseb9621712010-04-24 17:59:49 +00004402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4403$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004404if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406else
4407 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4408 then ac_cv_path_EGREP="$GREP -E"
4409 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 # Loop through the user's path and test for each of PROGNAME-LIST
4413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4415do
4416 IFS=$as_save_IFS
4417 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004418 for ac_prog in egrep; do
4419 for ac_exec_ext in '' $ac_executable_extensions; do
4420 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4421 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4422# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423 # Check for GNU $ac_path_EGREP
4424case `"$ac_path_EGREP" --version 2>&1` in
4425*GNU*)
4426 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4427*)
4428 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004429 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004430 while :
4431 do
4432 cat "conftest.in" "conftest.in" >"conftest.tmp"
4433 mv "conftest.tmp" "conftest.in"
4434 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004435 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4437 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004438 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4440 # Best one so far, save it but keep looking for a better one
4441 ac_cv_path_EGREP="$ac_path_EGREP"
4442 ac_path_EGREP_max=$ac_count
4443 fi
4444 # 10*(2^10) chars as input seems more than enough
4445 test $ac_count -gt 10 && break
4446 done
4447 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4448esac
4449
Matthias Kloseb9621712010-04-24 17:59:49 +00004450 $ac_path_EGREP_found && break 3
4451 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004454IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004455 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004456 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 +00004457 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004458else
4459 ac_cv_path_EGREP=$EGREP
4460fi
4461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004462 fi
4463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4465$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004467
4468
Matthias Kloseb9621712010-04-24 17:59:49 +00004469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4470$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004471if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 $as_echo_n "(cached) " >&6
4473else
4474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004475/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004476#include <stdlib.h>
4477#include <stdarg.h>
4478#include <string.h>
4479#include <float.h>
4480
4481int
4482main ()
4483{
4484
4485 ;
4486 return 0;
4487}
4488_ACEOF
4489if ac_fn_c_try_compile "$LINENO"; then :
4490 ac_cv_header_stdc=yes
4491else
4492 ac_cv_header_stdc=no
4493fi
4494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4495
4496if test $ac_cv_header_stdc = yes; then
4497 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499/* end confdefs.h. */
4500#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004501
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004502_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004505
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004506else
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004509rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004510
Matthias Kloseb9621712010-04-24 17:59:49 +00004511fi
4512
4513if test $ac_cv_header_stdc = yes; then
4514 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4516/* end confdefs.h. */
4517#include <stdlib.h>
4518
4519_ACEOF
4520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4521 $EGREP "free" >/dev/null 2>&1; then :
4522
4523else
4524 ac_cv_header_stdc=no
4525fi
4526rm -f conftest*
4527
4528fi
4529
4530if test $ac_cv_header_stdc = yes; then
4531 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4532 if test "$cross_compiling" = yes; then :
4533 :
4534else
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4536/* end confdefs.h. */
4537#include <ctype.h>
4538#include <stdlib.h>
4539#if ((' ' & 0x0FF) == 0x020)
4540# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4541# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4542#else
4543# define ISLOWER(c) \
4544 (('a' <= (c) && (c) <= 'i') \
4545 || ('j' <= (c) && (c) <= 'r') \
4546 || ('s' <= (c) && (c) <= 'z'))
4547# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4548#endif
4549
4550#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4551int
4552main ()
4553{
4554 int i;
4555 for (i = 0; i < 256; i++)
4556 if (XOR (islower (i), ISLOWER (i))
4557 || toupper (i) != TOUPPER (i))
4558 return 2;
4559 return 0;
4560}
4561_ACEOF
4562if ac_fn_c_try_run "$LINENO"; then :
4563
4564else
4565 ac_cv_header_stdc=no
4566fi
4567rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4568 conftest.$ac_objext conftest.beam conftest.$ac_ext
4569fi
4570
4571fi
4572fi
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4574$as_echo "$ac_cv_header_stdc" >&6; }
4575if test $ac_cv_header_stdc = yes; then
4576
4577$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4578
4579fi
4580
4581# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4582for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4583 inttypes.h stdint.h unistd.h
4584do :
4585 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4586ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4587"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004588if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004589 cat >>confdefs.h <<_ACEOF
4590#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4591_ACEOF
4592
4593fi
4594
4595done
4596
4597
4598
4599 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 +00004600if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004601 MINIX=yes
4602else
4603 MINIX=
4604fi
4605
4606
4607 if test "$MINIX" = yes; then
4608
4609$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4610
4611
4612$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4613
4614
4615$as_echo "#define _MINIX 1" >>confdefs.h
4616
4617 fi
4618
4619
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4621$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004622if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004623 $as_echo_n "(cached) " >&6
4624else
4625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4626/* end confdefs.h. */
4627
4628# define __EXTENSIONS__ 1
4629 $ac_includes_default
4630int
4631main ()
4632{
4633
4634 ;
4635 return 0;
4636}
4637_ACEOF
4638if ac_fn_c_try_compile "$LINENO"; then :
4639 ac_cv_safe_to_define___extensions__=yes
4640else
4641 ac_cv_safe_to_define___extensions__=no
4642fi
4643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4644fi
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4646$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4647 test $ac_cv_safe_to_define___extensions__ = yes &&
4648 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4649
4650 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4651
4652 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4653
4654 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4655
4656 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4657
4658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004659
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004660# Check for unsupported systems
4661case $ac_sys_system/$ac_sys_release in
4662atheos*|Linux*/1*)
4663 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4664 echo See README for details.
4665 exit 1;;
4666esac
4667
4668
Matthias Kloseb9621712010-04-24 17:59:49 +00004669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4670$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671
4672# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004673if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004674 withval=$with_suffix;
4675 case $withval in
4676 no) EXEEXT=;;
4677 yes) EXEEXT=.exe;;
4678 *) EXEEXT=$withval;;
4679 esac
4680fi
4681
Matthias Kloseb9621712010-04-24 17:59:49 +00004682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4683$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004684
4685# Test whether we're running on a non-case-sensitive system, in which
4686# case we give a warning if no ext is given
4687
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4689$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004690if test ! -d CaseSensitiveTestDir; then
4691mkdir CaseSensitiveTestDir
4692fi
4693
4694if test -d casesensitivetestdir
4695then
Matthias Kloseb9621712010-04-24 17:59:49 +00004696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4697$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004698 BUILDEXEEXT=.exe
4699else
Matthias Kloseb9621712010-04-24 17:59:49 +00004700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004702 BUILDEXEEXT=$EXEEXT
4703fi
4704rmdir CaseSensitiveTestDir
4705
4706case $MACHDEP in
4707bsdos*)
4708 case $CC in
4709 gcc) CC="$CC -D_HAVE_BSDI";;
4710 esac;;
4711esac
4712
4713case $ac_sys_system in
4714hp*|HP*)
4715 case $CC in
4716 cc|*/cc) CC="$CC -Ae";;
4717 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004718esac
4719
4720
4721
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4723$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724if test -z "$LIBRARY"
4725then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004726 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4729$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004730
4731# LDLIBRARY is the name of the library to link against (as opposed to the
4732# name of the library into which to insert object files). BLDLIBRARY is also
4733# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4734# is blank as the main program is not linked directly against LDLIBRARY.
4735# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4736# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4737# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4738# DLLLIBRARY is the shared (i.e., DLL) library.
4739#
4740# RUNSHARED is used to run shared python without installed libraries
4741#
4742# INSTSONAME is the name of the shared library that will be use to install
4743# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004744#
4745# LDVERSION is the shared library version number, normally the Python version
4746# with the ABI build flags appended.
4747
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004748
4749
4750
4751
4752
4753
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755LDLIBRARY="$LIBRARY"
4756BLDLIBRARY='$(LDLIBRARY)'
4757INSTSONAME='$(LDLIBRARY)'
4758DLLLIBRARY=''
4759LDLIBRARYDIR=''
4760RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004761LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004762
4763# LINKCC is the command that links the python executable -- default is $(CC).
4764# If CXX is set, and if it is needed to link a main function that was
4765# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4766# python might then depend on the C++ runtime
4767# This is altered for AIX in order to build the export list before
4768# linking.
4769
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4771$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004772if test -z "$LINKCC"
4773then
4774 LINKCC='$(PURIFY) $(MAINCC)'
4775 case $ac_sys_system in
4776 AIX*)
4777 exp_extra="\"\""
4778 if test $ac_sys_release -ge 5 -o \
4779 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4780 exp_extra="."
4781 fi
4782 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783 QNX*)
4784 # qcc must be used because the other compilers do not
4785 # support -N.
4786 LINKCC=qcc;;
4787 esac
4788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4790$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004791
4792# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4793# make sure we default having it set to "no": this is used by
4794# distutils.unixccompiler to know if it should add --enable-new-dtags
4795# to linker command lines, and failing to detect GNU ld simply results
4796# in the same bahaviour as before.
4797
Matthias Kloseb9621712010-04-24 17:59:49 +00004798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4799$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004800ac_prog=ld
4801if test "$GCC" = yes; then
4802 ac_prog=`$CC -print-prog-name=ld`
4803fi
4804case `"$ac_prog" -V 2>&1 < /dev/null` in
4805 *GNU*)
4806 GNULD=yes;;
4807 *)
4808 GNULD=no;;
4809esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4811$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004812
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4814$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004815if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004816 $as_echo_n "(cached) " >&6
4817else
4818 ac_cv_c_inline=no
4819for ac_kw in inline __inline__ __inline; do
4820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4821/* end confdefs.h. */
4822#ifndef __cplusplus
4823typedef int foo_t;
4824static $ac_kw foo_t static_foo () {return 0; }
4825$ac_kw foo_t foo () {return 0; }
4826#endif
4827
4828_ACEOF
4829if ac_fn_c_try_compile "$LINENO"; then :
4830 ac_cv_c_inline=$ac_kw
4831fi
4832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4833 test "$ac_cv_c_inline" != no && break
4834done
4835
4836fi
4837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4838$as_echo "$ac_cv_c_inline" >&6; }
4839
4840case $ac_cv_c_inline in
4841 inline | yes) ;;
4842 *)
4843 case $ac_cv_c_inline in
4844 no) ac_val=;;
4845 *) ac_val=$ac_cv_c_inline;;
4846 esac
4847 cat >>confdefs.h <<_ACEOF
4848#ifndef __cplusplus
4849#define inline $ac_val
4850#endif
4851_ACEOF
4852 ;;
4853esac
4854
4855if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004856
4857$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004858
4859
4860fi
4861
4862
Matthias Kloseb9621712010-04-24 17:59:49 +00004863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4864$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004865# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004866if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004867 enableval=$enable_shared;
4868fi
4869
4870
4871if test -z "$enable_shared"
4872then
4873 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004874 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004875 enable_shared="yes";;
4876 *)
4877 enable_shared="no";;
4878 esac
4879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4881$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004882
Matthias Kloseb9621712010-04-24 17:59:49 +00004883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4884$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004886if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004887 enableval=$enable_profiling; ac_save_cc="$CC"
4888 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004889 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004890 ac_enable_profiling="no"
4891else
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004893/* end confdefs.h. */
4894int main() { return 0; }
4895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004897 ac_enable_profiling="yes"
4898else
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004903fi
4904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004905 CC="$ac_save_cc"
4906fi
4907
Matthias Kloseb9621712010-04-24 17:59:49 +00004908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4909$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004910
4911case "$ac_enable_profiling" in
4912 "yes")
4913 BASECFLAGS="-pg $BASECFLAGS"
4914 LDFLAGS="-pg $LDFLAGS"
4915 ;;
4916esac
4917
Matthias Kloseb9621712010-04-24 17:59:49 +00004918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4919$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004920
4921# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4922# library that we build, but we do not want to link against it (we
4923# will find it with a -framework option). For this reason there is an
4924# extra variable BLDLIBRARY against which Python and the extension
4925# modules are linked, BLDLIBRARY. This is normally the same as
4926# LDLIBRARY, but empty for MacOSX framework builds.
4927if test "$enable_framework"
4928then
4929 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4930 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4931 BLDLIBRARY=''
4932else
4933 BLDLIBRARY='$(LDLIBRARY)'
4934fi
4935
4936# Other platforms follow
4937if test $enable_shared = "yes"; then
4938
Matthias Kloseb9621712010-04-24 17:59:49 +00004939$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004940
4941 case $ac_sys_system in
4942 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004943 LDLIBRARY='libpython$(LDVERSION).dll.a'
4944 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004945 ;;
4946 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004947 LDLIBRARY='libpython$(LDVERSION).so'
4948 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004949 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4950 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004951 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004952 then
4953 PY3LIBRARY=libpython3.so
4954 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955 ;;
4956 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004957 LDLIBRARY='libpython$(LDVERSION).so'
4958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004959 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4960 case $ac_sys_system in
4961 FreeBSD*)
4962 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4963 ;;
4964 esac
4965 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004966 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004967 then
4968 PY3LIBRARY=libpython3.so
4969 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004970 ;;
4971 hp*|HP*)
4972 case `uname -m` in
4973 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004974 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004975 ;;
4976 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004977 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004978 ;;
4979 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004980 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004981 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4982 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004983 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004984 LDLIBRARY='libpython$(LDVERSION).dylib'
4985 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004986 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4987 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004988 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004989 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004990 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4991 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992
4993 esac
4994else # shared is disabled
4995 case $ac_sys_system in
4996 CYGWIN*)
4997 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004998 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999 ;;
5000 esac
5001fi
5002
Matthias Kloseb9621712010-04-24 17:59:49 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5004$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005005
5006if test -n "$ac_tool_prefix"; then
5007 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5008set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005011if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005013else
5014 if test -n "$RANLIB"; then
5015 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5016else
5017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in $PATH
5019do
5020 IFS=$as_save_IFS
5021 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005023 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5024 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005026 break 2
5027 fi
5028done
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005030IFS=$as_save_IFS
5031
5032fi
5033fi
5034RANLIB=$ac_cv_prog_RANLIB
5035if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5037$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005038else
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005041fi
5042
5043
5044fi
5045if test -z "$ac_cv_prog_RANLIB"; then
5046 ac_ct_RANLIB=$RANLIB
5047 # Extract the first word of "ranlib", so it can be a program name with args.
5048set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5050$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005051if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053else
5054 if test -n "$ac_ct_RANLIB"; then
5055 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5056else
5057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5058for as_dir in $PATH
5059do
5060 IFS=$as_save_IFS
5061 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005063 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5064 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005066 break 2
5067 fi
5068done
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005070IFS=$as_save_IFS
5071
5072fi
5073fi
5074ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5075if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5077$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005078else
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5080$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005081fi
5082
5083 if test "x$ac_ct_RANLIB" = x; then
5084 RANLIB=":"
5085 else
5086 case $cross_compiling:$ac_tool_warned in
5087yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005088{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5089$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090ac_tool_warned=yes ;;
5091esac
5092 RANLIB=$ac_ct_RANLIB
5093 fi
5094else
5095 RANLIB="$ac_cv_prog_RANLIB"
5096fi
5097
5098
5099for ac_prog in ar aal
5100do
5101 # Extract the first word of "$ac_prog", so it can be a program name with args.
5102set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005105if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107else
5108 if test -n "$AR"; then
5109 ac_cv_prog_AR="$AR" # Let the user override the test.
5110else
5111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112for as_dir in $PATH
5113do
5114 IFS=$as_save_IFS
5115 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5118 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120 break 2
5121 fi
5122done
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005124IFS=$as_save_IFS
5125
5126fi
5127fi
5128AR=$ac_cv_prog_AR
5129if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5131$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005132else
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135fi
5136
5137
5138 test -n "$AR" && break
5139done
5140test -n "$AR" || AR="ar"
5141
5142
5143# tweak ARFLAGS only if the user didn't set it on the command line
5144
5145if test -z "$ARFLAGS"
5146then
5147 ARFLAGS="rc"
5148fi
5149
5150
Georg Brandl1ca2e792011-03-05 20:51:24 +01005151
5152
5153# Extract the first word of "hg", so it can be a program name with args.
5154set dummy hg; ac_word=$2
5155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156$as_echo_n "checking for $ac_word... " >&6; }
5157if ${ac_cv_prog_HAS_HG+:} false; then :
5158 $as_echo_n "(cached) " >&6
5159else
5160 if test -n "$HAS_HG"; then
5161 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5162else
5163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in $PATH
5165do
5166 IFS=$as_save_IFS
5167 test -z "$as_dir" && as_dir=.
5168 for ac_exec_ext in '' $ac_executable_extensions; do
5169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5170 ac_cv_prog_HAS_HG="found"
5171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5172 break 2
5173 fi
5174done
5175 done
5176IFS=$as_save_IFS
5177
5178 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5179fi
5180fi
5181HAS_HG=$ac_cv_prog_HAS_HG
5182if test -n "$HAS_HG"; then
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5184$as_echo "$HAS_HG" >&6; }
5185else
5186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5187$as_echo "no" >&6; }
5188fi
5189
5190
5191if test $HAS_HG = found
5192then
5193 HGVERSION="hg id -i \$(srcdir)"
5194 HGTAG="hg id -t \$(srcdir)"
5195 HGBRANCH="hg id -b \$(srcdir)"
5196else
5197 HGVERSION=""
5198 HGTAG=""
5199 HGBRANCH=""
5200fi
5201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202case $MACHDEP in
5203bsdos*|hp*|HP*)
5204 # install -d does not work on BSDI or HP-UX
5205 if test -z "$INSTALL"
5206 then
5207 INSTALL="${srcdir}/install-sh -c"
5208 fi
5209esac
5210ac_aux_dir=
5211for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005212 if test -f "$ac_dir/install-sh"; then
5213 ac_aux_dir=$ac_dir
5214 ac_install_sh="$ac_aux_dir/install-sh -c"
5215 break
5216 elif test -f "$ac_dir/install.sh"; then
5217 ac_aux_dir=$ac_dir
5218 ac_install_sh="$ac_aux_dir/install.sh -c"
5219 break
5220 elif test -f "$ac_dir/shtool"; then
5221 ac_aux_dir=$ac_dir
5222 ac_install_sh="$ac_aux_dir/shtool install -c"
5223 break
5224 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225done
5226if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005227 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228fi
5229
5230# These three variables are undocumented and unsupported,
5231# and are intended to be withdrawn in a future Autoconf release.
5232# They can cause serious problems if a builder's source tree is in a directory
5233# whose full name contains unusual characters.
5234ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5235ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5236ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5237
5238
5239# Find a good install program. We prefer a C program (faster),
5240# so one script is as good as another. But avoid the broken or
5241# incompatible versions:
5242# SysV /etc/install, /usr/sbin/install
5243# SunOS /usr/etc/install
5244# IRIX /sbin/install
5245# AIX /bin/install
5246# AmigaOS /C/install, which installs bootblocks on floppy discs
5247# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5248# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5249# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5250# OS/2's system install, which has a completely different semantic
5251# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005252# Reject install programs that cannot install multiple files.
5253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5254$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005256if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005257 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005258else
5259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262 IFS=$as_save_IFS
5263 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005264 # Account for people who put trailing slashes in PATH elements.
5265case $as_dir/ in #((
5266 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005268 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269 /usr/ucb/* ) ;;
5270 *)
5271 # OSF1 and SCO ODT 3.0 have their own names for install.
5272 # Don't use installbsd from OSF since it installs stuff as root
5273 # by default.
5274 for ac_prog in ginstall scoinst install; do
5275 for ac_exec_ext in '' $ac_executable_extensions; do
5276 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5277 if test $ac_prog = install &&
5278 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5279 # AIX install. It has an incompatible calling convention.
5280 :
5281 elif test $ac_prog = install &&
5282 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5283 # program-specific install script used by HP pwplus--don't use.
5284 :
5285 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 rm -rf conftest.one conftest.two conftest.dir
5287 echo one > conftest.one
5288 echo two > conftest.two
5289 mkdir conftest.dir
5290 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5291 test -s conftest.one && test -s conftest.two &&
5292 test -s conftest.dir/conftest.one &&
5293 test -s conftest.dir/conftest.two
5294 then
5295 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5296 break 3
5297 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298 fi
5299 fi
5300 done
5301 done
5302 ;;
5303esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005304
5305 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306IFS=$as_save_IFS
5307
Matthias Kloseb9621712010-04-24 17:59:49 +00005308rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309
5310fi
5311 if test "${ac_cv_path_install+set}" = set; then
5312 INSTALL=$ac_cv_path_install
5313 else
5314 # As a last resort, use the slow shell script. Don't cache a
5315 # value for INSTALL within a source directory, because that will
5316 # break other packages using the cache if that directory is
5317 # removed, or if the value is a relative name.
5318 INSTALL=$ac_install_sh
5319 fi
5320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5322$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323
5324# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5325# It thinks the first close brace ends the variable substitution.
5326test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5327
5328test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5329
5330test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5331
5332
5333# Not every filesystem supports hard links
5334
5335if test -z "$LN" ; then
5336 case $ac_sys_system in
5337 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338 *) LN=ln;;
5339 esac
5340fi
5341
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005342# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005343
5344ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5348$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349
5350# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005351if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 withval=$with_pydebug;
5353if test "$withval" != no
5354then
5355
Matthias Kloseb9621712010-04-24 17:59:49 +00005356$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5359$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005361 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005362else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364fi
5365else
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368fi
5369
5370
5371# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5372# merged with this chunk of code?
5373
5374# Optimizer/debugger flags
5375# ------------------------
5376# (The following bit of code is complicated enough - please keep things
5377# indented properly. Just pretend you're editing Python code. ;-)
5378
5379# There are two parallel sets of case statements below, one that checks to
5380# see if OPT was set and one that does BASECFLAGS setting based upon
5381# compiler and platform. BASECFLAGS tweaks need to be made even if the
5382# user set OPT.
5383
5384# tweak OPT based on compiler and platform, only if the user didn't set
5385# it on the command line
5386
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005387if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388then
5389 case $GCC in
5390 yes)
5391 if test "$CC" != 'g++' ; then
5392 STRICT_PROTO="-Wstrict-prototypes"
5393 fi
5394 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5395 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5396 WRAP="-fwrapv"
5397 fi
5398 case $ac_cv_prog_cc_g in
5399 yes)
5400 if test "$Py_DEBUG" = 'true' ; then
5401 # Optimization messes up debuggers, so turn it off for
5402 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005403 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404 else
5405 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5406 fi
5407 ;;
5408 *)
5409 OPT="-O3 -Wall $STRICT_PROTO"
5410 ;;
5411 esac
5412 case $ac_sys_system in
5413 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5414 ;;
5415 esac
5416 ;;
5417
5418 *)
5419 OPT="-O"
5420 ;;
5421 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422fi
5423
5424
5425
5426# The -arch flags for universal builds on OSX
5427UNIVERSAL_ARCH_FLAGS=
5428
5429
5430# tweak BASECFLAGS based on compiler and platform
5431case $GCC in
5432yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005433 # Python doesn't violate C99 aliasing rules, but older versions of
5434 # GCC produce warnings for legal Python code. Enable
5435 # -fno-strict-aliasing on versions of GCC that support but produce
5436 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5438$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 ac_save_cc="$CC"
5440 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005441 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005442 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005444else
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005447
Matthias Kloseb159a552010-04-25 21:00:44 +00005448
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005449int
5450main ()
5451{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005452
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005453 ;
5454 return 0;
5455}
Matthias Kloseb159a552010-04-25 21:00:44 +00005456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005458if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005459
5460 CC="$ac_save_cc -fstrict-aliasing"
5461 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005463/* end confdefs.h. */
5464
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005465 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005466int
5467main ()
5468{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005469double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005470 ;
5471 return 0;
5472}
Matthias Kloseb159a552010-04-25 21:00:44 +00005473
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005475if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005476
5477 ac_cv_no_strict_aliasing=no
5478
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479else
Matthias Kloseb159a552010-04-25 21:00:44 +00005480
5481 ac_cv_no_strict_aliasing=yes
5482
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005483fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005485
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005486else
Matthias Kloseb159a552010-04-25 21:00:44 +00005487
5488 ac_cv_no_strict_aliasing=no
5489
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005490fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005492fi
5493
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005494 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5497$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005498 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 then
5500 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5501 fi
5502
5503 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5504 # support. Without this, treatment of subnormals doesn't follow
5505 # the standard.
5506 case $ac_sys_machine in
5507 alpha*)
5508 BASECFLAGS="$BASECFLAGS -mieee"
5509 ;;
5510 esac
5511
5512 case $ac_sys_system in
5513 SCO_SV*)
5514 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5515 ;;
5516 # is there any other compiler on Darwin besides gcc?
5517 Darwin*)
5518 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5519 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005520 if test "${CC}" = gcc
5521 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5523$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005524 case "${UNIVERSALSDK}" in
5525 */MacOSX10.4u.sdk)
5526 # Build using 10.4 SDK, force usage of gcc when the
5527 # compiler is gcc, otherwise the user will get very
5528 # confusing error messages when building on OSX 10.6
5529 CC=gcc-4.0
5530 CPP=cpp-4.0
5531 ;;
5532 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5534$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005535 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536
5537
5538 if test "${enable_universalsdk}"; then
5539 UNIVERSAL_ARCH_FLAGS=""
5540 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5541 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5542 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005543 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5545 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005546 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005547 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548
5549 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5550 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005551 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005552 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005554 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5555 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005556 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005557 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005558
5559 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5560 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005561 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005562 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005563
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005565 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 +00005566
5567 fi
5568
5569
Ronald Oussoren666028b2010-04-18 19:07:43 +00005570 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5571 if test "${UNIVERSALSDK}" != "/"
5572 then
5573 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5574 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005575 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005576 fi
5577 fi
5578
5579 # Calculate the right deployment target for this build.
5580 #
5581 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5582 if test ${cur_target} '>' 10.2; then
5583 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005584 if test ${enable_universalsdk}; then
5585 if test "${UNIVERSAL_ARCHS}" = "all"; then
5586 # Ensure that the default platform for a
5587 # 4-way universal build is OSX 10.5,
5588 # that's the first OS release where
5589 # 4-way builds make sense.
5590 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005591
5592 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5593 cur_target='10.5'
5594
5595 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5596 cur_target='10.5'
5597
5598 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5599 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005600 fi
5601 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005602 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005603 # On Intel macs default to a deployment
5604 # target of 10.4, that's the first OSX
5605 # release with Intel support.
5606 cur_target="10.4"
5607 fi
5608 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 fi
5610 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5611
5612 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5613 # environment with a value that is the same as what we'll use
5614 # in the Makefile to ensure that we'll get the same compiler
5615 # environment during configure and build time.
5616 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5617 export MACOSX_DEPLOYMENT_TARGET
5618 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5619
5620 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 esac
5622 ;;
5623
5624*)
5625 case $ac_sys_system in
5626 OpenUNIX*|UnixWare*)
5627 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5628 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 SCO_SV*)
5630 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5631 ;;
5632 esac
5633 ;;
5634esac
5635
5636if test "$Py_DEBUG" = 'true'; then
5637 :
5638else
5639 OPT="-DNDEBUG $OPT"
5640fi
5641
5642if test "$ac_arch_flags"
5643then
5644 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5645fi
5646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647# Check whether GCC supports PyArg_ParseTuple format
5648if test "$GCC" = "yes"
5649then
Matthias Kloseb9621712010-04-24 17:59:49 +00005650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5651$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 save_CFLAGS=$CFLAGS
5653 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655/* end confdefs.h. */
5656
5657 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658int
5659main ()
5660{
5661
5662 ;
5663 return 0;
5664}
Matthias Kloseb159a552010-04-25 21:00:44 +00005665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005667if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668
Matthias Kloseb159a552010-04-25 21:00:44 +00005669
Matthias Kloseb9621712010-04-24 17:59:49 +00005670$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
Matthias Kloseb159a552010-04-25 21:00:44 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005673$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675else
Matthias Kloseb159a552010-04-25 21:00:44 +00005676
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005678$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679
5680fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5682 CFLAGS=$save_CFLAGS
5683fi
5684
5685# On some compilers, pthreads are available without further options
5686# (e.g. MacOS X). On some of these systems, the compiler will not
5687# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5688# So we have to see first whether pthreads are available without
5689# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5691$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005692if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694else
Matthias Kloseb9621712010-04-24 17:59:49 +00005695 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 ac_cv_pthread_is_default=no
5697else
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699/* end confdefs.h. */
5700
5701#include <pthread.h>
5702
5703void* routine(void* p){return NULL;}
5704
5705int main(){
5706 pthread_t p;
5707 if(pthread_create(&p,NULL,routine,NULL)!=0)
5708 return 1;
5709 (void)pthread_detach(p);
5710 return 0;
5711}
5712
5713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005714if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715
5716 ac_cv_pthread_is_default=yes
5717 ac_cv_kthread=no
5718 ac_cv_pthread=no
5719
5720else
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725fi
5726
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728fi
5729
Matthias Kloseb9621712010-04-24 17:59:49 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5731$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733
5734if test $ac_cv_pthread_is_default = yes
5735then
5736 ac_cv_kpthread=no
5737else
5738# -Kpthread, if available, provides the right #defines
5739# and linker options to make pthread_create available
5740# Some compilers won't report that they do not support -Kpthread,
5741# so we need to run a program to see whether it really made the
5742# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5744$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005745if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005746 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747else
5748 ac_save_cc="$CC"
5749CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005750if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 ac_cv_kpthread=no
5752else
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754/* end confdefs.h. */
5755
5756#include <pthread.h>
5757
5758void* routine(void* p){return NULL;}
5759
5760int main(){
5761 pthread_t p;
5762 if(pthread_create(&p,NULL,routine,NULL)!=0)
5763 return 1;
5764 (void)pthread_detach(p);
5765 return 0;
5766}
5767
5768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005769if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 ac_cv_kpthread=yes
5771else
Matthias Kloseb9621712010-04-24 17:59:49 +00005772 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776fi
5777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778CC="$ac_save_cc"
5779fi
5780
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5782$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
5785if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5786then
5787# -Kthread, if available, provides the right #defines
5788# and linker options to make pthread_create available
5789# Some compilers won't report that they do not support -Kthread,
5790# so we need to run a program to see whether it really made the
5791# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5793$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005794if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005795 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796else
5797 ac_save_cc="$CC"
5798CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005799if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 ac_cv_kthread=no
5801else
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803/* end confdefs.h. */
5804
5805#include <pthread.h>
5806
5807void* routine(void* p){return NULL;}
5808
5809int main(){
5810 pthread_t p;
5811 if(pthread_create(&p,NULL,routine,NULL)!=0)
5812 return 1;
5813 (void)pthread_detach(p);
5814 return 0;
5815}
5816
5817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005818if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 ac_cv_kthread=yes
5820else
Matthias Kloseb9621712010-04-24 17:59:49 +00005821 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005823rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5824 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825fi
5826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827CC="$ac_save_cc"
5828fi
5829
Matthias Kloseb9621712010-04-24 17:59:49 +00005830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5831$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832fi
5833
5834if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5835then
5836# -pthread, if available, provides the right #defines
5837# and linker options to make pthread_create available
5838# Some compilers won't report that they do not support -pthread,
5839# so we need to run a program to see whether it really made the
5840# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5842$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005843if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005844 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845else
5846 ac_save_cc="$CC"
5847CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005848if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849 ac_cv_pthread=no
5850else
Matthias Kloseb9621712010-04-24 17:59:49 +00005851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852/* end confdefs.h. */
5853
5854#include <pthread.h>
5855
5856void* routine(void* p){return NULL;}
5857
5858int main(){
5859 pthread_t p;
5860 if(pthread_create(&p,NULL,routine,NULL)!=0)
5861 return 1;
5862 (void)pthread_detach(p);
5863 return 0;
5864}
5865
5866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868 ac_cv_pthread=yes
5869else
Matthias Kloseb9621712010-04-24 17:59:49 +00005870 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874fi
5875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876CC="$ac_save_cc"
5877fi
5878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5880$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881fi
5882
5883# If we have set a CC compiler flag for thread support then
5884# check if it works for CXX, too.
5885ac_cv_cxx_thread=no
5886if test ! -z "$CXX"
5887then
Matthias Kloseb9621712010-04-24 17:59:49 +00005888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5889$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890ac_save_cxx="$CXX"
5891
5892if test "$ac_cv_kpthread" = "yes"
5893then
5894 CXX="$CXX -Kpthread"
5895 ac_cv_cxx_thread=yes
5896elif test "$ac_cv_kthread" = "yes"
5897then
5898 CXX="$CXX -Kthread"
5899 ac_cv_cxx_thread=yes
5900elif test "$ac_cv_pthread" = "yes"
5901then
5902 CXX="$CXX -pthread"
5903 ac_cv_cxx_thread=yes
5904fi
5905
5906if test $ac_cv_cxx_thread = yes
5907then
5908 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5909 $CXX -c conftest.$ac_ext 2>&5
5910 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5911 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5912 then
5913 ac_cv_cxx_thread=yes
5914 else
5915 ac_cv_cxx_thread=no
5916 fi
5917 rm -fr conftest*
5918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5920$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921fi
5922CXX="$ac_save_cxx"
5923
5924
5925# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5927$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005929 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005930else
Matthias Kloseb9621712010-04-24 17:59:49 +00005931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932/* end confdefs.h. */
5933#include <stdlib.h>
5934#include <stdarg.h>
5935#include <string.h>
5936#include <float.h>
5937
5938int
5939main ()
5940{
5941
5942 ;
5943 return 0;
5944}
5945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005946if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 ac_cv_header_stdc=yes
5948else
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5952
5953if test $ac_cv_header_stdc = yes; then
5954 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956/* end confdefs.h. */
5957#include <string.h>
5958
5959_ACEOF
5960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $EGREP "memchr" >/dev/null 2>&1; then :
5962
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963else
5964 ac_cv_header_stdc=no
5965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005966rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967
5968fi
5969
5970if test $ac_cv_header_stdc = yes; then
5971 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973/* end confdefs.h. */
5974#include <stdlib.h>
5975
5976_ACEOF
5977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005978 $EGREP "free" >/dev/null 2>&1; then :
5979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
5981 ac_cv_header_stdc=no
5982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005983rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984
5985fi
5986
5987if test $ac_cv_header_stdc = yes; then
5988 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 :
5991else
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993/* end confdefs.h. */
5994#include <ctype.h>
5995#include <stdlib.h>
5996#if ((' ' & 0x0FF) == 0x020)
5997# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5998# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5999#else
6000# define ISLOWER(c) \
6001 (('a' <= (c) && (c) <= 'i') \
6002 || ('j' <= (c) && (c) <= 'r') \
6003 || ('s' <= (c) && (c) <= 'z'))
6004# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6005#endif
6006
6007#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6008int
6009main ()
6010{
6011 int i;
6012 for (i = 0; i < 256; i++)
6013 if (XOR (islower (i), ISLOWER (i))
6014 || toupper (i) != TOUPPER (i))
6015 return 2;
6016 return 0;
6017}
6018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006019if ac_fn_c_try_run "$LINENO"; then :
6020
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021else
Matthias Kloseb9621712010-04-24 17:59:49 +00006022 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026fi
6027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028fi
6029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6031$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032if test $ac_cv_header_stdc = yes; then
6033
Matthias Kloseb9621712010-04-24 17:59:49 +00006034$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035
6036fi
6037
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006038for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6039fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006040ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006041shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006042unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006043sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6044sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006045sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6046sys/stat.h sys/termio.h sys/time.h \
6047sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6048libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006049bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006050do :
6051 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6052ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006053if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006054 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006055#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006056_ACEOF
6057
6058fi
6059
Guido van Rossum627b2d71993-12-24 10:39:16 +00006060done
6061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006062ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006063for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6066$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006067if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006069else
Matthias Kloseb9621712010-04-24 17:59:49 +00006070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006071/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006072#include <sys/types.h>
6073#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006074
Martin v. Löwis11437992002-04-12 09:54:03 +00006075int
6076main ()
6077{
6078if ((DIR *) 0)
6079return 0;
6080 ;
6081 return 0;
6082}
6083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006085 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006086else
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006091eval ac_res=\$$as_ac_Header
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6093$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006094if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006096#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006097_ACEOF
6098
6099ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102done
6103# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6104if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6106$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006107if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006109else
Martin v. Löwis11437992002-04-12 09:54:03 +00006110 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006114/* Override any GCC internal prototype to avoid an error.
6115 Use char because int might match the return type of a GCC
6116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006117#ifdef __cplusplus
6118extern "C"
6119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006120char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006121int
6122main ()
6123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006125 ;
6126 return 0;
6127}
6128_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129for ac_lib in '' dir; do
6130 if test -z "$ac_lib"; then
6131 ac_res="none required"
6132 else
6133 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006134 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006135 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006136 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006137 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006139rm -f core conftest.err conftest.$ac_objext \
6140 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006141 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006142 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006144done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006145if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006147else
6148 ac_cv_search_opendir=no
6149fi
6150rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006151LIBS=$ac_func_search_save_LIBS
6152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6154$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006156if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006160
Michael W. Hudson54241132001-12-07 15:38:26 +00006161else
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6163$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006164if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006166else
6167 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171/* Override any GCC internal prototype to avoid an error.
6172 Use char because int might match the return type of a GCC
6173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006174#ifdef __cplusplus
6175extern "C"
6176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006177char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006178int
6179main ()
6180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006182 ;
6183 return 0;
6184}
6185_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186for ac_lib in '' x; do
6187 if test -z "$ac_lib"; then
6188 ac_res="none required"
6189 else
6190 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006191 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006192 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006194 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006196rm -f core conftest.err conftest.$ac_objext \
6197 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006198 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006199 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006202if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204else
6205 ac_cv_search_opendir=no
6206fi
6207rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006208LIBS=$ac_func_search_save_LIBS
6209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6211$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006212ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006213if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006216fi
6217
6218fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006219
Matthias Kloseb9621712010-04-24 17:59:49 +00006220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6221$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006222if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006223 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006224else
Matthias Kloseb9621712010-04-24 17:59:49 +00006225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006226/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228int
6229main ()
6230{
6231return makedev(0, 0);
6232 ;
6233 return 0;
6234}
6235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_cv_header_sys_types_h_makedev=yes
6238else
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006241rm -f core conftest.err conftest.$ac_objext \
6242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243
6244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6246$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247
6248if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006249ac_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 +00006250if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006251
Matthias Kloseb9621712010-04-24 17:59:49 +00006252$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006253
6254fi
6255
6256
6257
6258 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006259 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 +00006260if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006261
Matthias Kloseb9621712010-04-24 17:59:49 +00006262$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006263
6264fi
6265
6266
6267 fi
6268fi
6269
Michael W. Hudson54241132001-12-07 15:38:26 +00006270
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006271# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006272for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006273do :
6274 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006275#ifdef HAVE_CURSES_H
6276#include <curses.h>
6277#endif
6278
Matthias Kloseb9621712010-04-24 17:59:49 +00006279"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006280if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006282#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006283_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006284
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006285fi
6286
6287done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006288
6289
Martin v. Löwis11017b12006-01-14 18:12:57 +00006290# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006291for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006292do :
6293 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 +00006294#ifdef HAVE_ASM_TYPES_H
6295#include <asm/types.h>
6296#endif
6297#ifdef HAVE_SYS_SOCKET_H
6298#include <sys/socket.h>
6299#endif
6300
Matthias Kloseb9621712010-04-24 17:59:49 +00006301"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006302if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006303 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006304#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006305_ACEOF
6306
6307fi
6308
6309done
6310
6311
Guido van Rossum627b2d71993-12-24 10:39:16 +00006312# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006313was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6315$as_echo_n "checking for clock_t in time.h... " >&6; }
6316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006317/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006318#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006319
6320_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006323 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006324else
Martin v. Löwis11437992002-04-12 09:54:03 +00006325
6326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006328
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006329
Guido van Rossum627b2d71993-12-24 10:39:16 +00006330fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006331rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006332
Matthias Kloseb9621712010-04-24 17:59:49 +00006333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6334$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006335
Matthias Kloseb9621712010-04-24 17:59:49 +00006336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6337$as_echo_n "checking for makedev... " >&6; }
6338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006339/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006340
Jesus Cea740f53a2010-04-28 11:35:30 +00006341#if defined(MAJOR_IN_MKDEV)
6342#include <sys/mkdev.h>
6343#elif defined(MAJOR_IN_SYSMACROS)
6344#include <sys/sysmacros.h>
6345#else
6346#include <sys/types.h>
6347#endif
6348
Neal Norwitz11690112002-07-30 01:08:28 +00006349int
6350main ()
6351{
Jesus Cea740f53a2010-04-28 11:35:30 +00006352
6353 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006354 ;
6355 return 0;
6356}
Matthias Kloseb159a552010-04-25 21:00:44 +00006357
Neal Norwitz11690112002-07-30 01:08:28 +00006358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006359if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006360 ac_cv_has_makedev=yes
6361else
Matthias Kloseb9621712010-04-24 17:59:49 +00006362 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006364rm -f core conftest.err conftest.$ac_objext \
6365 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6367$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006368if test "$ac_cv_has_makedev" = "yes"; then
6369
Matthias Kloseb9621712010-04-24 17:59:49 +00006370$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006371
6372fi
6373
Martin v. Löwis399a6892002-10-04 10:22:02 +00006374# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6375# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6376# defined, but the compiler does not support pragma redefine_extname,
6377# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6378# structures (such as rlimit64) without declaring them. As a
6379# work-around, disable LFS on such configurations
6380
6381use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6383$as_echo_n "checking Solaris LFS bug... " >&6; }
6384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006385/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006386
6387#define _LARGEFILE_SOURCE 1
6388#define _FILE_OFFSET_BITS 64
6389#include <sys/resource.h>
6390
Martin v. Löwis399a6892002-10-04 10:22:02 +00006391int
6392main ()
6393{
6394struct rlimit foo;
6395 ;
6396 return 0;
6397}
6398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006400 sol_lfs_bug=no
6401else
Matthias Kloseb9621712010-04-24 17:59:49 +00006402 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6406$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006407if test "$sol_lfs_bug" = "yes"; then
6408 use_lfs=no
6409fi
6410
6411if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006412# Two defines needed to enable largefile support on various platforms
6413# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006414case $ac_sys_system/$ac_sys_release in
6415AIX*)
6416
6417$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6418
6419 ;;
6420esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006421
Matthias Kloseb9621712010-04-24 17:59:49 +00006422$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006423
6424
Matthias Kloseb9621712010-04-24 17:59:49 +00006425$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006426
Martin v. Löwis399a6892002-10-04 10:22:02 +00006427fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006428
Guido van Rossum84e7b241996-08-19 21:59:00 +00006429# Add some code to confdefs.h so that the test for off_t works on SCO
6430cat >> confdefs.h <<\EOF
6431#if defined(SCO_DS)
6432#undef _OFF_T
6433#endif
6434EOF
6435
Guido van Rossumef2255b2000-03-10 22:30:29 +00006436# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006437ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006438if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006440else
Martin v. Löwis11437992002-04-12 09:54:03 +00006441
6442cat >>confdefs.h <<_ACEOF
6443#define mode_t int
6444_ACEOF
6445
6446fi
6447
Matthias Kloseb9621712010-04-24 17:59:49 +00006448ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006449if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006450
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451else
Martin v. Löwis11437992002-04-12 09:54:03 +00006452
6453cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006454#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006455_ACEOF
6456
6457fi
6458
Matthias Kloseb9621712010-04-24 17:59:49 +00006459ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006460if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462else
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
6464cat >>confdefs.h <<_ACEOF
6465#define pid_t int
6466_ACEOF
6467
6468fi
6469
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006470
Martin v. Löwis11437992002-04-12 09:54:03 +00006471cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006472#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006473_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474
Matthias Kloseb9621712010-04-24 17:59:49 +00006475ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006476if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006477
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478else
Martin v. Löwis11437992002-04-12 09:54:03 +00006479
6480cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006481#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006482_ACEOF
6483
6484fi
6485
Matthias Kloseb9621712010-04-24 17:59:49 +00006486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6487$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006488if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006490else
Matthias Kloseb9621712010-04-24 17:59:49 +00006491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006492/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006493#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006494
6495_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006497 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498 ac_cv_type_uid_t=yes
6499else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500 ac_cv_type_uid_t=no
6501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006502rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006503
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6506$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006507if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006510
6511
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006513
6514fi
6515
Matthias Kloseb9621712010-04-24 17:59:49 +00006516ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6517case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006518 no|yes) ;; #(
6519 *)
6520
Matthias Kloseb9621712010-04-24 17:59:49 +00006521$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006522
6523
6524cat >>confdefs.h <<_ACEOF
6525#define uint32_t $ac_cv_c_uint32_t
6526_ACEOF
6527;;
6528 esac
6529
Matthias Kloseb9621712010-04-24 17:59:49 +00006530ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6531case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006532 no|yes) ;; #(
6533 *)
6534
Matthias Kloseb9621712010-04-24 17:59:49 +00006535$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006536
6537
6538cat >>confdefs.h <<_ACEOF
6539#define uint64_t $ac_cv_c_uint64_t
6540_ACEOF
6541;;
6542 esac
6543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6545case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006546 no|yes) ;; #(
6547 *)
6548
6549cat >>confdefs.h <<_ACEOF
6550#define int32_t $ac_cv_c_int32_t
6551_ACEOF
6552;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006553esac
6554
Matthias Kloseb9621712010-04-24 17:59:49 +00006555ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6556case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006557 no|yes) ;; #(
6558 *)
6559
6560cat >>confdefs.h <<_ACEOF
6561#define int64_t $ac_cv_c_int64_t
6562_ACEOF
6563;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006564esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006565
Matthias Kloseb9621712010-04-24 17:59:49 +00006566ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006567if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006570
6571fi
6572
Jack Jansendd19cf82001-12-06 22:36:17 +00006573
Michael W. Hudson54241132001-12-07 15:38:26 +00006574# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006575# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576# The cast to long int works around a bug in the HP C Compiler
6577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6581$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006582if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006584else
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 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 +00006586
Martin v. Löwis11437992002-04-12 09:54:03 +00006587else
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 if test "$ac_cv_type_int" = yes; then
6589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006591as_fn_error 77 "cannot compute sizeof (int)
6592See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006593 else
6594 ac_cv_sizeof_int=0
6595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006597
Martin v. Löwis11437992002-04-12 09:54:03 +00006598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6600$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601
6602
6603
Martin v. Löwis11437992002-04-12 09:54:03 +00006604cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006605#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006606_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006607
6608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006609# The cast to long int works around a bug in the HP C Compiler
6610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6612# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6614$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006615if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006616 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006617else
Matthias Kloseb9621712010-04-24 17:59:49 +00006618 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 +00006619
Martin v. Löwis11437992002-04-12 09:54:03 +00006620else
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 if test "$ac_cv_type_long" = yes; then
6622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006624as_fn_error 77 "cannot compute sizeof (long)
6625See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006626 else
6627 ac_cv_sizeof_long=0
6628 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006630
Martin v. Löwis11437992002-04-12 09:54:03 +00006631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6633$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006634
6635
6636
Martin v. Löwis11437992002-04-12 09:54:03 +00006637cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006638#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006639_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006640
6641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642# The cast to long int works around a bug in the HP C Compiler
6643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6647$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006648if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006650else
Matthias Kloseb9621712010-04-24 17:59:49 +00006651 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 +00006652
Martin v. Löwis11437992002-04-12 09:54:03 +00006653else
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 if test "$ac_cv_type_void_p" = yes; then
6655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006657as_fn_error 77 "cannot compute sizeof (void *)
6658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659 else
6660 ac_cv_sizeof_void_p=0
6661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006663
Martin v. Löwis11437992002-04-12 09:54:03 +00006664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6666$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667
6668
6669
Martin v. Löwis11437992002-04-12 09:54:03 +00006670cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006671#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006672_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006673
6674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675# The cast to long int works around a bug in the HP C Compiler
6676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6680$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006681if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006682 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006683else
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 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 +00006685
Martin v. Löwis11437992002-04-12 09:54:03 +00006686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 if test "$ac_cv_type_short" = yes; then
6688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006690as_fn_error 77 "cannot compute sizeof (short)
6691See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006692 else
6693 ac_cv_sizeof_short=0
6694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006696
Martin v. Löwis11437992002-04-12 09:54:03 +00006697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6699$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006700
6701
6702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006704#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006705_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006706
6707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006708# The cast to long int works around a bug in the HP C Compiler
6709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6713$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006714if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006716else
Matthias Kloseb9621712010-04-24 17:59:49 +00006717 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 +00006718
Martin v. Löwis11437992002-04-12 09:54:03 +00006719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 if test "$ac_cv_type_float" = yes; then
6721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006723as_fn_error 77 "cannot compute sizeof (float)
6724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006725 else
6726 ac_cv_sizeof_float=0
6727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006729
Martin v. Löwis11437992002-04-12 09:54:03 +00006730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6732$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733
6734
6735
Martin v. Löwis11437992002-04-12 09:54:03 +00006736cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006738_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006739
6740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006741# The cast to long int works around a bug in the HP C Compiler
6742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6746$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006747if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006749else
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 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 +00006751
Martin v. Löwis11437992002-04-12 09:54:03 +00006752else
Matthias Kloseb9621712010-04-24 17:59:49 +00006753 if test "$ac_cv_type_double" = yes; then
6754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006756as_fn_error 77 "cannot compute sizeof (double)
6757See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006758 else
6759 ac_cv_sizeof_double=0
6760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6765$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006766
6767
6768
Martin v. Löwis11437992002-04-12 09:54:03 +00006769cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006770#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006771_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006772
6773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006774# The cast to long int works around a bug in the HP C Compiler
6775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6779$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006780if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 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 +00006784
Martin v. Löwis11437992002-04-12 09:54:03 +00006785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 if test "$ac_cv_type_fpos_t" = yes; then
6787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006789as_fn_error 77 "cannot compute sizeof (fpos_t)
6790See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006791 else
6792 ac_cv_sizeof_fpos_t=0
6793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006795
Martin v. Löwis11437992002-04-12 09:54:03 +00006796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6798$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006799
6800
6801
Martin v. Löwis11437992002-04-12 09:54:03 +00006802cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006803#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006804_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006805
Michael W. Hudson54241132001-12-07 15:38:26 +00006806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807# The cast to long int works around a bug in the HP C Compiler
6808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6812$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006813if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006814 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006815else
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 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 +00006817
Martin v. Löwis18e16552006-02-15 17:27:45 +00006818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 if test "$ac_cv_type_size_t" = yes; then
6820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006822as_fn_error 77 "cannot compute sizeof (size_t)
6823See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006824 else
6825 ac_cv_sizeof_size_t=0
6826 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006828
Martin v. Löwis18e16552006-02-15 17:27:45 +00006829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6831$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006832
6833
6834
Martin v. Löwis18e16552006-02-15 17:27:45 +00006835cat >>confdefs.h <<_ACEOF
6836#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6837_ACEOF
6838
6839
Christian Heimes400adb02008-02-01 08:12:03 +00006840# The cast to long int works around a bug in the HP C Compiler
6841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6845$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006846if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006847 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006848else
Matthias Kloseb9621712010-04-24 17:59:49 +00006849 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 +00006850
Christian Heimes400adb02008-02-01 08:12:03 +00006851else
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 if test "$ac_cv_type_pid_t" = yes; then
6853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006855as_fn_error 77 "cannot compute sizeof (pid_t)
6856See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006857 else
6858 ac_cv_sizeof_pid_t=0
6859 fi
6860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006861
Christian Heimes400adb02008-02-01 08:12:03 +00006862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6864$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006865
6866
6867
6868cat >>confdefs.h <<_ACEOF
6869#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6870_ACEOF
6871
6872
Michael W. Hudson54241132001-12-07 15:38:26 +00006873
Matthias Kloseb9621712010-04-24 17:59:49 +00006874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6875$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006876have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006878/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880int
6881main ()
6882{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006883long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006884 ;
6885 return 0;
6886}
6887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006888if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006889
6890
Matthias Kloseb9621712010-04-24 17:59:49 +00006891$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006892
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006893 have_long_long=yes
6894
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6898$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006899if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006900# The cast to long int works around a bug in the HP C Compiler
6901# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6902# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6903# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6905$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006906if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006907 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006908else
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 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 +00006910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911else
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 if test "$ac_cv_type_long_long" = yes; then
6913 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006915as_fn_error 77 "cannot compute sizeof (long long)
6916See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006917 else
6918 ac_cv_sizeof_long_long=0
6919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006921
Martin v. Löwis11437992002-04-12 09:54:03 +00006922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6924$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006925
6926
6927
Martin v. Löwis11437992002-04-12 09:54:03 +00006928cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006929#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006930_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006931
Michael W. Hudson54241132001-12-07 15:38:26 +00006932
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006933fi
6934
Matthias Kloseb9621712010-04-24 17:59:49 +00006935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6936$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006937have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006939/* end confdefs.h. */
6940
6941int
6942main ()
6943{
6944long double x; x = (long double)0;
6945 ;
6946 return 0;
6947}
6948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006949if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006950
6951
Matthias Kloseb9621712010-04-24 17:59:49 +00006952$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006953
6954 have_long_double=yes
6955
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006956fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6959$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006960if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006961# The cast to long int works around a bug in the HP C Compiler
6962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6964# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6966$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006967if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 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 +00006971
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006972else
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 if test "$ac_cv_type_long_double" = yes; then
6974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006976as_fn_error 77 "cannot compute sizeof (long double)
6977See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006978 else
6979 ac_cv_sizeof_long_double=0
6980 fi
6981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6985$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006986
6987
6988
6989cat >>confdefs.h <<_ACEOF
6990#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6991_ACEOF
6992
6993
6994fi
6995
6996
Matthias Kloseb9621712010-04-24 17:59:49 +00006997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6998$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006999have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007001/* end confdefs.h. */
7002
7003int
7004main ()
7005{
7006_Bool x; x = (_Bool)0;
7007 ;
7008 return 0;
7009}
7010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007011if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007012
7013
Matthias Kloseb9621712010-04-24 17:59:49 +00007014$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007015
7016 have_c99_bool=yes
7017
Thomas Woutersb2137042007-02-01 18:02:27 +00007018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7021$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007022if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023# The cast to long int works around a bug in the HP C Compiler
7024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7028$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007029if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 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 +00007033
Thomas Woutersb2137042007-02-01 18:02:27 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 if test "$ac_cv_type__Bool" = yes; then
7036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007038as_fn_error 77 "cannot compute sizeof (_Bool)
7039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 else
7041 ac_cv_sizeof__Bool=0
7042 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007044
Thomas Woutersb2137042007-02-01 18:02:27 +00007045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7047$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048
7049
7050
Thomas Woutersb2137042007-02-01 18:02:27 +00007051cat >>confdefs.h <<_ACEOF
7052#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7053_ACEOF
7054
7055
7056fi
7057
Matthias Kloseb9621712010-04-24 17:59:49 +00007058ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007059 #include <stdint.h>
7060 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007061 #ifdef HAVE_INTTYPES_H
7062 #include <inttypes.h>
7063 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007064"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007065if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007066
7067cat >>confdefs.h <<_ACEOF
7068#define HAVE_UINTPTR_T 1
7069_ACEOF
7070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071# The cast to long int works around a bug in the HP C Compiler
7072# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7073# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7074# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7076$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007077if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 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 +00007081
Martin v. Löwis11437992002-04-12 09:54:03 +00007082else
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 if test "$ac_cv_type_uintptr_t" = yes; then
7084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007086as_fn_error 77 "cannot compute sizeof (uintptr_t)
7087See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088 else
7089 ac_cv_sizeof_uintptr_t=0
7090 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007092
Martin v. Löwis11437992002-04-12 09:54:03 +00007093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7095$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096
7097
7098
Martin v. Löwis11437992002-04-12 09:54:03 +00007099cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007100#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007101_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007102
Michael W. Hudson54241132001-12-07 15:38:26 +00007103
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007104fi
7105
Thomas Wouters89f507f2006-12-13 04:49:30 +00007106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107# The cast to long int works around a bug in the HP C Compiler
7108# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7109# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7110# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7112$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007113if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007115else
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007117#ifdef HAVE_SYS_TYPES_H
7118#include <sys/types.h>
7119#endif
7120
Matthias Kloseb9621712010-04-24 17:59:49 +00007121"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007123else
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 if test "$ac_cv_type_off_t" = yes; then
7125 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7126$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007127as_fn_error 77 "cannot compute sizeof (off_t)
7128See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007129 else
7130 ac_cv_sizeof_off_t=0
7131 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007133
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7136$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007137
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007138
7139
Martin v. Löwis11437992002-04-12 09:54:03 +00007140cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007141#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007142_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007143
Michael W. Hudson54241132001-12-07 15:38:26 +00007144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007145
Matthias Kloseb9621712010-04-24 17:59:49 +00007146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7147$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007148if test "$have_long_long" = yes
7149then
7150if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007151 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007154
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7156$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007157else
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007160fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007161else
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007164fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007166# The cast to long int works around a bug in the HP C Compiler
7167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7169# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7171$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007172if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007176#ifdef HAVE_SYS_TYPES_H
7177#include <sys/types.h>
7178#endif
7179#ifdef HAVE_TIME_H
7180#include <time.h>
7181#endif
7182
Matthias Kloseb9621712010-04-24 17:59:49 +00007183"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007184
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007185else
Matthias Kloseb9621712010-04-24 17:59:49 +00007186 if test "$ac_cv_type_time_t" = yes; then
7187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007189as_fn_error 77 "cannot compute sizeof (time_t)
7190See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007191 else
7192 ac_cv_sizeof_time_t=0
7193 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007195
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7198$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007199
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007200
7201
Martin v. Löwis11437992002-04-12 09:54:03 +00007202cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007203#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007204_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007205
Michael W. Hudson54241132001-12-07 15:38:26 +00007206
7207
Trent Mick635f6fb2000-08-23 21:33:05 +00007208# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007209ac_save_cc="$CC"
7210if test "$ac_cv_kpthread" = "yes"
7211then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007212elif test "$ac_cv_kthread" = "yes"
7213then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007214elif test "$ac_cv_pthread" = "yes"
7215then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007216fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007217
Matthias Kloseb9621712010-04-24 17:59:49 +00007218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7219$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007220have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007222/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007223
7224 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007225int
7226main ()
7227{
Guido van Rossum12580492000-09-24 16:47:19 +00007228pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007229 ;
7230 return 0;
7231}
Matthias Kloseb159a552010-04-25 21:00:44 +00007232
Martin v. Löwis11437992002-04-12 09:54:03 +00007233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007234if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007235 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7239$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007240if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007241 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7244# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7246$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007247if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007248 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007249else
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007251#ifdef HAVE_PTHREAD_H
7252#include <pthread.h>
7253#endif
7254
Matthias Kloseb9621712010-04-24 17:59:49 +00007255"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007257else
Matthias Kloseb9621712010-04-24 17:59:49 +00007258 if test "$ac_cv_type_pthread_t" = yes; then
7259 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007261as_fn_error 77 "cannot compute sizeof (pthread_t)
7262See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007263 else
7264 ac_cv_sizeof_pthread_t=0
7265 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007267
Trent Mick635f6fb2000-08-23 21:33:05 +00007268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7270$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007271
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007272
7273
Martin v. Löwis11437992002-04-12 09:54:03 +00007274cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007275#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007276_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007277
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007278
Trent Mick635f6fb2000-08-23 21:33:05 +00007279fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007280CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007281
Michael W. Hudson54241132001-12-07 15:38:26 +00007282
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007283case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007284 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007285 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7286 ;;
7287 Darwin/*)
7288 OTHER_LIBTOOL_OPT=""
7289 ;;
7290esac
7291
7292
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007293ARCH_RUN_32BIT=""
7294
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007295case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007296 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007297 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7298 if test "${enable_universalsdk}"; then
7299 :
7300 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007301 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007302 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007303 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007304 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007305 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007306 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007307 if test ${gcc_version} '<' 4.0
7308 then
7309 LIBTOOL_CRUFT="-lcc_dynamic"
7310 else
7311 LIBTOOL_CRUFT=""
7312 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007314 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007315else
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007317/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007318
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007319 #include <unistd.h>
7320 int main(int argc, char*argv[])
7321 {
7322 if (sizeof(long) == 4) {
7323 return 0;
7324 } else {
7325 return 1;
7326 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007327 }
7328
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007330if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007331 ac_osx_32bit=yes
7332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7336 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007337fi
7338
7339
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007340 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007341 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007342 i386)
7343 MACOSX_DEFAULT_ARCH="i386"
7344 ;;
7345 ppc)
7346 MACOSX_DEFAULT_ARCH="ppc"
7347 ;;
7348 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007349 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007350 ;;
7351 esac
7352 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007353 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007354 i386)
7355 MACOSX_DEFAULT_ARCH="x86_64"
7356 ;;
7357 ppc)
7358 MACOSX_DEFAULT_ARCH="ppc64"
7359 ;;
7360 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007361 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007362 ;;
7363 esac
7364
7365 #ARCH_RUN_32BIT="true"
7366 fi
7367
7368 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007369 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007370 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007371esac
7372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7374$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007375if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007376then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007377 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007378 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007379 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7384$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007385 if test $enable_shared = "yes"
7386 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007387 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 +00007388 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7391$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007392fi
7393
Matthias Kloseb9621712010-04-24 17:59:49 +00007394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7395$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007396case $ac_sys_system/$ac_sys_release in
7397 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7402$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007403 ;;
7404 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007407 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007408esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007409
Guido van Rossum0a516c91994-09-12 10:58:40 +00007410# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007411
Michael W. Hudson54241132001-12-07 15:38:26 +00007412
7413
7414
7415
Benjamin Peterson99f03762010-04-11 22:15:28 +00007416
Thomas Wouters477c8d52006-05-27 19:21:47 +00007417
Georg Brandlb1441c72009-01-03 22:33:39 +00007418
Thomas Wouters477c8d52006-05-27 19:21:47 +00007419cat >>confdefs.h <<_ACEOF
7420#define SHLIB_EXT "$SO"
7421_ACEOF
7422
Guido van Rossum0a516c91994-09-12 10:58:40 +00007423# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007424# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007425# (Shared libraries in this instance are shared modules to be loaded into
7426# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7428$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007429if test -z "$LDSHARED"
7430then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007431 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007432 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007433 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007434 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007435 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007436 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007437 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007439 if test "$GCC" = "yes" ; then
7440 LDSHARED='$(CC) -shared'
7441 LDCXXSHARED='$(CXX) -shared'
7442 else
7443 LDSHARED='$(CC) -G'
7444 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007445 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007446 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007447 if test "$GCC" = "yes" ; then
7448 LDSHARED='$(CC) -shared'
7449 LDCXXSHARED='$(CXX) -shared'
7450 else
7451 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007452 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007453 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007454 LDSHARED='$(CC) -bundle'
7455 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007456 if test "$enable_framework" ; then
7457 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007458 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7459 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007460 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007461 else
7462 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007463 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007464 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007465 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007466 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007467 LDSHARED='$(CC) -bundle'
7468 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007469 if test "$enable_framework" ; then
7470 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007471 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7472 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007473 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007474 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007475 # No framework, use the Python app as bundle-loader
7476 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007477 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007478 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007479 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007480 Darwin/*)
7481 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7482 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007483
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007484 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007485 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007486 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007487 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007488 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007489 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7490 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007491 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007492 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007493 LDSHARED='$(CC) -bundle'
7494 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007495 if test "$enable_framework" ; then
7496 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007497 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7498 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007499 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007500 else
7501 # No framework, use the Python app as bundle-loader
7502 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7503 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007504 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007505 fi
7506 fi
7507 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007508 Linux*|GNU*|QNX*)
7509 LDSHARED='$(CC) -shared'
7510 LDCXXSHARED='$(CXX) -shared';;
7511 BSD/OS*/4*)
7512 LDSHARED="gcc -shared"
7513 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007514 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007515 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007516 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007517 LDSHARED='$(CC) -shared'
7518 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007519 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007520 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007521 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007522 OpenBSD*)
7523 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7524 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007525 LDSHARED='$(CC) -shared $(CCSHARED)'
7526 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007527 else
7528 case `uname -r` in
7529 [01].* | 2.[0-7] | 2.[0-7].*)
7530 LDSHARED="ld -Bshareable ${LDFLAGS}"
7531 ;;
7532 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007533 LDSHARED='$(CC) -shared $(CCSHARED)'
7534 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007535 ;;
7536 esac
7537 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007538 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007539 LDSHARED='$(CC) -shared'
7540 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007541 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007542 if test "$GCC" = "yes" ; then
7543 LDSHARED='$(CC) -shared'
7544 LDCXXSHARED='$(CXX) -shared'
7545 else
7546 LDSHARED='$(CC) -G'
7547 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007548 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007549 SCO_SV*)
7550 LDSHARED='$(CC) -Wl,-G,-Bexport'
7551 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7552 CYGWIN*)
7553 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7554 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007555 *) LDSHARED="ld";;
7556 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7559$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007560LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007561BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007562# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007563# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7565$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566if test -z "$CCSHARED"
7567then
Guido van Rossum07397971997-04-29 21:49:50 +00007568 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007569 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007570 then CCSHARED="-fPIC";
7571 elif test `uname -p` = sparc;
7572 then CCSHARED="-xcode=pic32";
7573 else CCSHARED="-Kpic";
7574 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007575 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007576 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007577 else CCSHARED="+z";
7578 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007579 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007580 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007581 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007582 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007583 if test "$GCC" = "yes"
7584 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007585 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007586 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007587 SCO_SV*)
7588 if test "$GCC" = "yes"
7589 then CCSHARED="-fPIC"
7590 else CCSHARED="-Kpic -belf"
7591 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007592 IRIX*/6*) case $CC in
7593 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007594 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007595 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007596 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7599$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007600# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007601# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7603$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007604if test -z "$LINKFORSHARED"
7605then
Guido van Rossum07397971997-04-29 21:49:50 +00007606 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007607 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007608 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007609 LINKFORSHARED="-Wl,-E -Wl,+s";;
7610# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007611 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007612 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007613 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007615 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007616 if test "$enable_framework"
7617 then
Jack Jansenda49e192005-01-07 13:08:22 +00007618 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007619 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007620 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007621 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007622 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007623 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007624 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007625 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7626 then
7627 LINKFORSHARED="-Wl,--export-dynamic"
7628 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007629 SunOS/5*) case $CC in
7630 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007631 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007632 then
7633 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007634 fi;;
7635 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007636 CYGWIN*)
7637 if test $enable_shared = "no"
7638 then
7639 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7640 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007641 QNX*)
7642 # -Wl,-E causes the symbols to be added to the dynamic
7643 # symbol table so that they can be found when a module
7644 # is loaded. -N 2048K causes the stack size to be set
7645 # to 2048 kilobytes so that the stack doesn't overflow
7646 # when running test_compile.py.
7647 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007648 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7651$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007652
Michael W. Hudson54241132001-12-07 15:38:26 +00007653
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007654
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7656$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007657if test ! "$LIBRARY" = "$LDLIBRARY"
7658then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007659 case $ac_sys_system in
7660 CYGWIN*)
7661 # Cygwin needs CCSHARED when building extension DLLs
7662 # but not when building the interpreter DLL.
7663 CFLAGSFORSHARED='';;
7664 *)
7665 CFLAGSFORSHARED='$(CCSHARED)'
7666 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7669$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007670
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007671# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7672# library (with --enable-shared).
7673# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007674# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7675# if it is not required, since it creates a dependency of the shared library
7676# to LIBS. This, in turn, means that applications linking the shared libpython
7677# don't need to link LIBS explicitly. The default should be only changed
7678# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7681$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007682case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007683 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007684 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007685esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7687$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007688
7689
Guido van Rossum627b2d71993-12-24 10:39:16 +00007690# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7692$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Martin v. Löwis4e9da472011-05-09 07:41:32 +02007693if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007694 $as_echo_n "(cached) " >&6
7695else
7696 ac_check_lib_save_LIBS=$LIBS
7697LIBS="-lsendfile $LIBS"
7698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7699/* end confdefs.h. */
7700
7701/* Override any GCC internal prototype to avoid an error.
7702 Use char because int might match the return type of a GCC
7703 builtin and then its argument prototype would still apply. */
7704#ifdef __cplusplus
7705extern "C"
7706#endif
7707char sendfile ();
7708int
7709main ()
7710{
7711return sendfile ();
7712 ;
7713 return 0;
7714}
7715_ACEOF
7716if ac_fn_c_try_link "$LINENO"; then :
7717 ac_cv_lib_sendfile_sendfile=yes
7718else
7719 ac_cv_lib_sendfile_sendfile=no
7720fi
7721rm -f core conftest.err conftest.$ac_objext \
7722 conftest$ac_exeext conftest.$ac_ext
7723LIBS=$ac_check_lib_save_LIBS
7724fi
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7726$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Martin v. Löwis4e9da472011-05-09 07:41:32 +02007727if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007728 cat >>confdefs.h <<_ACEOF
7729#define HAVE_LIBSENDFILE 1
7730_ACEOF
7731
7732 LIBS="-lsendfile $LIBS"
7733
7734fi
7735
Matthias Kloseb9621712010-04-24 17:59:49 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7737$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007738if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007740else
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007742LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746/* Override any GCC internal prototype to avoid an error.
7747 Use char because int might match the return type of a GCC
7748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007749#ifdef __cplusplus
7750extern "C"
7751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007752char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007753int
7754main ()
7755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ;
7758 return 0;
7759}
7760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007761if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766rm -f core conftest.err conftest.$ac_objext \
7767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7771$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007772if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 cat >>confdefs.h <<_ACEOF
7774#define HAVE_LIBDL 1
7775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007777 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007779fi
7780 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7782$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007783if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785else
Martin v. Löwis11437992002-04-12 09:54:03 +00007786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007787LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791/* Override any GCC internal prototype to avoid an error.
7792 Use char because int might match the return type of a GCC
7793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007794#ifdef __cplusplus
7795extern "C"
7796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007797char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007798int
7799main ()
7800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 ;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007811rm -f core conftest.err conftest.$ac_objext \
7812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7816$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007817if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 cat >>confdefs.h <<_ACEOF
7819#define HAVE_LIBDLD 1
7820_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007822 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824fi
7825 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007826
Georg Brandlb1441c72009-01-03 22:33:39 +00007827# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007828if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7830$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007831if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007833else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007834 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838/* Override any GCC internal prototype to avoid an error.
7839 Use char because int might match the return type of a GCC
7840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007841#ifdef __cplusplus
7842extern "C"
7843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007844char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007845int
7846main ()
7847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007849 ;
7850 return 0;
7851}
7852_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853for ac_lib in '' pthread rt posix4; do
7854 if test -z "$ac_lib"; then
7855 ac_res="none required"
7856 else
7857 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007858 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007865 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007869if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871else
7872 ac_cv_search_sem_init=no
7873fi
7874rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007875LIBS=$ac_func_search_save_LIBS
7876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7878$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007882
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007883fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007884 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007885 # posix4 on Solaris 2.6
7886 # pthread (first!) on Linux
7887fi
7888
Martin v. Löwis19d17342003-06-14 21:03:05 +00007889# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7891$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007892if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007894else
7895 ac_check_lib_save_LIBS=$LIBS
7896LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007898/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900/* Override any GCC internal prototype to avoid an error.
7901 Use char because int might match the return type of a GCC
7902 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007903#ifdef __cplusplus
7904extern "C"
7905#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007906char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007907int
7908main ()
7909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007911 ;
7912 return 0;
7913}
7914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007916 ac_cv_lib_intl_textdomain=yes
7917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920rm -f core conftest.err conftest.$ac_objext \
7921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007922LIBS=$ac_check_lib_save_LIBS
7923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7925$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007926if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007927
Matthias Kloseb9621712010-04-24 17:59:49 +00007928$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007929
Brett Cannonc6d936e2009-06-07 20:09:53 +00007930 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007931fi
7932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007933
7934# checks for system dependent C++ extensions support
7935case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7937$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007940
Georg Brandl59e87bd2011-02-15 19:48:59 +00007941 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007942int
7943main ()
7944{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007945loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ;
7947 return 0;
7948}
Matthias Kloseb159a552010-04-25 21:00:44 +00007949
Martin v. Löwis11437992002-04-12 09:54:03 +00007950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007951if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007952
Matthias Kloseb159a552010-04-25 21:00:44 +00007953
Matthias Kloseb9621712010-04-24 17:59:49 +00007954$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007955
Matthias Kloseb159a552010-04-25 21:00:44 +00007956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007957$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007958
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007959else
Matthias Kloseb159a552010-04-25 21:00:44 +00007960
7961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007962$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007963
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965rm -f core conftest.err conftest.$ac_objext \
7966 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007967 *) ;;
7968esac
7969
Guido van Rossum70c7f481998-03-26 18:44:10 +00007970# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7972$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007973if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007975else
Martin v. Löwis11437992002-04-12 09:54:03 +00007976 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007977LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981/* Override any GCC internal prototype to avoid an error.
7982 Use char because int might match the return type of a GCC
7983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007984#ifdef __cplusplus
7985extern "C"
7986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007987char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007988int
7989main ()
7990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ;
7993 return 0;
7994}
7995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001rm -f core conftest.err conftest.$ac_objext \
8002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008003LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8006$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008007if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008008 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008009fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008010 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8012$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008013if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008015else
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008017LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021/* Override any GCC internal prototype to avoid an error.
8022 Use char because int might match the return type of a GCC
8023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008024#ifdef __cplusplus
8025extern "C"
8026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008027char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008028int
8029main ()
8030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ;
8033 return 0;
8034}
8035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041rm -f core conftest.err conftest.$ac_objext \
8042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008043LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8046$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008047if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008048 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008049fi
8050 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008051
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8053$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008056if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8059$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008060LIBS="$withval $LIBS"
8061
8062else
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065fi
8066
Guido van Rossum7f43da71994-08-01 12:15:30 +00008067
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008068if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008069 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8070set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008073if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008074 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008075else
8076 case $PKG_CONFIG in
8077 [\\/]* | ?:[\\/]*)
8078 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8079 ;;
8080 *)
8081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8082for as_dir in $PATH
8083do
8084 IFS=$as_save_IFS
8085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8088 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008090 break 2
8091 fi
8092done
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008094IFS=$as_save_IFS
8095
8096 ;;
8097esac
8098fi
8099PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8100if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8102$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008103else
Matthias Kloseb9621712010-04-24 17:59:49 +00008104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8105$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106fi
8107
8108
8109fi
8110if test -z "$ac_cv_path_PKG_CONFIG"; then
8111 ac_pt_PKG_CONFIG=$PKG_CONFIG
8112 # Extract the first word of "pkg-config", so it can be a program name with args.
8113set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8115$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008116if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118else
8119 case $ac_pt_PKG_CONFIG in
8120 [\\/]* | ?:[\\/]*)
8121 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8122 ;;
8123 *)
8124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8125for as_dir in $PATH
8126do
8127 IFS=$as_save_IFS
8128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8131 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008133 break 2
8134 fi
8135done
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008137IFS=$as_save_IFS
8138
8139 ;;
8140esac
8141fi
8142ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8143if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8145$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008146else
Matthias Kloseb9621712010-04-24 17:59:49 +00008147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008149fi
8150
8151 if test "x$ac_pt_PKG_CONFIG" = x; then
8152 PKG_CONFIG=""
8153 else
8154 case $cross_compiling:$ac_tool_warned in
8155yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008158ac_tool_warned=yes ;;
8159esac
8160 PKG_CONFIG=$ac_pt_PKG_CONFIG
8161 fi
8162else
8163 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8164fi
8165
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008166
8167# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8169$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008170
8171# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008172if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008173 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008174else
8175 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008176fi
8177
8178
Matthias Kloseb9621712010-04-24 17:59:49 +00008179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8180$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008181
8182# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8184$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008185
8186# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008187if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008188 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008189else
8190 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008191fi
8192
8193
8194if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008195 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8196else
8197 LIBFFI_INCLUDEDIR=""
8198fi
8199
8200
Matthias Kloseb9621712010-04-24 17:59:49 +00008201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8202$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008203
Benjamin Peterson076ed002010-10-31 17:11:02 +00008204# Check for support for loadable sqlite extensions
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8206$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8207# Check whether --enable-loadable-sqlite-extensions was given.
8208if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8209 enableval=$enable_loadable_sqlite_extensions;
8210else
8211 enable_loadable_sqlite_extensions="no"
8212fi
8213
8214
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8216$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8217
Matthias Klose55708cc2009-04-30 08:06:49 +00008218# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8220$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008221
8222# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008223if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008224 withval=$with_dbmliborder;
8225if test x$with_dbmliborder = xyes
8226then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008227as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008228else
8229 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8230 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8231 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008232 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008233 fi
8234 done
8235fi
8236fi
8237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8239$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008240
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008241# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008242
8243
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8245$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008248if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249 withval=$with_signal_module;
8250fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008251
8252
8253if test -z "$with_signal_module"
8254then with_signal_module="yes"
8255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8257$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008258
8259if test "${with_signal_module}" = "yes"; then
8260 USE_SIGNAL_MODULE=""
8261 SIGNAL_OBJS=""
8262else
8263 USE_SIGNAL_MODULE="#"
8264 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8265fi
8266
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008267# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008268
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008269USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272
8273# Templates for things AC_DEFINEd more than once.
8274# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008275
8276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
8278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8280$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008282# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008283if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008284 withval=$with_threads;
8285fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008286
8287
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008288# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008291if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292 withval=$with_thread; with_threads=$with_thread
8293fi
8294
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008295
8296if test -z "$with_threads"
8297then with_threads="yes"
8298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8300$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008301
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008302
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008303if test "$with_threads" = "no"
8304then
8305 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008306elif test "$ac_cv_pthread_is_default" = yes
8307then
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008309
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008310 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008312
8313 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008315elif test "$ac_cv_kpthread" = "yes"
8316then
8317 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008318 if test "$ac_cv_cxx_thread" = "yes"; then
8319 CXX="$CXX -Kpthread"
8320 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008323 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008324 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008325elif test "$ac_cv_kthread" = "yes"
8326then
8327 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008328 if test "$ac_cv_cxx_thread" = "yes"; then
8329 CXX="$CXX -Kthread"
8330 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008332
8333 posix_threads=yes
8334 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008335elif test "$ac_cv_pthread" = "yes"
8336then
8337 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008338 if test "$ac_cv_cxx_thread" = "yes"; then
8339 CXX="$CXX -pthread"
8340 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008342
8343 posix_threads=yes
8344 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008345else
8346 if test ! -z "$with_threads" -a -d "$with_threads"
8347 then LDFLAGS="$LDFLAGS -L$with_threads"
8348 fi
8349 if test ! -z "$withval" -a -d "$withval"
8350 then LDFLAGS="$LDFLAGS -L$withval"
8351 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008352
8353 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008354 # define _POSIX_THREADS in unistd.h. Some apparently don't
8355 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8357$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008359/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008360
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008361#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008362#ifdef _POSIX_THREADS
8363yes
8364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008365
8366_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008367if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008369 unistd_defines_pthreads=yes
8370else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008371 unistd_defines_pthreads=no
8372fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008373rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008374
Matthias Kloseb9621712010-04-24 17:59:49 +00008375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8376$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 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 +00008381if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008388
8389 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008390 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008391else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008392
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 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 +00008394if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008398
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008401
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008403else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008404
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008405 # Just looking for pthread_create in libpthread is not enough:
8406 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8407 # So we really have to include pthread.h, and then link.
8408 _libs=$LIBS
8409 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8411$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008414#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008415
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008416void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008417int
8418main ()
8419{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008420
8421pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008422 ;
8423 return 0;
8424}
8425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008426if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008427
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8429$as_echo "yes" >&6; }
8430 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008431
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008432 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008433 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008434else
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008436 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008437 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008438if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008440
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008441 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008442 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008443else
Guido van Rossumad678af1998-10-02 14:42:15 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8446$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008447if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008449else
Martin v. Löwis11437992002-04-12 09:54:03 +00008450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008451LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455/* Override any GCC internal prototype to avoid an error.
8456 Use char because int might match the return type of a GCC
8457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458#ifdef __cplusplus
8459extern "C"
8460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008461char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008462int
8463main ()
8464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008465return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ;
8467 return 0;
8468}
8469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008475rm -f core conftest.err conftest.$ac_objext \
8476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008477LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8480$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008481if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008483
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008484 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008485 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008486 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008487else
Greg Steinadf63d62000-07-05 10:38:09 +00008488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8490$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008491if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008493else
Martin v. Löwis11437992002-04-12 09:54:03 +00008494 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008495LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499/* Override any GCC internal prototype to avoid an error.
8500 Use char because int might match the return type of a GCC
8501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502#ifdef __cplusplus
8503extern "C"
8504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008505char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ;
8511 return 0;
8512}
8513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008516else
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519rm -f core conftest.err conftest.$ac_objext \
8520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008521LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8524$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008525if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008526 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008528 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008529 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008530 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008531else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8534$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008535if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008536 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008537else
Martin v. Löwis11437992002-04-12 09:54:03 +00008538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008539LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543/* Override any GCC internal prototype to avoid an error.
8544 Use char because int might match the return type of a GCC
8545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546#ifdef __cplusplus
8547extern "C"
8548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008549char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008550int
8551main ()
8552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008554 ;
8555 return 0;
8556}
8557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008560else
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563rm -f core conftest.err conftest.$ac_objext \
8564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8568$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008569if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008571
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008572 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008573 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008574 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008575else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8578$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008579if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008581else
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008583LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587/* Override any GCC internal prototype to avoid an error.
8588 Use char because int might match the return type of a GCC
8589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008590#ifdef __cplusplus
8591extern "C"
8592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008593char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008594int
8595main ()
8596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008597return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008598 ;
8599 return 0;
8600}
8601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008602if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008604else
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008607rm -f core conftest.err conftest.$ac_objext \
8608 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008609LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8612$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008613if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008615
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008616 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008617 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008618 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008619else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008620
Martin v. Löwis130fb172001-07-19 11:00:41 +00008621 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008622fi
8623
Guido van Rossum627b2d71993-12-24 10:39:16 +00008624
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008625fi
8626
Guido van Rossum0be3e491997-05-22 20:33:33 +00008627fi
8628
Guido van Rossum49545951997-12-02 19:28:29 +00008629fi
8630
Guido van Rossumb93a8621998-05-07 13:27:32 +00008631fi
8632
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634rm -f core conftest.err conftest.$ac_objext \
8635 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008636fi
8637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638
8639fi
8640
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008641
Michael W. Hudson54241132001-12-07 15:38:26 +00008642
Matthias Kloseb9621712010-04-24 17:59:49 +00008643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8644$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008645if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008647else
Martin v. Löwis11437992002-04-12 09:54:03 +00008648 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008649LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653/* Override any GCC internal prototype to avoid an error.
8654 Use char because int might match the return type of a GCC
8655 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008656#ifdef __cplusplus
8657extern "C"
8658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008659char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008660int
8661main ()
8662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ;
8665 return 0;
8666}
8667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008668if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008670else
Matthias Kloseb9621712010-04-24 17:59:49 +00008671 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008673rm -f core conftest.err conftest.$ac_objext \
8674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008675LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8678$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008679if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008681
Martin v. Löwis130fb172001-07-19 11:00:41 +00008682 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008683 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008684 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008685fi
8686
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008687
Neal Norwitza978ab02002-11-02 16:58:05 +00008688 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8690$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008691if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008693else
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008695LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699/* Override any GCC internal prototype to avoid an error.
8700 Use char because int might match the return type of a GCC
8701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008702#ifdef __cplusplus
8703extern "C"
8704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008705char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008706int
8707main ()
8708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008709return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ;
8711 return 0;
8712}
8713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719rm -f core conftest.err conftest.$ac_objext \
8720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008722fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8724$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008725if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008727
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008728 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008729 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008730 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008731fi
8732
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008733 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008734fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008735
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008736if test "$posix_threads" = "yes"; then
8737 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008740
8741 fi
8742
8743 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8744 case $ac_sys_system/$ac_sys_release in
8745 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008746$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008747
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008748 ;;
8749 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008750$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008751
8752 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008753 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008754$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008755
8756 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008757 AIX/6)
8758$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8759
8760 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008761 esac
8762
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8764$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008765 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008767else
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 ac_cv_pthread_system_supported=no
8770else
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008772/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008773#include <pthread.h>
8774 void *foo(void *parm) {
8775 return NULL;
8776 }
8777 main() {
8778 pthread_attr_t attr;
8779 pthread_t id;
8780 if (pthread_attr_init(&attr)) exit(-1);
8781 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8782 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8783 exit(0);
8784 }
8785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008786if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008787 ac_cv_pthread_system_supported=yes
8788else
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008793fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795
Guido van Rossum627b2d71993-12-24 10:39:16 +00008796fi
8797
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8799$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800 if test "$ac_cv_pthread_system_supported" = "yes"; then
8801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008803
8804 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 for ac_func in pthread_sigmask
8806do :
8807 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008808if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008809 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008810#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008811_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008812 case $ac_sys_system in
8813 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008816
8817 ;;
8818 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008819fi
8820done
8821
8822fi
8823
8824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008825# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008826
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8828$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008830if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008832 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8834$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008835 ipv6=no
8836 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8838$as_echo "yes" >&6; }
8839 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840
8841 ipv6=yes
8842 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008844else
Martin v. Löwis11437992002-04-12 09:54:03 +00008845
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008850 ipv6=no
8851
8852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008854/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008855 /* AF_INET6 available check */
8856#include <sys/types.h>
8857#include <sys/socket.h>
8858main()
8859{
8860 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8861 exit(1);
8862 else
8863 exit(0);
8864}
8865
Martin v. Löwis11437992002-04-12 09:54:03 +00008866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008867if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008868
Matthias Kloseb9621712010-04-24 17:59:49 +00008869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8870$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008871 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008872
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008873else
Matthias Kloseb159a552010-04-25 21:00:44 +00008874
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008877 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008882fi
8883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008885if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8887$as_echo_n "checking if RFC2553 API is available... " >&6; }
8888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008889/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
8891 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008892#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
8895{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008896struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008897 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ;
8899 return 0;
8900}
Matthias Kloseb159a552010-04-25 21:00:44 +00008901
Martin v. Löwis11437992002-04-12 09:54:03 +00008902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008903if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008904
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008906$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008907 ipv6=yes
8908
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008909else
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008912$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008913 ipv6=no
8914
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008917fi
8918
8919if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008920 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008921
8922fi
8923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924fi
8925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926
8927ipv6type=unknown
8928ipv6lib=none
8929ipv6trylibc=no
8930
8931if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8933$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008934 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8935 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008936 case $i in
8937 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008939/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008941#include <netinet/in.h>
8942#ifdef IPV6_INRIA_VERSION
8943yes
8944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008945_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008948 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008949fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008950rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008951
8952 ;;
8953 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008955/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008956
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008957#include <netinet/in.h>
8958#ifdef __KAME__
8959yes
8960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008961_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 ipv6type=$i;
8965 ipv6lib=inet6
8966 ipv6libdir=/usr/local/v6/lib
8967 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008968fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008969rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008970
8971 ;;
8972 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008974/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008975
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008976#include <features.h>
8977#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8978yes
8979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008980_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983 ipv6type=$i;
8984 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008986rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008987
8988 ;;
8989 linux-inet6)
8990 if test -d /usr/inet6; then
8991 ipv6type=$i
8992 ipv6lib=inet6
8993 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008994 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008995 fi
8996 ;;
8997 solaris)
8998 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008999 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009000 ipv6type=$i
9001 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009002 fi
9003 fi
9004 ;;
9005 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009007/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009#include <sys/param.h>
9010#ifdef _TOSHIBA_INET6
9011yes
9012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009013_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009016 ipv6type=$i;
9017 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009018 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009019fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009020rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009021
9022 ;;
9023 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009026
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027#include </usr/local/v6/include/sys/v6config.h>
9028#ifdef __V6D__
9029yes
9030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009031_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009034 ipv6type=$i;
9035 ipv6lib=v6;
9036 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009037 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009038fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009039rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009040
9041 ;;
9042 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009044/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009046#include <sys/param.h>
9047#ifdef _ZETA_MINAMI_INET6
9048yes
9049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009050_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009053 ipv6type=$i;
9054 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009055 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009056fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009057rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009058
9059 ;;
9060 esac
9061 if test "$ipv6type" != "unknown"; then
9062 break
9063 fi
9064 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9066$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009067fi
9068
9069if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9070 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9071 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9072 echo "using lib$ipv6lib"
9073 else
9074 if test $ipv6trylibc = "yes"; then
9075 echo "using libc"
9076 else
9077 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9078 echo "You need to fetch lib$ipv6lib.a from appropriate"
9079 echo 'ipv6 kit and compile beforehand.'
9080 exit 1
9081 fi
9082 fi
9083fi
9084
Matthias Kloseb9621712010-04-24 17:59:49 +00009085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9086$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009088/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
9090 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009091int
9092main ()
9093{
9094FSIORefNum fRef = 0
9095 ;
9096 return 0;
9097}
Matthias Kloseb159a552010-04-25 21:00:44 +00009098
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009100if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009101
Matthias Kloseb159a552010-04-25 21:00:44 +00009102
Matthias Kloseb9621712010-04-24 17:59:49 +00009103$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9106$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009107
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009108else
Matthias Kloseb159a552010-04-25 21:00:44 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009112
9113fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9115
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009116# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9118$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009119
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009120# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009121if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009122 withval=$with_doc_strings;
9123fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009124
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009125
9126if test -z "$with_doc_strings"
9127then with_doc_strings="yes"
9128fi
9129if test "$with_doc_strings" != "no"
9130then
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009133
9134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9136$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009137
Antoine Pitrou042b1282010-08-13 21:15:58 +00009138# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9140$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009143if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009145if test "$withval" != no
9146then
9147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009149
Matthias Kloseb9621712010-04-24 17:59:49 +00009150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9151$as_echo "yes" >&6; }
9152else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009154fi
9155else
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158fi
9159
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009160
9161# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9163$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009166if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167 withval=$with_pymalloc;
9168fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009169
Neil Schemenauera35c6882001-02-27 04:45:05 +00009170
Neil Schemenauer16c22972002-03-22 15:34:49 +00009171if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009172then
9173 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009174 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009175fi
9176if test "$with_pymalloc" != "no"
9177then
Martin v. Löwis11437992002-04-12 09:54:03 +00009178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009180
9181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9183$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009184
Benjamin Peterson05159c42009-12-03 03:01:27 +00009185# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9187$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009188
9189# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009191 withval=$with_valgrind;
9192else
9193 with_valgrind=no
9194fi
9195
Matthias Kloseb9621712010-04-24 17:59:49 +00009196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9197$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009198if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009199 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 +00009200if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009201
Matthias Kloseb9621712010-04-24 17:59:49 +00009202$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009203
9204else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009205 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009206
9207fi
9208
9209
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009210 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009211fi
9212
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009213# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009214
Guido van Rossum98935bf2001-09-05 19:13:16 +00009215DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009216
Guido van Rossume97ee181999-12-20 21:27:22 +00009217# the dlopen() function means we might want to use dynload_shlib.o. some
9218# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009219for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009220do :
9221 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009222if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009224#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009225_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009226
Guido van Rossume97ee181999-12-20 21:27:22 +00009227fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009228done
Guido van Rossume97ee181999-12-20 21:27:22 +00009229
Michael W. Hudson54241132001-12-07 15:38:26 +00009230
Guido van Rossume97ee181999-12-20 21:27:22 +00009231# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9232# loading of modules.
9233
Matthias Kloseb9621712010-04-24 17:59:49 +00009234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9235$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009236if test -z "$DYNLOADFILE"
9237then
9238 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009239 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9240 if test "$ac_cv_func_dlopen" = yes
9241 then DYNLOADFILE="dynload_shlib.o"
9242 else DYNLOADFILE="dynload_aix.o"
9243 fi
9244 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009245 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009246 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9247 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009248 *)
9249 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9250 # out any dynamic loading
9251 if test "$ac_cv_func_dlopen" = yes
9252 then DYNLOADFILE="dynload_shlib.o"
9253 else DYNLOADFILE="dynload_stub.o"
9254 fi
9255 ;;
9256 esac
9257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9259$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009260if test "$DYNLOADFILE" != "dynload_stub.o"
9261then
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009264
9265fi
9266
Neil Schemenauer4e425612001-06-19 15:44:15 +00009267# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9268
Michael W. Hudson54241132001-12-07 15:38:26 +00009269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9271$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009272if test -z "$MACHDEP_OBJS"
9273then
Jack Jansene578a632001-08-15 01:27:14 +00009274 MACHDEP_OBJS=$extra_machdep_objs
9275else
9276 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9279$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009280
Guido van Rossum627b2d71993-12-24 10:39:16 +00009281# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009282for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009283 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009284 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9285 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009286 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009287 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009288 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009289 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009290 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009291 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009292 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009293 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009294 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009295 sigaction sigaltstack siginterrupt sigpending \
9296 sigrelse sigwait snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009297 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009298 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9299 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009300do :
9301 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9302ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009303if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009305#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009306_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009307
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009308fi
9309done
9310
Michael W. Hudson54241132001-12-07 15:38:26 +00009311
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009312# For some functions, having a definition is not sufficient, since
9313# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9315$as_echo_n "checking for chroot... " >&6; }
9316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009317/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009318#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009319int
9320main ()
9321{
9322void *x=chroot
9323 ;
9324 return 0;
9325}
9326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009328
Matthias Kloseb9621712010-04-24 17:59:49 +00009329$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009330
Matthias Kloseb159a552010-04-25 21:00:44 +00009331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009332$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009333else
Matthias Kloseb9621712010-04-24 17:59:49 +00009334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336
9337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9340$as_echo_n "checking for link... " >&6; }
9341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009343#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009344int
9345main ()
9346{
9347void *x=link
9348 ;
9349 return 0;
9350}
9351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009355
Matthias Kloseb159a552010-04-25 21:00:44 +00009356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009357$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009358else
Matthias Kloseb9621712010-04-24 17:59:49 +00009359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9360$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009361
9362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9365$as_echo_n "checking for symlink... " >&6; }
9366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009367/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009368#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009369int
9370main ()
9371{
9372void *x=symlink
9373 ;
9374 return 0;
9375}
9376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009378
Matthias Kloseb9621712010-04-24 17:59:49 +00009379$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009380
Matthias Kloseb159a552010-04-25 21:00:44 +00009381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009382$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009383else
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9385$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009386
9387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9390$as_echo_n "checking for fchdir... " >&6; }
9391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009393#include <unistd.h>
9394int
9395main ()
9396{
9397void *x=fchdir
9398 ;
9399 return 0;
9400}
9401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009403
Matthias Kloseb9621712010-04-24 17:59:49 +00009404$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009405
Matthias Kloseb159a552010-04-25 21:00:44 +00009406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009407$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009408else
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411
9412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9415$as_echo_n "checking for fsync... " >&6; }
9416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009417/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009418#include <unistd.h>
9419int
9420main ()
9421{
9422void *x=fsync
9423 ;
9424 return 0;
9425}
9426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009430
Matthias Kloseb159a552010-04-25 21:00:44 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009432$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009433else
Matthias Kloseb9621712010-04-24 17:59:49 +00009434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009436
9437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9440$as_echo_n "checking for fdatasync... " >&6; }
9441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009442/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009443#include <unistd.h>
9444int
9445main ()
9446{
9447void *x=fdatasync
9448 ;
9449 return 0;
9450}
9451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009453
Matthias Kloseb9621712010-04-24 17:59:49 +00009454$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009455
Matthias Kloseb159a552010-04-25 21:00:44 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009457$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009458else
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009461
9462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9465$as_echo_n "checking for epoll... " >&6; }
9466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009467/* end confdefs.h. */
9468#include <sys/epoll.h>
9469int
9470main ()
9471{
9472void *x=epoll_create
9473 ;
9474 return 0;
9475}
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009480
Matthias Kloseb159a552010-04-25 21:00:44 +00009481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009482$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009483else
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009486
9487fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9490$as_echo_n "checking for kqueue... " >&6; }
9491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009492/* end confdefs.h. */
9493
9494#include <sys/types.h>
9495#include <sys/event.h>
9496
9497int
9498main ()
9499{
9500int x=kqueue()
9501 ;
9502 return 0;
9503}
9504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009505if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009506
Matthias Kloseb9621712010-04-24 17:59:49 +00009507$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009511else
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009514
9515fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009517# On some systems (eg. FreeBSD 5), we would find a definition of the
9518# functions ctermid_r, setgroups in the library, but no prototype
9519# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9520# address to avoid compiler warnings and potential miscompilations
9521# because of the missing prototypes.
9522
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9524$as_echo_n "checking for ctermid_r... " >&6; }
9525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009526/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009527
Martin v. Löwisd5843682002-11-21 20:41:28 +00009528#include <stdio.h>
9529
Martin v. Löwisd5843682002-11-21 20:41:28 +00009530int
9531main ()
9532{
9533void* p = ctermid_r
9534 ;
9535 return 0;
9536}
9537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009541
Matthias Kloseb159a552010-04-25 21:00:44 +00009542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009543$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009544else
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9546$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009547
9548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9550
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9552$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009553if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009554 $as_echo_n "(cached) " >&6
9555else
9556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009557/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009558#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009559int
9560main ()
9561{
9562void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009563
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009564 ;
9565 return 0;
9566}
9567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009568if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009569 ac_cv_flock_decl=yes
9570else
9571 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009572
9573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009575
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009576fi
9577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9578$as_echo "$ac_cv_flock_decl" >&6; }
9579if test "x${ac_cv_flock_decl}" = xyes; then
9580 for ac_func in flock
9581do :
9582 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009583if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009584 cat >>confdefs.h <<_ACEOF
9585#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009586_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009587
Antoine Pitroua3000072010-09-07 14:52:42 +00009588else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009590$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009591if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009592 $as_echo_n "(cached) " >&6
9593else
9594 ac_check_lib_save_LIBS=$LIBS
9595LIBS="-lbsd $LIBS"
9596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9597/* end confdefs.h. */
9598
9599/* Override any GCC internal prototype to avoid an error.
9600 Use char because int might match the return type of a GCC
9601 builtin and then its argument prototype would still apply. */
9602#ifdef __cplusplus
9603extern "C"
9604#endif
9605char flock ();
9606int
9607main ()
9608{
9609return flock ();
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614if ac_fn_c_try_link "$LINENO"; then :
9615 ac_cv_lib_bsd_flock=yes
9616else
9617 ac_cv_lib_bsd_flock=no
9618fi
9619rm -f core conftest.err conftest.$ac_objext \
9620 conftest$ac_exeext conftest.$ac_ext
9621LIBS=$ac_check_lib_save_LIBS
9622fi
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9624$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009625if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009626 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009627
9628
9629$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9630
9631
9632fi
9633
9634
9635fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009636done
9637
Antoine Pitroua3000072010-09-07 14:52:42 +00009638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9641$as_echo_n "checking for getpagesize... " >&6; }
9642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009643/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009644
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009645#include <unistd.h>
9646
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009647int
9648main ()
9649{
9650void* p = getpagesize
9651 ;
9652 return 0;
9653}
9654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009656
Matthias Kloseb9621712010-04-24 17:59:49 +00009657$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009658
Matthias Kloseb159a552010-04-25 21:00:44 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009660$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009661else
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009664
9665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009667
Antoine Pitrou6f26be02011-05-03 18:18:59 +02009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mallopt can set malloc mmap threshold" >&5
9669$as_echo_n "checking whether mallopt can set malloc mmap threshold... " >&6; }
9670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9671/* end confdefs.h. */
9672
9673#include <malloc.h>
9674
9675int
9676main ()
9677{
9678mallopt(M_MMAP_THRESHOLD, 256 * 1024)
9679 ;
9680 return 0;
9681}
9682_ACEOF
9683if ac_fn_c_try_compile "$LINENO"; then :
9684
9685$as_echo "#define HAVE_MALLOPT_MMAP_THRESHOLD 1" >>confdefs.h
9686
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9688$as_echo "yes" >&6; }
9689else
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9691$as_echo "no" >&6; }
9692
9693fi
9694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9695
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009696for ac_prog in true
9697do
9698 # Extract the first word of "$ac_prog", so it can be a program name with args.
9699set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9701$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009702if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009704else
9705 if test -n "$TRUE"; then
9706 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9707else
9708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709for as_dir in $PATH
9710do
9711 IFS=$as_save_IFS
9712 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714 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 +00009715 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 $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 +00009717 break 2
9718 fi
9719done
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009722
9723fi
9724fi
9725TRUE=$ac_cv_prog_TRUE
9726if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9728$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009729else
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009732fi
9733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009735 test -n "$TRUE" && break
9736done
9737test -n "$TRUE" || TRUE="/bin/true"
9738
9739
Matthias Kloseb9621712010-04-24 17:59:49 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9741$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009742if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009744else
9745 ac_check_lib_save_LIBS=$LIBS
9746LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009748/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750/* Override any GCC internal prototype to avoid an error.
9751 Use char because int might match the return type of a GCC
9752 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009753#ifdef __cplusplus
9754extern "C"
9755#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009756char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009757int
9758main ()
9759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009760return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009766 ac_cv_lib_c_inet_aton=yes
9767else
Matthias Kloseb9621712010-04-24 17:59:49 +00009768 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009770rm -f core conftest.err conftest.$ac_objext \
9771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009772LIBS=$ac_check_lib_save_LIBS
9773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9775$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009776if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009777 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009778else
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9780$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009781if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009783else
9784 ac_check_lib_save_LIBS=$LIBS
9785LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009787/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009789/* Override any GCC internal prototype to avoid an error.
9790 Use char because int might match the return type of a GCC
9791 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009792#ifdef __cplusplus
9793extern "C"
9794#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009795char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009796int
9797main ()
9798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009800 ;
9801 return 0;
9802}
9803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009805 ac_cv_lib_resolv_inet_aton=yes
9806else
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009809rm -f core conftest.err conftest.$ac_objext \
9810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009811LIBS=$ac_check_lib_save_LIBS
9812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9814$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009815if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009816 cat >>confdefs.h <<_ACEOF
9817#define HAVE_LIBRESOLV 1
9818_ACEOF
9819
9820 LIBS="-lresolv $LIBS"
9821
9822fi
9823
9824
9825fi
9826
9827
Christian Heimesd0764e22007-12-04 15:00:33 +00009828# On Tru64, chflags seems to be present, but calling it will
9829# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9831$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009832if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009834else
Matthias Kloseb9621712010-04-24 17:59:49 +00009835 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009836 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009837else
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009839/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009840[
Christian Heimesd0764e22007-12-04 15:00:33 +00009841#include <sys/stat.h>
9842#include <unistd.h>
9843int main(int argc, char*argv[])
9844{
9845 if(chflags(argv[0], 0) != 0)
9846 return 1;
9847 return 0;
9848}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009849]
Christian Heimesd0764e22007-12-04 15:00:33 +00009850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009851if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009852 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009853else
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009858fi
9859
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9863$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009864if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009866if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009867 ac_cv_have_chflags="yes"
9868else
9869 ac_cv_have_chflags="no"
9870fi
9871
9872fi
9873if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009876
9877fi
9878
Matthias Kloseb9621712010-04-24 17:59:49 +00009879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9880$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009881if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009883else
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009885 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009886else
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009888/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009889[
Christian Heimesd0764e22007-12-04 15:00:33 +00009890#include <sys/stat.h>
9891#include <unistd.h>
9892int main(int argc, char*argv[])
9893{
9894 if(lchflags(argv[0], 0) != 0)
9895 return 1;
9896 return 0;
9897}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009898]
Christian Heimesd0764e22007-12-04 15:00:33 +00009899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009901 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009907fi
9908
9909
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9912$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009913if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009915if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009916 ac_cv_have_lchflags="yes"
9917else
9918 ac_cv_have_lchflags="no"
9919fi
9920
9921fi
9922if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009923
Matthias Kloseb9621712010-04-24 17:59:49 +00009924$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009925
9926fi
9927
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009928case $ac_sys_system/$ac_sys_release in
9929Darwin/*)
9930 _CUR_CFLAGS="${CFLAGS}"
9931 _CUR_LDFLAGS="${LDFLAGS}"
9932 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9933 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9934 ;;
9935esac
9936
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9938$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009939if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009941else
9942 ac_check_lib_save_LIBS=$LIBS
9943LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009945/* end confdefs.h. */
9946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947/* Override any GCC internal prototype to avoid an error.
9948 Use char because int might match the return type of a GCC
9949 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009950#ifdef __cplusplus
9951extern "C"
9952#endif
9953char inflateCopy ();
9954int
9955main ()
9956{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009958 ;
9959 return 0;
9960}
9961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009962if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009963 ac_cv_lib_z_inflateCopy=yes
9964else
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967rm -f core conftest.err conftest.$ac_objext \
9968 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009969LIBS=$ac_check_lib_save_LIBS
9970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9972$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009973if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009976
9977fi
9978
9979
9980case $ac_sys_system/$ac_sys_release in
9981Darwin/*)
9982 CFLAGS="${_CUR_CFLAGS}"
9983 LDFLAGS="${_CUR_LDFLAGS}"
9984 ;;
9985esac
9986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9988$as_echo_n "checking for hstrerror... " >&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öwise9416172003-05-03 10:12:45 +00009992#include <netdb.h>
9993
Martin v. Löwise9416172003-05-03 10:12:45 +00009994int
9995main ()
9996{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009997void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009998 ;
9999 return 0;
10000}
10001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010003
Matthias Kloseb9621712010-04-24 17:59:49 +000010004$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010005
Matthias Kloseb159a552010-04-25 21:00:44 +000010006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010008else
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010011
10012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010013rm -f core conftest.err conftest.$ac_objext \
10014 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015
Matthias Kloseb9621712010-04-24 17:59:49 +000010016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10017$as_echo_n "checking for inet_aton... " >&6; }
10018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010019/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010020
Martin v. Löwis86d66262006-02-17 08:40:11 +000010021#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010022#include <sys/socket.h>
10023#include <netinet/in.h>
10024#include <arpa/inet.h>
10025
Martin v. Löwise9416172003-05-03 10:12:45 +000010026int
10027main ()
10028{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010029void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010030 ;
10031 return 0;
10032}
10033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010035
Matthias Kloseb9621712010-04-24 17:59:49 +000010036$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010037
Matthias Kloseb159a552010-04-25 21:00:44 +000010038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010039$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010040else
Matthias Kloseb9621712010-04-24 17:59:49 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010043
10044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010045rm -f core conftest.err conftest.$ac_objext \
10046 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10049$as_echo_n "checking for inet_pton... " >&6; }
10050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010052
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010053#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010054#include <sys/socket.h>
10055#include <netinet/in.h>
10056#include <arpa/inet.h>
10057
Martin v. Löwise9416172003-05-03 10:12:45 +000010058int
10059main ()
10060{
10061void* p = inet_pton
10062 ;
10063 return 0;
10064}
10065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010067
Matthias Kloseb9621712010-04-24 17:59:49 +000010068$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010069
Matthias Kloseb159a552010-04-25 21:00:44 +000010070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010071$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010072else
Matthias Kloseb9621712010-04-24 17:59:49 +000010073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010075
10076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010078
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010079# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10081$as_echo_n "checking for setgroups... " >&6; }
10082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010083/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010084
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010085#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010086#ifdef HAVE_GRP_H
10087#include <grp.h>
10088#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010089
Martin v. Löwisd5843682002-11-21 20:41:28 +000010090int
10091main ()
10092{
10093void* p = setgroups
10094 ;
10095 return 0;
10096}
10097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010098if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010099
Matthias Kloseb9621712010-04-24 17:59:49 +000010100$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010101
Matthias Kloseb159a552010-04-25 21:00:44 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010103$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010104else
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010107
10108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010111# check for openpty and forkpty
10112
10113for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010114do :
10115 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010116if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010118#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010119_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010120
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010121else
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10123$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010124if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010126else
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010128LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132/* Override any GCC internal prototype to avoid an error.
10133 Use char because int might match the return type of a GCC
10134 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135#ifdef __cplusplus
10136extern "C"
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010139int
10140main ()
10141{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010143 ;
10144 return 0;
10145}
10146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010148 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010149else
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010152rm -f core conftest.err conftest.$ac_objext \
10153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010154LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10157$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010158if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010160 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10163$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010164if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010166else
10167 ac_check_lib_save_LIBS=$LIBS
10168LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010170/* end confdefs.h. */
10171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010172/* Override any GCC internal prototype to avoid an error.
10173 Use char because int might match the return type of a GCC
10174 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010175#ifdef __cplusplus
10176extern "C"
10177#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010178char openpty ();
10179int
10180main ()
10181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010183 ;
10184 return 0;
10185}
10186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010187if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010188 ac_cv_lib_bsd_openpty=yes
10189else
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010192rm -f core conftest.err conftest.$ac_objext \
10193 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010194LIBS=$ac_check_lib_save_LIBS
10195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10197$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010198if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010200 LIBS="$LIBS -lbsd"
10201fi
10202
10203
10204fi
10205
Fred Drake8cef4cf2000-06-28 16:40:38 +000010206
10207fi
10208done
10209
10210for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010211do :
10212 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010213if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010215#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010216_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010217
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218else
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10220$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010221if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010223else
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010225LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229/* Override any GCC internal prototype to avoid an error.
10230 Use char because int might match the return type of a GCC
10231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010232#ifdef __cplusplus
10233extern "C"
10234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010235char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010236int
10237main ()
10238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ;
10241 return 0;
10242}
10243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249rm -f core conftest.err conftest.$ac_objext \
10250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010251LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10254$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010255if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010258else
Matthias Kloseb9621712010-04-24 17:59:49 +000010259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10260$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010261if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010262 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010263else
10264 ac_check_lib_save_LIBS=$LIBS
10265LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010267/* end confdefs.h. */
10268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269/* Override any GCC internal prototype to avoid an error.
10270 Use char because int might match the return type of a GCC
10271 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010272#ifdef __cplusplus
10273extern "C"
10274#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010275char forkpty ();
10276int
10277main ()
10278{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010280 ;
10281 return 0;
10282}
10283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010284if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010285 ac_cv_lib_bsd_forkpty=yes
10286else
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010289rm -f core conftest.err conftest.$ac_objext \
10290 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010291LIBS=$ac_check_lib_save_LIBS
10292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10294$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010295if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010296 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010297 LIBS="$LIBS -lbsd"
10298fi
10299
10300
10301fi
10302
Fred Drake8cef4cf2000-06-28 16:40:38 +000010303
10304fi
10305done
10306
Jack Jansendd19cf82001-12-06 22:36:17 +000010307
Christian Heimesb186d002008-03-18 15:15:01 +000010308# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010309for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010310do :
10311 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010312if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010314#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010315_ACEOF
10316
10317fi
10318done
10319
10320
Michael W. Hudson54241132001-12-07 15:38:26 +000010321# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010322for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010323do :
10324 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10325ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010326if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010327 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010328#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010329_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010331fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010332done
10333
Michael W. Hudson54241132001-12-07 15:38:26 +000010334
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010335ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10336if test "x$ac_cv_func_dup2" = xyes; then :
10337 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010338
Martin v. Löwis1142de32002-03-29 16:28:31 +000010339else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010341 *" dup2.$ac_objext "* ) ;;
10342 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010344esac
10345
Martin v. Löwis1142de32002-03-29 16:28:31 +000010346fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010347
10348ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10349if test "x$ac_cv_func_getcwd" = xyes; then :
10350 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10351
10352else
10353 case " $LIBOBJS " in
10354 *" getcwd.$ac_objext "* ) ;;
10355 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10356 ;;
10357esac
10358
10359fi
10360
10361ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10362if test "x$ac_cv_func_strdup" = xyes; then :
10363 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10364
10365else
10366 case " $LIBOBJS " in
10367 *" strdup.$ac_objext "* ) ;;
10368 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10369 ;;
10370esac
10371
10372fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010373
10374
10375for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010376do :
10377 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010378if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010383/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010384#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010385int
10386main ()
10387{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010388getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ;
10390 return 0;
10391}
10392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010393if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Matthias Kloseb9621712010-04-24 17:59:49 +000010395$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010396
Guido van Rossum627b2d71993-12-24 10:39:16 +000010397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010399
Guido van Rossum627b2d71993-12-24 10:39:16 +000010400fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010401done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010402
Jack Jansen150753c2003-03-29 22:07:47 +000010403for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010404do :
10405 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010406if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010407 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010408#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010411/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010412#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010413int
10414main ()
10415{
10416setpgrp(0,0);
10417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010424
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010427
10428fi
10429done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010430
Thomas Wouters3a584202000-08-05 23:28:51 +000010431for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010432do :
10433 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010434if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010436#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010439/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010440#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010441int
10442main ()
10443{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010444gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ;
10446 return 0;
10447}
10448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449if ac_fn_c_try_compile "$LINENO"; then :
10450
Guido van Rossum627b2d71993-12-24 10:39:16 +000010451else
Skip Montanaro6dead952003-09-25 14:50:04 +000010452
Matthias Kloseb9621712010-04-24 17:59:49 +000010453$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010454
Martin v. Löwis11437992002-04-12 09:54:03 +000010455
Guido van Rossum627b2d71993-12-24 10:39:16 +000010456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010458
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010459fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010460done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010461
Michael W. Hudson54241132001-12-07 15:38:26 +000010462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10464$as_echo_n "checking for major... " >&6; }
10465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010466/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010467
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010468#if defined(MAJOR_IN_MKDEV)
10469#include <sys/mkdev.h>
10470#elif defined(MAJOR_IN_SYSMACROS)
10471#include <sys/sysmacros.h>
10472#else
10473#include <sys/types.h>
10474#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010475
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010476int
10477main ()
10478{
10479
10480 makedev(major(0),minor(0));
10481
10482 ;
10483 return 0;
10484}
10485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010487
10488
Matthias Kloseb9621712010-04-24 17:59:49 +000010489$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010490
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10492$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010493
10494else
Skip Montanaro6dead952003-09-25 14:50:04 +000010495
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010498
10499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010500rm -f core conftest.err conftest.$ac_objext \
10501 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010502
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010503# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010504# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10506$as_echo_n "checking for getaddrinfo... " >&6; }
10507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010509
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010510#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010511#include <sys/socket.h>
10512#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010513#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010514
Martin v. Löwis11437992002-04-12 09:54:03 +000010515int
10516main ()
10517{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010518getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010519 ;
10520 return 0;
10521}
10522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010523if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010524 have_getaddrinfo=yes
10525else
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010528rm -f core conftest.err conftest.$ac_objext \
10529 conftest$ac_exeext conftest.$ac_ext
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10531$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010532if test $have_getaddrinfo = yes
10533then
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10535$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010536 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010538else
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010540 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010541else
Matthias Kloseb9621712010-04-24 17:59:49 +000010542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010544
10545#include <sys/types.h>
10546#include <netdb.h>
10547#include <string.h>
10548#include <sys/socket.h>
10549#include <netinet/in.h>
10550
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010551int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010552{
10553 int passive, gaierr, inet4 = 0, inet6 = 0;
10554 struct addrinfo hints, *ai, *aitop;
10555 char straddr[INET6_ADDRSTRLEN], strport[16];
10556
10557 for (passive = 0; passive <= 1; passive++) {
10558 memset(&hints, 0, sizeof(hints));
10559 hints.ai_family = AF_UNSPEC;
10560 hints.ai_flags = passive ? AI_PASSIVE : 0;
10561 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010562 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010563 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10564 (void)gai_strerror(gaierr);
10565 goto bad;
10566 }
10567 for (ai = aitop; ai; ai = ai->ai_next) {
10568 if (ai->ai_addr == NULL ||
10569 ai->ai_addrlen == 0 ||
10570 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10571 straddr, sizeof(straddr), strport, sizeof(strport),
10572 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10573 goto bad;
10574 }
10575 switch (ai->ai_family) {
10576 case AF_INET:
10577 if (strcmp(strport, "54321") != 0) {
10578 goto bad;
10579 }
10580 if (passive) {
10581 if (strcmp(straddr, "0.0.0.0") != 0) {
10582 goto bad;
10583 }
10584 } else {
10585 if (strcmp(straddr, "127.0.0.1") != 0) {
10586 goto bad;
10587 }
10588 }
10589 inet4++;
10590 break;
10591 case AF_INET6:
10592 if (strcmp(strport, "54321") != 0) {
10593 goto bad;
10594 }
10595 if (passive) {
10596 if (strcmp(straddr, "::") != 0) {
10597 goto bad;
10598 }
10599 } else {
10600 if (strcmp(straddr, "::1") != 0) {
10601 goto bad;
10602 }
10603 }
10604 inet6++;
10605 break;
10606 case AF_UNSPEC:
10607 goto bad;
10608 break;
10609 default:
10610 /* another family support? */
10611 break;
10612 }
10613 }
10614 }
10615
10616 if (!(inet4 == 0 || inet4 == 2))
10617 goto bad;
10618 if (!(inet6 == 0 || inet6 == 2))
10619 goto bad;
10620
10621 if (aitop)
10622 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010623 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010624
10625 bad:
10626 if (aitop)
10627 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010628 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010629}
10630
Martin v. Löwis11437992002-04-12 09:54:03 +000010631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010632if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010633 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010634else
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010641fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010642
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010644
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10646$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10647
Mark Dickinson2df5d282009-12-31 21:22:50 +000010648if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010649then
10650 if test $ipv6 = yes
10651 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010652 echo 'Fatal: You must get working getaddrinfo() function.'
10653 echo ' or you can specify "--disable-ipv6"'.
10654 exit 1
10655 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010656else
Martin v. Löwis11437992002-04-12 09:54:03 +000010657
Matthias Kloseb9621712010-04-24 17:59:49 +000010658$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010659
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010660fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010661
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010662for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010663do :
10664 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010665if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010668_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010669
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010670fi
10671done
10672
Michael W. Hudson54241132001-12-07 15:38:26 +000010673
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010674# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10676$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 +000010677if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010679else
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682#include <sys/types.h>
10683#include <sys/time.h>
10684#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010685
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
10688{
10689if ((struct tm *) 0)
10690return 0;
10691 ;
10692 return 0;
10693}
10694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010696 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10703$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010704if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010707
10708fi
10709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10711$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 +000010712if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010714else
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010716/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717#include <sys/types.h>
10718#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010719
Martin v. Löwis11437992002-04-12 09:54:03 +000010720int
10721main ()
10722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723struct tm tm;
10724 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 ;
10727 return 0;
10728}
10729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010730if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010731 ac_cv_struct_tm=time.h
10732else
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10738$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010739if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Matthias Kloseb9621712010-04-24 17:59:49 +000010741$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010742
10743fi
10744
Matthias Kloseb9621712010-04-24 17:59:49 +000010745ac_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 +000010746#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010749if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010750
10751cat >>confdefs.h <<_ACEOF
10752#define HAVE_STRUCT_TM_TM_ZONE 1
10753_ACEOF
10754
10755
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010757
Martin v. Löwis11437992002-04-12 09:54:03 +000010758if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10759
Matthias Kloseb9621712010-04-24 17:59:49 +000010760$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761
10762else
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10764"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010765if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767else
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769fi
10770
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010772#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010773_ACEOF
10774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10776$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010777if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010782#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783#if !HAVE_DECL_TZNAME
10784extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010786
Martin v. Löwis11437992002-04-12 09:54:03 +000010787int
10788main ()
10789{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010790return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010791 ;
10792 return 0;
10793}
10794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010795if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796 ac_cv_var_tzname=yes
10797else
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010800rm -f core conftest.err conftest.$ac_objext \
10801 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10804$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010805 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010808
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010809 fi
10810fi
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812ac_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 +000010813if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010814
10815cat >>confdefs.h <<_ACEOF
10816#define HAVE_STRUCT_STAT_ST_RDEV 1
10817_ACEOF
10818
10819
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010820fi
10821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822ac_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 +000010823if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010824
Martin v. Löwis11437992002-04-12 09:54:03 +000010825cat >>confdefs.h <<_ACEOF
10826#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10827_ACEOF
10828
10829
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010830fi
10831
Matthias Kloseb9621712010-04-24 17:59:49 +000010832ac_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 +000010833if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010834
10835cat >>confdefs.h <<_ACEOF
10836#define HAVE_STRUCT_STAT_ST_FLAGS 1
10837_ACEOF
10838
10839
10840fi
10841
Matthias Kloseb9621712010-04-24 17:59:49 +000010842ac_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 +000010843if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010844
10845cat >>confdefs.h <<_ACEOF
10846#define HAVE_STRUCT_STAT_ST_GEN 1
10847_ACEOF
10848
10849
10850fi
10851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852ac_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 +000010853if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010854
10855cat >>confdefs.h <<_ACEOF
10856#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10857_ACEOF
10858
10859
10860fi
10861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862ac_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 +000010863if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010864
Martin v. Löwis11437992002-04-12 09:54:03 +000010865cat >>confdefs.h <<_ACEOF
10866#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10867_ACEOF
10868
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010871
10872else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010873 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010874 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010875 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10876 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010877esac
10878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010879fi
10880
Michael W. Hudson54241132001-12-07 15:38:26 +000010881
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10884$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010885if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010887else
Matthias Kloseb159a552010-04-25 21:00:44 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010890/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010891#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010892int
10893main ()
10894{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010895return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010896 ;
10897 return 0;
10898}
10899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010901 ac_cv_header_time_altzone=yes
10902else
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010907fi
10908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10910$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010911if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010912
Matthias Kloseb9621712010-04-24 17:59:49 +000010913$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010914
10915fi
10916
Guido van Rossumda88dad1995-01-26 00:46:29 +000010917was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10919$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010921/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010922
10923#include <sys/types.h>
10924#include <sys/select.h>
10925#include <sys/time.h>
10926
Martin v. Löwis11437992002-04-12 09:54:03 +000010927int
10928main ()
10929{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010930;
Martin v. Löwis11437992002-04-12 09:54:03 +000010931 ;
10932 return 0;
10933}
10934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
10937
Matthias Kloseb9621712010-04-24 17:59:49 +000010938$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010939
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010940 was_it_defined=yes
10941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10945$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10948$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010949if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010951else
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010954#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010955int
10956main ()
10957{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010958struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 ;
10960 return 0;
10961}
10962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010964 ac_cv_struct_addrinfo=yes
10965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010967fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10969fi
10970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10972$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010973if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010976
10977fi
10978
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10980$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010981if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010983else
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010985/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010986
10987# include <sys/types.h>
10988# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010989int
10990main ()
10991{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010992struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010993 ;
10994 return 0;
10995}
10996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010998 ac_cv_struct_sockaddr_storage=yes
10999else
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11003fi
11004
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11006$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011007if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011010
11011fi
11012
Guido van Rossum627b2d71993-12-24 10:39:16 +000011013# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011014
Matthias Kloseb9621712010-04-24 17:59:49 +000011015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11016$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011017if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011019else
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011022$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011023int
11024main ()
11025{
11026static int test_array [1 - 2 * !(((char) -1) < 0)];
11027test_array [0] = 0
11028
11029 ;
11030 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011031}
Martin v. Löwis11437992002-04-12 09:54:03 +000011032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011033if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011034 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011035else
Matthias Kloseb9621712010-04-24 17:59:49 +000011036 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11041$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011042if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011044
11045fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11048$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011049if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011050 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011051else
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011053/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011054
Martin v. Löwis11437992002-04-12 09:54:03 +000011055int
11056main ()
11057{
11058/* FIXME: Include the comments suggested by Paul. */
11059#ifndef __cplusplus
11060 /* Ultrix mips cc rejects this. */
11061 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064 char const *const *pcpcc;
11065 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011066 /* NEC SVR4.0.2 mips cc rejects this. */
11067 struct point {int x, y;};
11068 static struct point const zero = {0,0};
11069 /* AIX XL C 1.02.0.0 rejects this.
11070 It does not let you subtract one const X* pointer from another in
11071 an arm of an if-expression whose if-part is not a constant
11072 expression */
11073 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011074 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011075 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076 ++pcpcc;
11077 ppc = (char**) pcpcc;
11078 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011079 { /* SCO 3.2v4 cc rejects this. */
11080 char *t;
11081 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011082
Martin v. Löwis11437992002-04-12 09:54:03 +000011083 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011084 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 }
11086 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11087 int x[] = {25, 17};
11088 const int *foo = &x[0];
11089 ++foo;
11090 }
11091 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11092 typedef const int *iptr;
11093 iptr p = 0;
11094 ++p;
11095 }
11096 { /* AIX XL C 1.02.0.0 rejects this saying
11097 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11098 struct s { int j; const int *ap[3]; };
11099 struct s *b; b->j = 5;
11100 }
11101 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11102 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011106#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011107
Martin v. Löwis11437992002-04-12 09:54:03 +000011108 ;
11109 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011110}
Martin v. Löwis11437992002-04-12 09:54:03 +000011111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011113 ac_cv_c_const=yes
11114else
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11120$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011124
11125fi
11126
Michael W. Hudson54241132001-12-07 15:38:26 +000011127
Guido van Rossumda88dad1995-01-26 00:46:29 +000011128works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11130$as_echo_n "checking for working volatile... " >&6; }
11131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011132/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011133
Martin v. Löwis11437992002-04-12 09:54:03 +000011134int
11135main ()
11136{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011137volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 ;
11139 return 0;
11140}
11141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011142if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011143 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011144else
Skip Montanaro6dead952003-09-25 14:50:04 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011147
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011148
Guido van Rossum627b2d71993-12-24 10:39:16 +000011149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11152$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011153
Guido van Rossumda88dad1995-01-26 00:46:29 +000011154works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11156$as_echo_n "checking for working signed char... " >&6; }
11157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011158/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011159
Martin v. Löwis11437992002-04-12 09:54:03 +000011160int
11161main ()
11162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011163signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ;
11165 return 0;
11166}
11167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011169 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011170else
Skip Montanaro6dead952003-09-25 14:50:04 +000011171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011173
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011174
Guido van Rossum7f43da71994-08-01 12:15:30 +000011175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11178$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011179
Guido van Rossumda88dad1995-01-26 00:46:29 +000011180have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11182$as_echo_n "checking for prototypes... " >&6; }
11183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011185int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011186int
11187main ()
11188{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011189return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011197
Matthias Kloseb159a552010-04-25 21:00:44 +000011198 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11202$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011203
Guido van Rossumda88dad1995-01-26 00:46:29 +000011204works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11206$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011209
11210#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011211int foo(int x, ...) {
11212 va_list va;
11213 va_start(va, x);
11214 va_arg(va, int);
11215 va_arg(va, char *);
11216 va_arg(va, double);
11217 return 0;
11218}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011219
Martin v. Löwis11437992002-04-12 09:54:03 +000011220int
11221main ()
11222{
Guido van Rossum90eea071996-08-30 20:58:57 +000011223return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 ;
11225 return 0;
11226}
11227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
11230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011232
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011233 works=yes
11234
Guido van Rossum627b2d71993-12-24 10:39:16 +000011235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11238$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011239
Martin v. Löwisd6320502004-08-12 13:45:08 +000011240# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11242$as_echo_n "checking for socketpair... " >&6; }
11243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011244/* end confdefs.h. */
11245
11246#include <sys/types.h>
11247#include <sys/socket.h>
11248
11249int
11250main ()
11251{
11252void *x=socketpair
11253 ;
11254 return 0;
11255}
11256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011260
Matthias Kloseb159a552010-04-25 21:00:44 +000011261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011262$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011263else
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11265$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011266
11267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011269
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011270# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11272$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011274/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275#include <sys/types.h>
11276#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011277int
11278main ()
11279{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011280struct sockaddr x;
11281x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 ;
11283 return 0;
11284}
11285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011286if ac_fn_c_try_compile "$LINENO"; then :
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11288$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011291
11292else
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11294$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011295
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011298
Guido van Rossumda88dad1995-01-26 00:46:29 +000011299va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11301$as_echo_n "checking whether va_list is an array... " >&6; }
11302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304
11305#ifdef HAVE_STDARG_PROTOTYPES
11306#include <stdarg.h>
11307#else
11308#include <varargs.h>
11309#endif
11310
Martin v. Löwis11437992002-04-12 09:54:03 +000011311int
11312main ()
11313{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011314va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
11320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321else
Skip Montanaro6dead952003-09-25 14:50:04 +000011322
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011325
Guido van Rossumda88dad1995-01-26 00:46:29 +000011326 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011327
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11331$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011332
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011333# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011334
11335
Matthias Kloseb9621712010-04-24 17:59:49 +000011336ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011337if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11342$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011343 OLD_CFLAGS=$CFLAGS
11344 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011346/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011347
11348# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011349
Martin v. Löwis11437992002-04-12 09:54:03 +000011350int
11351main ()
11352{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011353
11354 char *name;
11355 struct hostent *he, *res;
11356 char buffer[2048];
11357 int buflen = 2048;
11358 int h_errnop;
11359
11360 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
11362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011369
Martin v. Löwis11437992002-04-12 09:54:03 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11374$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011376else
Skip Montanaro6dead952003-09-25 14:50:04 +000011377
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11381$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011384
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011385# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011386
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011390
11391 char *name;
11392 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011393 char buffer[2048];
11394 int buflen = 2048;
11395 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396
Matthias Kloseb159a552010-04-25 21:00:44 +000011397 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
11399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011406
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Matthias Kloseb159a552010-04-25 21:00:44 +000011408$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11411$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011413else
Skip Montanaro6dead952003-09-25 14:50:04 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11416$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11418$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11420/* end confdefs.h. */
11421
11422# include <netdb.h>
11423
11424int
11425main ()
11426{
11427
11428 char *name;
11429 struct hostent *he;
11430 struct hostent_data data;
11431
11432 (void) gethostbyname_r(name, he, &data);
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438if ac_fn_c_try_compile "$LINENO"; then :
11439
11440 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11441
11442
11443$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11444
11445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11446$as_echo "yes" >&6; }
11447
11448else
11449
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11451$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011456fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011458
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011461 CFLAGS=$OLD_CFLAGS
11462
11463else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 for ac_func in gethostbyname
11466do :
11467 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011468if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011470#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011471_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011473fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011474done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011475
Michael W. Hudson54241132001-12-07 15:38:26 +000011476
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011477fi
11478
Michael W. Hudson54241132001-12-07 15:38:26 +000011479
11480
11481
11482
11483
11484
Guido van Rossum627b2d71993-12-24 10:39:16 +000011485# checks for system services
11486# (none yet)
11487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011488# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011489ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011490if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011491
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11494$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011495if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011497else
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011499LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503/* Override any GCC internal prototype to avoid an error.
11504 Use char because int might match the return type of a GCC
11505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011506#ifdef __cplusplus
11507extern "C"
11508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011509char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011510int
11511main ()
11512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011523rm -f core conftest.err conftest.$ac_objext \
11524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11528$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011529if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 cat >>confdefs.h <<_ACEOF
11531#define HAVE_LIBIEEE 1
11532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011534 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011535
Guido van Rossum627b2d71993-12-24 10:39:16 +000011536fi
11537
Michael W. Hudson54241132001-12-07 15:38:26 +000011538
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011539fi
11540
Michael W. Hudson54241132001-12-07 15:38:26 +000011541
Guido van Rossum7f253911997-05-09 02:42:48 +000011542# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11544$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011546# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011548 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011549if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011550then
11551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11555$as_echo "yes" >&6; }
11556else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11557$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011558fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011559else
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11561$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562fi
11563
Guido van Rossum7f253911997-05-09 02:42:48 +000011564
Guido van Rossum7f43da71994-08-01 12:15:30 +000011565# check for --with-libm=...
11566
Guido van Rossum563e7081996-09-10 18:20:48 +000011567case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011568Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011569*) LIBM=-lm
11570esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11572$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011575if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011577if test "$withval" = no
11578then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11580$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011581elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011582then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11584$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011585else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011586fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011587else
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11589$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011590fi
11591
Guido van Rossum7f43da71994-08-01 12:15:30 +000011592
11593# check for --with-libc=...
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11596$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011598# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011599if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011601if test "$withval" = no
11602then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11604$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011605elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011606then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11608$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011609else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011610fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11613$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614fi
11615
Guido van Rossum7f43da71994-08-01 12:15:30 +000011616
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011617# **************************************************
11618# * Check for various properties of floating point *
11619# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011620
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11622$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011623if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011625else
11626
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011628 ac_cv_little_endian_double=no
11629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011631/* end confdefs.h. */
11632
11633#include <string.h>
11634int main() {
11635 double x = 9006104071832581.0;
11636 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11637 return 0;
11638 else
11639 return 1;
11640}
11641
11642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011644 ac_cv_little_endian_double=yes
11645else
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011650fi
11651
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011652fi
11653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11655$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656if test "$ac_cv_little_endian_double" = yes
11657then
11658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011660
11661fi
11662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11664$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011665if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011667else
11668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011670 ac_cv_big_endian_double=no
11671else
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011673/* end confdefs.h. */
11674
11675#include <string.h>
11676int main() {
11677 double x = 9006104071832581.0;
11678 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11679 return 0;
11680 else
11681 return 1;
11682}
11683
11684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011686 ac_cv_big_endian_double=yes
11687else
Matthias Kloseb9621712010-04-24 17:59:49 +000011688 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011692fi
11693
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011694fi
11695
Matthias Kloseb9621712010-04-24 17:59:49 +000011696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11697$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011698if test "$ac_cv_big_endian_double" = yes
11699then
11700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011702
11703fi
11704
11705# Some ARM platforms use a mixed-endian representation for doubles.
11706# While Python doesn't currently have full support for these platforms
11707# (see e.g., issue 1762561), we can at least make sure that float <-> string
11708# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11710$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011711if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713else
11714
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011716 ac_cv_mixed_endian_double=no
11717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719/* end confdefs.h. */
11720
11721#include <string.h>
11722int main() {
11723 double x = 9006104071832581.0;
11724 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11725 return 0;
11726 else
11727 return 1;
11728}
11729
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011732 ac_cv_mixed_endian_double=yes
11733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011738fi
11739
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740fi
11741
Matthias Kloseb9621712010-04-24 17:59:49 +000011742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11743$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011744if test "$ac_cv_mixed_endian_double" = yes
11745then
11746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011748
11749fi
11750
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011751# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011752# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011753# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011754# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011755# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011756# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011757
11758# This inline assembler syntax may also work for suncc and icc,
11759# so we try it on all platforms.
11760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11762$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011764/* end confdefs.h. */
11765
11766int
11767main ()
11768{
11769
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011770 unsigned short cw;
11771 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11772 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011773
11774 ;
11775 return 0;
11776}
11777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011779 have_gcc_asm_for_x87=yes
11780else
Matthias Kloseb9621712010-04-24 17:59:49 +000011781 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011782fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11785$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011786if test "$have_gcc_asm_for_x87" = yes
11787then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011790
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011792
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011793# Detect whether system arithmetic is subject to x87-style double
11794# rounding issues. The result of this test has little meaning on non
11795# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11796# mode is round-to-nearest and double rounding issues are present, and
11797# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11799$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011800# $BASECFLAGS may affect the result
11801ac_save_cc="$CC"
11802CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011803if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011804 ac_cv_x87_double_rounding=no
11805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011807/* end confdefs.h. */
11808
11809#include <stdlib.h>
11810#include <math.h>
11811int main() {
11812 volatile double x, y, z;
11813 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11814 x = 0.99999999999999989; /* 1-2**-53 */
11815 y = 1./x;
11816 if (y != 1.)
11817 exit(0);
11818 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11819 x = 1e16;
11820 y = 2.99999;
11821 z = x + y;
11822 if (z != 1e16+4.)
11823 exit(0);
11824 /* both tests show evidence of double rounding */
11825 exit(1);
11826}
11827
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011830 ac_cv_x87_double_rounding=no
11831else
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011836fi
11837
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011838CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11840$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011841if test "$ac_cv_x87_double_rounding" = yes
11842then
11843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011845
11846fi
11847
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011848# ************************************
11849# * Check for mathematical functions *
11850# ************************************
11851
11852LIBS_SAVE=$LIBS
11853LIBS="$LIBS $LIBM"
11854
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011855for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11856do :
11857 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11858ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011859if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011860 cat >>confdefs.h <<_ACEOF
11861#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11862_ACEOF
11863
11864fi
11865done
11866
Victor Stinner8f9f8d62011-05-09 12:45:41 +020011867for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011868do :
11869 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11870ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011871if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011872 cat >>confdefs.h <<_ACEOF
11873#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11874_ACEOF
11875
11876fi
11877done
11878
11879ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11880"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011881if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011882 ac_have_decl=1
11883else
11884 ac_have_decl=0
11885fi
11886
11887cat >>confdefs.h <<_ACEOF
11888#define HAVE_DECL_ISINF $ac_have_decl
11889_ACEOF
11890ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11891"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011892if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011893 ac_have_decl=1
11894else
11895 ac_have_decl=0
11896fi
11897
11898cat >>confdefs.h <<_ACEOF
11899#define HAVE_DECL_ISNAN $ac_have_decl
11900_ACEOF
11901ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11902"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011903if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011904 ac_have_decl=1
11905else
11906 ac_have_decl=0
11907fi
11908
11909cat >>confdefs.h <<_ACEOF
11910#define HAVE_DECL_ISFINITE $ac_have_decl
11911_ACEOF
11912
11913
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011914# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11915# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11917$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011918if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011920else
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011923 ac_cv_tanh_preserves_zero_sign=no
11924else
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011926/* end confdefs.h. */
11927
11928#include <math.h>
11929#include <stdlib.h>
11930int main() {
11931 /* return 0 if either negative zeros don't exist
11932 on this platform or if negative zeros exist
11933 and tanh(-0.) == -0. */
11934 if (atan2(0., -1.) == atan2(-0., -1.) ||
11935 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11936 else exit(1);
11937}
11938
11939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011941 ac_cv_tanh_preserves_zero_sign=yes
11942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11946 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011947fi
11948
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011949fi
11950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11952$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011953if test "$ac_cv_tanh_preserves_zero_sign" = yes
11954then
11955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011957
11958fi
11959
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011960if test "$ac_cv_func_log1p" = yes
11961then
11962 # On some versions of AIX, log1p(-0.) returns 0. instead of
11963 # -0. See issue #9920.
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11965$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011966 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011967 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011968else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011969
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011970 if test "$cross_compiling" = yes; then :
11971 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011972else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11974/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011975
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011976 #include <math.h>
11977 #include <stdlib.h>
11978 int main() {
11979 /* Fail if the signs of log1p(-0.) and -0. can be
11980 distinguished. */
11981 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11982 return 0;
11983 else
11984 return 1;
11985 }
11986
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011987_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011988if ac_fn_c_try_run "$LINENO"; then :
11989 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011990else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011991 ac_cv_log1p_drops_zero_sign=yes
11992fi
11993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011995fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011996
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011997fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011998
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12000$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12001fi
12002if test "$ac_cv_log1p_drops_zero_sign" = yes
12003then
12004
12005$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12006
12007fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012008
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012009LIBS=$LIBS_SAVE
12010
Mark Dickinsona614f042009-11-28 12:48:43 +000012011# For multiprocessing module, check that sem_open
12012# actually works. For FreeBSD versions <= 7.2,
12013# the kernel module that provides POSIX semaphores
12014# isn't loaded by default, so an attempt to call
12015# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12017$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012018if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012020else
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012022 ac_cv_posix_semaphores_enabled=yes
12023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012025/* end confdefs.h. */
12026
12027#include <unistd.h>
12028#include <fcntl.h>
12029#include <stdio.h>
12030#include <semaphore.h>
12031#include <sys/stat.h>
12032
12033int main(void) {
12034 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12035 if (a == SEM_FAILED) {
12036 perror("sem_open");
12037 return 1;
12038 }
12039 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012040 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012041 return 0;
12042}
12043
12044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012046 ac_cv_posix_semaphores_enabled=yes
12047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12051 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012052fi
12053
12054
Mark Dickinsona614f042009-11-28 12:48:43 +000012055fi
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12058$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012059if test $ac_cv_posix_semaphores_enabled = no
12060then
12061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012063
12064fi
12065
Mark Dickinson10683072009-04-18 21:18:19 +000012066# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12068$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012069if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012073 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012076/* end confdefs.h. */
12077
12078#include <unistd.h>
12079#include <fcntl.h>
12080#include <stdio.h>
12081#include <semaphore.h>
12082#include <sys/stat.h>
12083
12084int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012085 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012086 int count;
12087 int res;
12088 if(a==SEM_FAILED){
12089 perror("sem_open");
12090 return 1;
12091
12092 }
12093 res = sem_getvalue(a, &count);
12094 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012095 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012096 return res==-1 ? 1 : 0;
12097}
12098
Mark Dickinson10683072009-04-18 21:18:19 +000012099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012101 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12106 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012107fi
12108
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012110fi
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12113$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012114if test $ac_cv_broken_sem_getvalue = yes
12115then
12116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012118
12119fi
12120
Mark Dickinsonbd792642009-03-18 20:06:12 +000012121# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12123$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012124# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012125if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012126 enableval=$enable_big_digits; case $enable_big_digits in
12127yes)
12128 enable_big_digits=30 ;;
12129no)
12130 enable_big_digits=15 ;;
1213115|30)
12132 ;;
12133*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012134 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 +000012135esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12137$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012138
12139cat >>confdefs.h <<_ACEOF
12140#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12141_ACEOF
12142
12143
12144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12146$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012147fi
12148
12149
Guido van Rossumef2255b2000-03-10 22:30:29 +000012150# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012151ac_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 +000012152if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012153
12154
Matthias Kloseb9621712010-04-24 17:59:49 +000012155$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012156
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012157 wchar_h="yes"
12158
Guido van Rossumef2255b2000-03-10 22:30:29 +000012159else
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012161
12162fi
12163
Michael W. Hudson54241132001-12-07 15:38:26 +000012164
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012166# determine wchar_t size
12167if test "$wchar_h" = yes
12168then
Matthias Kloseb9621712010-04-24 17:59:49 +000012169 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12171# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12172# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12174$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012175if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12179"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 if test "$ac_cv_type_wchar_t" = yes; then
12183 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012185as_fn_error 77 "cannot compute sizeof (wchar_t)
12186See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187 else
12188 ac_cv_sizeof_wchar_t=0
12189 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012191
Martin v. Löwis11437992002-04-12 09:54:03 +000012192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12194$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195
12196
12197
Martin v. Löwis11437992002-04-12 09:54:03 +000012198cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012199#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012200_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012201
Michael W. Hudson54241132001-12-07 15:38:26 +000012202
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012203fi
12204
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12206$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012207have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012210
12211#include <tcl.h>
12212#if TCL_UTF_MAX != 6
12213# error "NOT UCS4_TCL"
12214#endif
12215int
12216main ()
12217{
12218
12219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012224
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012227
12228 have_ucs4_tcl=yes
12229
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12233$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012234
Skip Montanaro6dead952003-09-25 14:50:04 +000012235# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012236if test "$wchar_h" = yes
12237then
12238 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12240$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012241 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012243else
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012246 ac_cv_wchar_t_signed=yes
12247else
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012250
12251 #include <wchar.h>
12252 int main()
12253 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012254 /* Success: exit code 0 */
12255 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012256 }
12257
12258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012260 ac_cv_wchar_t_signed=yes
12261else
Matthias Kloseb9621712010-04-24 17:59:49 +000012262 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012266fi
12267
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012268fi
12269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12271$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272fi
12273
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12275$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012276
12277# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012279 withval=$with_wide_unicode;
12280if test "$withval" != no
12281then unicode_size="4"
12282else unicode_size="2"
12283fi
12284
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012285else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286
Georg Brandl52d168a2008-01-07 18:10:24 +000012287case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012288 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012289 *) unicode_size="2" ;;
12290esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012291
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012292fi
12293
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012294
12295
Georg Brandl52d168a2008-01-07 18:10:24 +000012296case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012297 4)
12298 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12299
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012300 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012301 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012303 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012304esac
12305
Michael W. Hudson54241132001-12-07 15:38:26 +000012306
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Georg Brandl52d168a2008-01-07 18:10:24 +000012308# wchar_t is only usable if it maps to an unsigned type
12309if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012310 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012311then
12312 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012313
Matthias Kloseb9621712010-04-24 17:59:49 +000012314$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012315
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012317
Georg Brandl52d168a2008-01-07 18:10:24 +000012318elif test "$ac_cv_sizeof_short" = "$unicode_size"
12319then
12320 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012322
Georg Brandl52d168a2008-01-07 18:10:24 +000012323elif test "$ac_cv_sizeof_long" = "$unicode_size"
12324then
12325 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012327
Georg Brandl52d168a2008-01-07 18:10:24 +000012328else
12329 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12332$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012333
12334# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12336$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012337if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012339else
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 ac_cv_c_bigendian=unknown
12341 # See if we're dealing with a universal compiler.
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343/* end confdefs.h. */
12344#ifndef __APPLE_CC__
12345 not a universal capable compiler
12346 #endif
12347 typedef int dummy;
12348
Skip Montanaro6dead952003-09-25 14:50:04 +000012349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_compile "$LINENO"; then :
12351
12352 # Check for potential -arch flags. It is not universal unless
12353 # there are at least two -arch flags with different values.
12354 ac_arch=
12355 ac_prev=
12356 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12357 if test -n "$ac_prev"; then
12358 case $ac_word in
12359 i?86 | x86_64 | ppc | ppc64)
12360 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12361 ac_arch=$ac_word
12362 else
12363 ac_cv_c_bigendian=universal
12364 break
12365 fi
12366 ;;
12367 esac
12368 ac_prev=
12369 elif test "x$ac_word" = "x-arch"; then
12370 ac_prev=arch
12371 fi
12372 done
12373fi
12374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12375 if test $ac_cv_c_bigendian = unknown; then
12376 # See if sys/param.h defines the BYTE_ORDER macro.
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012379#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012380 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012381
Martin v. Löwis11437992002-04-12 09:54:03 +000012382int
12383main ()
12384{
Matthias Kloseb9621712010-04-24 17:59:49 +000012385#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12386 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12387 && LITTLE_ENDIAN)
12388 bogus endian macros
12389 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
12391 ;
12392 return 0;
12393}
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012396 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012398/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012399#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012401
Martin v. Löwis11437992002-04-12 09:54:03 +000012402int
12403main ()
12404{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012405#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 not big endian
12407 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
12409 ;
12410 return 0;
12411}
12412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012414 ac_cv_c_bigendian=yes
12415else
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012419fi
12420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12421 fi
12422 if test $ac_cv_c_bigendian = unknown; then
12423 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012426#include <limits.h>
12427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428int
12429main ()
12430{
Matthias Kloseb9621712010-04-24 17:59:49 +000012431#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12432 bogus endian macros
12433 #endif
12434
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 ;
12436 return 0;
12437}
12438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439if ac_fn_c_try_compile "$LINENO"; then :
12440 # It does; now see whether it defined to _BIG_ENDIAN or not.
12441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12442/* end confdefs.h. */
12443#include <limits.h>
12444
12445int
12446main ()
12447{
12448#ifndef _BIG_ENDIAN
12449 not big endian
12450 #endif
12451
12452 ;
12453 return 0;
12454}
12455_ACEOF
12456if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12462fi
12463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12464 fi
12465 if test $ac_cv_c_bigendian = unknown; then
12466 # Compile a test program.
12467 if test "$cross_compiling" = yes; then :
12468 # Try to guess by grepping values from an object file.
12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470/* end confdefs.h. */
12471short int ascii_mm[] =
12472 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12473 short int ascii_ii[] =
12474 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12475 int use_ascii (int i) {
12476 return ascii_mm[i] + ascii_ii[i];
12477 }
12478 short int ebcdic_ii[] =
12479 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12480 short int ebcdic_mm[] =
12481 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12482 int use_ebcdic (int i) {
12483 return ebcdic_mm[i] + ebcdic_ii[i];
12484 }
12485 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487int
12488main ()
12489{
12490return use_ascii (foo) == use_ebcdic (foo);
12491 ;
12492 return 0;
12493}
12494_ACEOF
12495if ac_fn_c_try_compile "$LINENO"; then :
12496 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12497 ac_cv_c_bigendian=yes
12498 fi
12499 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12500 if test "$ac_cv_c_bigendian" = unknown; then
12501 ac_cv_c_bigendian=no
12502 else
12503 # finding both strings is unlikely to happen, but who knows?
12504 ac_cv_c_bigendian=unknown
12505 fi
12506 fi
12507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012509else
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012511/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012513int
12514main ()
12515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 /* Are we little or big endian? From Harbison&Steele. */
12518 union
12519 {
12520 long int l;
12521 char c[sizeof (long int)];
12522 } u;
12523 u.l = 1;
12524 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525
12526 ;
12527 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012528}
Martin v. Löwis11437992002-04-12 09:54:03 +000012529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012530if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012531 ac_cv_c_bigendian=no
12532else
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012540fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12542$as_echo "$ac_cv_c_bigendian" >&6; }
12543 case $ac_cv_c_bigendian in #(
12544 yes)
12545 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12546;; #(
12547 no)
12548 ;; #(
12549 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012550
Matthias Kloseb9621712010-04-24 17:59:49 +000012551$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012552
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 ;; #(
12554 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012555 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012556 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012558
Michael W. Hudson54241132001-12-07 15:38:26 +000012559
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012560# ABI version string for Python extension modules. This appears between the
12561# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12562# from the following attributes which affect the ABI of this Python build (in
12563# this order):
12564#
12565# * The Python implementation (always 'cpython-' for us)
12566# * The major and minor version numbers
12567# * --with-pydebug (adds a 'd')
12568# * --with-pymalloc (adds a 'm')
12569# * --with-wide-unicode (adds a 'u')
12570#
12571# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012572# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12573# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012574
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12576$as_echo_n "checking ABIFLAGS... " >&6; }
12577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12578$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12580$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012581SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12583$as_echo "$SOABI" >&6; }
12584
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12586$as_echo_n "checking LDVERSION... " >&6; }
12587LDVERSION='$(VERSION)$(ABIFLAGS)'
12588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12589$as_echo "$LDVERSION" >&6; }
12590
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012591# SO is the extension of shared libraries `(including the dot!)
12592# -- usually .so, .sl on HP-UX, .dll on Cygwin
12593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12594$as_echo_n "checking SO... " >&6; }
12595if test -z "$SO"
12596then
12597 case $ac_sys_system in
12598 hp*|HP*)
12599 case `uname -m` in
12600 ia64) SO=.so;;
12601 *) SO=.sl;;
12602 esac
12603 ;;
12604 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012605 Linux*|GNU*)
12606 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012607 *) SO=.so;;
12608 esac
12609else
12610 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012611 echo
12612 echo '====================================================================='
12613 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012614 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012615 echo '+ Do you really mean to change the extension for shared libraries? +'
12616 echo '+ Continuing in 10 seconds to let you to ponder. +'
12617 echo '+ +'
12618 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012619 sleep 10
12620fi
12621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12622$as_echo "$SO" >&6; }
12623
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012624# Check whether right shifting a negative integer extends the sign bit
12625# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12627$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012628if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012629 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012630else
Martin v. Löwis11437992002-04-12 09:54:03 +000012631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012633 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012634else
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012637
12638int main()
12639{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012640 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012641}
12642
Martin v. Löwis11437992002-04-12 09:54:03 +000012643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012644if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012645 ac_cv_rshift_extends_sign=yes
12646else
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012651fi
12652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653fi
12654
Matthias Kloseb9621712010-04-24 17:59:49 +000012655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12656$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012657if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012658then
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Matthias Kloseb9621712010-04-24 17:59:49 +000012660$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012661
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012662fi
12663
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012664# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12666$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012667if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012669else
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012672/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012673#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012674int
12675main ()
12676{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012677
12678 FILE *f = fopen("/dev/null", "r");
12679 flockfile(f);
12680 getc_unlocked(f);
12681 funlockfile(f);
12682
Martin v. Löwis11437992002-04-12 09:54:03 +000012683 ;
12684 return 0;
12685}
12686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012688 ac_cv_have_getc_unlocked=yes
12689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 ac_cv_have_getc_unlocked=no
12691fi
12692rm -f core conftest.err conftest.$ac_objext \
12693 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12697$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012698if test "$ac_cv_have_getc_unlocked" = yes
12699then
Martin v. Löwis11437992002-04-12 09:54:03 +000012700
Matthias Kloseb9621712010-04-24 17:59:49 +000012701$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012702
12703fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012704
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012705# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012706# save the value of LIBS so we don't actually link Python with readline
12707LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012708
Gregory P. Smith18820942008-09-07 06:24:49 +000012709# On some systems we need to link readline to a termcap compatible
12710# library. NOTE: Keep the precedence of listed libraries synchronised
12711# with setup.py.
12712py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12714$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012715for py_libtermcap in "" ncursesw ncurses curses termcap; do
12716 if test -z "$py_libtermcap"; then
12717 READLINE_LIBS="-lreadline"
12718 else
12719 READLINE_LIBS="-lreadline -l$py_libtermcap"
12720 fi
12721 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012723/* end confdefs.h. */
12724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725/* Override any GCC internal prototype to avoid an error.
12726 Use char because int might match the return type of a GCC
12727 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012728#ifdef __cplusplus
12729extern "C"
12730#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012731char readline ();
12732int
12733main ()
12734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012736 ;
12737 return 0;
12738}
12739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012740if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012741 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012743rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012745 if test $py_cv_lib_readline = yes; then
12746 break
12747 fi
12748done
12749# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12750#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012751if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12753$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012754else
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12756$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012759
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012760fi
12761
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012762# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12764$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012765if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012767else
12768 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012769LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012771/* end confdefs.h. */
12772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012773/* Override any GCC internal prototype to avoid an error.
12774 Use char because int might match the return type of a GCC
12775 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012776#ifdef __cplusplus
12777extern "C"
12778#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012779char rl_callback_handler_install ();
12780int
12781main ()
12782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012784 ;
12785 return 0;
12786}
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012789 ac_cv_lib_readline_rl_callback_handler_install=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core conftest.err conftest.$ac_objext \
12794 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012795LIBS=$ac_check_lib_save_LIBS
12796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12798$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012799if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012802
12803fi
12804
12805
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012806# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012809#include <readline/readline.h>
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012812 have_readline=yes
12813else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012814 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012815
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012816fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012817rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012818if test $have_readline = yes
12819then
Matthias Kloseb9621712010-04-24 17:59:49 +000012820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012821/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012822#include <readline/readline.h>
12823
12824_ACEOF
12825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012829
12830fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012831rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012832
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012834/* end confdefs.h. */
12835#include <readline/readline.h>
12836
12837_ACEOF
12838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012842
12843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012844rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012845
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012846fi
12847
Martin v. Löwis0daad592001-09-30 21:09:59 +000012848# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12850$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012851if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012853else
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012855LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012859/* Override any GCC internal prototype to avoid an error.
12860 Use char because int might match the return type of a GCC
12861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012862#ifdef __cplusplus
12863extern "C"
12864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012865char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012866int
12867main ()
12868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012870 ;
12871 return 0;
12872}
12873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012874if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012876else
Matthias Kloseb9621712010-04-24 17:59:49 +000012877 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012879rm -f core conftest.err conftest.$ac_objext \
12880 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012881LIBS=$ac_check_lib_save_LIBS
12882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12884$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012885if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012888
Martin v. Löwis0daad592001-09-30 21:09:59 +000012889fi
12890
Michael W. Hudson54241132001-12-07 15:38:26 +000012891
Thomas Wouters89d996e2007-09-08 17:39:28 +000012892# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12894$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012895if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012897else
12898 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012899LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012901/* end confdefs.h. */
12902
12903/* Override any GCC internal prototype to avoid an error.
12904 Use char because int might match the return type of a GCC
12905 builtin and then its argument prototype would still apply. */
12906#ifdef __cplusplus
12907extern "C"
12908#endif
12909char rl_completion_display_matches_hook ();
12910int
12911main ()
12912{
12913return rl_completion_display_matches_hook ();
12914 ;
12915 return 0;
12916}
12917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012918if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012919 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12920else
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012923rm -f core conftest.err conftest.$ac_objext \
12924 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012925LIBS=$ac_check_lib_save_LIBS
12926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12928$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012929if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012932
12933fi
12934
12935
Martin v. Löwis0daad592001-09-30 21:09:59 +000012936# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12938$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012939if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012941else
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012943LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947/* Override any GCC internal prototype to avoid an error.
12948 Use char because int might match the return type of a GCC
12949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012950#ifdef __cplusplus
12951extern "C"
12952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012953char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012954int
12955main ()
12956{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 ;
12959 return 0;
12960}
12961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012962if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012964else
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012967rm -f core conftest.err conftest.$ac_objext \
12968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012969LIBS=$ac_check_lib_save_LIBS
12970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12972$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012973if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012976
Guido van Rossum353ae582001-07-10 16:45:32 +000012977fi
12978
Jack Jansendd19cf82001-12-06 22:36:17 +000012979
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012980# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012982/* end confdefs.h. */
12983#include <readline/readline.h>
12984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012985if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012986 have_readline=yes
12987else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012988 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012989
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012990fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012991rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012992if test $have_readline = yes
12993then
Matthias Kloseb9621712010-04-24 17:59:49 +000012994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012995/* end confdefs.h. */
12996#include <readline/readline.h>
12997
12998_ACEOF
12999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013003
13004fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013005rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013006
13007fi
13008
Martin v. Löwis82bca632006-02-10 20:49:30 +000013009# End of readline checks: restore LIBS
13010LIBS=$LIBS_no_readline
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13013$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013014if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013016else
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013019 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013020else
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013022/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013023
13024int main()
13025{
13026 int val1 = nice(1);
13027 if (val1 != -1 && val1 == nice(2))
13028 exit(0);
13029 exit(1);
13030}
13031
Martin v. Löwis11437992002-04-12 09:54:03 +000013032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013033if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013034 ac_cv_broken_nice=yes
13035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013040fi
13041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013042fi
13043
Matthias Kloseb9621712010-04-24 17:59:49 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13045$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013046if test "$ac_cv_broken_nice" = yes
13047then
Martin v. Löwis11437992002-04-12 09:54:03 +000013048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013050
13051fi
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13054$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013055if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013059 ac_cv_broken_poll=no
13060else
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013062/* end confdefs.h. */
13063
13064#include <poll.h>
13065
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013066int main()
13067{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013068 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013069 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013070
13071 close (42);
13072
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013073 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013074 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013075 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013076 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013078 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013079 return 1;
13080}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013081
13082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013083if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013084 ac_cv_broken_poll=yes
13085else
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013092fi
13093
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13095$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013096if test "$ac_cv_broken_poll" = yes
13097then
13098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013100
13101fi
13102
Brett Cannon43802422005-02-10 20:48:03 +000013103# 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 +000013104# (which is not required by ISO C or UNIX spec) and/or if we support
13105# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013106ac_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 +000013107#include <$ac_cv_struct_tm>
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013110if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013111
13112cat >>confdefs.h <<_ACEOF
13113#define HAVE_STRUCT_TM_TM_ZONE 1
13114_ACEOF
13115
13116
13117fi
13118
13119if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013122
13123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13125"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013126if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130fi
13131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013132cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013133#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134_ACEOF
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13137$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013138if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140else
Matthias Kloseb9621712010-04-24 17:59:49 +000013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013142/* end confdefs.h. */
13143#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013144#if !HAVE_DECL_TZNAME
13145extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013146#endif
13147
13148int
13149main ()
13150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013152 ;
13153 return 0;
13154}
13155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013156if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013157 ac_cv_var_tzname=yes
13158else
Matthias Kloseb9621712010-04-24 17:59:49 +000013159 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013161rm -f core conftest.err conftest.$ac_objext \
13162 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13165$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013166 if test $ac_cv_var_tzname = yes; then
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013169
13170 fi
13171fi
13172
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013173
Martin v. Löwis1d459062005-03-14 21:23:33 +000013174# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13176$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013177if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013179else
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013182 ac_cv_working_tzset=no
13183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013185/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013186
13187#include <stdlib.h>
13188#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013189#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013190
13191#if HAVE_TZNAME
13192extern char *tzname[];
13193#endif
13194
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195int main()
13196{
Brett Cannon18367812003-09-19 00:59:16 +000013197 /* Note that we need to ensure that not only does tzset(3)
13198 do 'something' with localtime, but it works as documented
13199 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013200 This includes making sure that tzname is set properly if
13201 tm->tm_zone does not exist since it is the alternative way
13202 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013203
13204 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013205 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013206 */
13207
Martin v. Löwis1d459062005-03-14 21:23:33 +000013208 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013209 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13210
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013211 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013212 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013213 if (localtime(&groundhogday)->tm_hour != 0)
13214 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013215#if HAVE_TZNAME
13216 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13217 if (strcmp(tzname[0], "UTC") ||
13218 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13219 exit(1);
13220#endif
Brett Cannon18367812003-09-19 00:59:16 +000013221
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013222 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013223 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013224 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013225 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013226#if HAVE_TZNAME
13227 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13228 exit(1);
13229#endif
Brett Cannon18367812003-09-19 00:59:16 +000013230
13231 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13232 tzset();
13233 if (localtime(&groundhogday)->tm_hour != 11)
13234 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013235#if HAVE_TZNAME
13236 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13237 exit(1);
13238#endif
13239
13240#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013241 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13242 exit(1);
13243 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13244 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013245#endif
Brett Cannon18367812003-09-19 00:59:16 +000013246
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013247 exit(0);
13248}
13249
13250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013251if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013252 ac_cv_working_tzset=yes
13253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13257 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013258fi
13259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013260fi
13261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13263$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013264if test "$ac_cv_working_tzset" = yes
13265then
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013268
13269fi
13270
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013271# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13273$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013274if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013279#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013280int
13281main ()
13282{
13283
13284struct stat st;
13285st.st_mtim.tv_nsec = 1;
13286
13287 ;
13288 return 0;
13289}
13290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013292 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13297fi
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13300$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013301if test "$ac_cv_stat_tv_nsec" = yes
13302then
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013305
13306fi
13307
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013308# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13310$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013311if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013315/* end confdefs.h. */
13316#include <sys/stat.h>
13317int
13318main ()
13319{
13320
13321struct stat st;
13322st.st_mtimespec.tv_nsec = 1;
13323
13324 ;
13325 return 0;
13326}
13327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013329 ac_cv_stat_tv_nsec2=yes
13330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13334fi
13335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13337$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013338if test "$ac_cv_stat_tv_nsec2" = yes
13339then
13340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013342
13343fi
13344
Jack Jansen666b1e72001-10-31 12:11:48 +000013345# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13347$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013348if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013352/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013353#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013354int
13355main ()
13356{
Jack Jansen666b1e72001-10-31 12:11:48 +000013357
13358 int rtn;
13359 rtn = mvwdelch(0,0,0);
13360
Martin v. Löwis11437992002-04-12 09:54:03 +000013361 ;
13362 return 0;
13363}
13364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013366 ac_cv_mvwdelch_is_expression=yes
13367else
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13371fi
13372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13374$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013375
13376if test "$ac_cv_mvwdelch_is_expression" = yes
13377then
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013380
13381fi
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13384$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013385if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013387else
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013390#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013391int
13392main ()
13393{
Jack Jansen666b1e72001-10-31 12:11:48 +000013394
13395 WINDOW *w;
13396 w->_flags = 0;
13397
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 ;
13399 return 0;
13400}
13401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013402if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013403 ac_cv_window_has_flags=yes
13404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13408fi
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13411$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013412
Jack Jansen666b1e72001-10-31 12:11:48 +000013413
13414if test "$ac_cv_window_has_flags" = yes
13415then
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013418
13419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13422$as_echo_n "checking for is_term_resized... " >&6; }
13423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013424/* end confdefs.h. */
13425#include <curses.h>
13426int
13427main ()
13428{
13429void *x=is_term_resized
13430 ;
13431 return 0;
13432}
13433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013435
Matthias Kloseb9621712010-04-24 17:59:49 +000013436$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013437
Matthias Kloseb159a552010-04-25 21:00:44 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013439$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13442$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013443
13444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13448$as_echo_n "checking for resize_term... " >&6; }
13449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013450/* end confdefs.h. */
13451#include <curses.h>
13452int
13453main ()
13454{
13455void *x=resize_term
13456 ;
13457 return 0;
13458}
13459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013460if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013463
Matthias Kloseb159a552010-04-25 21:00:44 +000013464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013465$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13468$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013469
13470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13474$as_echo_n "checking for resizeterm... " >&6; }
13475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013476/* end confdefs.h. */
13477#include <curses.h>
13478int
13479main ()
13480{
13481void *x=resizeterm
13482 ;
13483 return 0;
13484}
13485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013487
Matthias Kloseb9621712010-04-24 17:59:49 +000013488$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013489
Matthias Kloseb159a552010-04-25 21:00:44 +000013490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013491$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013492else
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13494$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013495
13496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13500$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013501
13502if test -r /dev/ptmx
13503then
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13505$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013508
Thomas Wouters89f507f2006-12-13 04:49:30 +000013509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13511$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013512fi
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13515$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013516
13517if test -r /dev/ptc
13518then
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13520$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013521
Matthias Kloseb9621712010-04-24 17:59:49 +000013522$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013523
Thomas Wouters89f507f2006-12-13 04:49:30 +000013524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13526$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013527fi
13528
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013529if test "$have_long_long" = yes
13530then
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13532$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013533 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013535else
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013537 ac_cv_have_long_long_format=no
13538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013540/* end confdefs.h. */
13541
13542 #include <stdio.h>
13543 #include <stddef.h>
13544 #include <string.h>
13545
13546 #ifdef HAVE_SYS_TYPES_H
13547 #include <sys/types.h>
13548 #endif
13549
13550 int main()
13551 {
13552 char buffer[256];
13553
13554 if (sprintf(buffer, "%lld", (long long)123) < 0)
13555 return 1;
13556 if (strcmp(buffer, "123"))
13557 return 1;
13558
13559 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13560 return 1;
13561 if (strcmp(buffer, "-123"))
13562 return 1;
13563
13564 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13565 return 1;
13566 if (strcmp(buffer, "123"))
13567 return 1;
13568
13569 return 0;
13570 }
13571
13572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013573if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013574 ac_cv_have_long_long_format=yes
13575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013580fi
13581
13582
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013583fi
13584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13586$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013587fi
13588
Mark Dickinson89d7d412009-12-31 20:50:59 +000013589if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013590then
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013593
13594fi
13595
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013596if test $ac_sys_system = Darwin
13597then
13598 LIBS="$LIBS -framework CoreFoundation"
13599fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13602$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013603if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013604 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013605else
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013607 ac_cv_have_size_t_format="cross -- assuming yes"
13608
Thomas Wouters477c8d52006-05-27 19:21:47 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013611/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013612
Thomas Wouters477c8d52006-05-27 19:21:47 +000013613#include <stdio.h>
13614#include <stddef.h>
13615#include <string.h>
13616
Christian Heimes2c181612007-12-17 20:04:13 +000013617#ifdef HAVE_SYS_TYPES_H
13618#include <sys/types.h>
13619#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013620
13621#ifdef HAVE_SSIZE_T
13622typedef ssize_t Py_ssize_t;
13623#elif SIZEOF_VOID_P == SIZEOF_LONG
13624typedef long Py_ssize_t;
13625#else
13626typedef int Py_ssize_t;
13627#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013628
Christian Heimes2c181612007-12-17 20:04:13 +000013629int main()
13630{
13631 char buffer[256];
13632
Thomas Wouters477c8d52006-05-27 19:21:47 +000013633 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13634 return 1;
13635
Thomas Wouters89f507f2006-12-13 04:49:30 +000013636 if (strcmp(buffer, "123"))
13637 return 1;
13638
13639 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13640 return 1;
13641
13642 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013643 return 1;
13644
13645 return 0;
13646}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013647
Thomas Wouters477c8d52006-05-27 19:21:47 +000013648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013649if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013650 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013651else
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013656fi
13657
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13660$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013661if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013664
13665fi
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013668#ifdef HAVE_SYS_TYPES_H
13669#include <sys/types.h>
13670#endif
13671#ifdef HAVE_SYS_SOCKET_H
13672#include <sys/socket.h>
13673#endif
13674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013676if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013677
Martin v. Löwis11437992002-04-12 09:54:03 +000013678else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013681
13682fi
13683
Michael W. Hudson54241132001-12-07 15:38:26 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13686$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013687if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013691 ac_cv_broken_mbstowcs=no
13692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013694/* end confdefs.h. */
13695
13696#include<stdlib.h>
13697int main() {
13698 size_t len = -1;
13699 const char *str = "text";
13700 len = mbstowcs(NULL, str, 0);
13701 return (len != 4);
13702}
13703
13704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013705if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013706 ac_cv_broken_mbstowcs=no
13707else
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013712fi
13713
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013714fi
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13717$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013718if test "$ac_cv_broken_mbstowcs" = yes
13719then
13720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013722
13723fi
13724
Antoine Pitrou042b1282010-08-13 21:15:58 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13726$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013727if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013728 $as_echo_n "(cached) " >&6
13729else
13730 if test "$cross_compiling" = yes; then :
13731 ac_cv_computed_gotos=no
13732else
13733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13734/* end confdefs.h. */
13735
13736int main(int argc, char **argv)
13737{
13738 static void *targets[1] = { &&LABEL1 };
13739 goto LABEL2;
13740LABEL1:
13741 return 0;
13742LABEL2:
13743 goto *targets[0];
13744 return 1;
13745}
13746
13747_ACEOF
13748if ac_fn_c_try_run "$LINENO"; then :
13749 ac_cv_computed_gotos=yes
13750else
13751 ac_cv_computed_gotos=no
13752fi
13753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13754 conftest.$ac_objext conftest.beam conftest.$ac_ext
13755fi
13756
13757fi
13758
13759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13760$as_echo "$ac_cv_computed_gotos" >&6; }
13761if test "$ac_cv_computed_gotos" = yes
13762then
13763
13764$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13765
13766fi
13767
Antoine Pitroub52ec782009-01-25 16:34:23 +000013768# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13770$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013771
13772# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013774 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013775if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013776then
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013782fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013783if test "$withval" = no
13784then
13785
13786$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13787
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13789$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013790fi
13791
Antoine Pitrou042b1282010-08-13 21:15:58 +000013792else
13793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13794$as_echo "no value specified" >&6; }
13795fi
13796
Antoine Pitroub52ec782009-01-25 16:34:23 +000013797
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013798case $ac_sys_system in
13799AIX*)
13800
13801$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13802 ;;
13803esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013804
Michael W. Hudson54241132001-12-07 15:38:26 +000013805
Gregory P. Smith138fa432010-12-13 08:00:52 +000013806ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013807if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013808
13809$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13810
13811fi
Jesus Cea6a792292010-05-03 21:18:48 +000013812
13813
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013814
13815
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013816for h in `(cd $srcdir;echo Python/thread_*.h)`
13817do
13818 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13819done
13820
Michael W. Hudson54241132001-12-07 15:38:26 +000013821
Neal Norwitzd24499d2005-12-18 21:36:39 +000013822SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13824$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013825for dir in $SRCDIRS; do
13826 if test ! -d $dir; then
13827 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013828 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013829done
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13831$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013832
Guido van Rossum627b2d71993-12-24 10:39:16 +000013833# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013834ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013835
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013836ac_config_files="$ac_config_files Modules/ld_so_aix"
13837
Martin v. Löwis11437992002-04-12 09:54:03 +000013838cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013839# This file is a shell script that caches the results of configure
13840# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013841# scripts and configure runs, see configure's option --config-cache.
13842# It is not useful on other systems. If it contains results you don't
13843# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013844#
Martin v. Löwis11437992002-04-12 09:54:03 +000013845# config.status only pays attention to the cache file if you give it
13846# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013847#
Skip Montanaro6dead952003-09-25 14:50:04 +000013848# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013849# loading this file, other *unset* `ac_cv_foo' will be assigned the
13850# following values.
13851
13852_ACEOF
13853
Guido van Rossumf78abae1997-01-21 22:02:36 +000013854# The following way of writing the cache mishandles newlines in values,
13855# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013857# Ultrix sh set writes to stderr and can't be redirected directly,
13858# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859(
13860 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13861 eval ac_val=\$$ac_var
13862 case $ac_val in #(
13863 *${as_nl}*)
13864 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13866$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867 esac
13868 case $ac_var in #(
13869 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13871 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013872 esac ;;
13873 esac
13874 done
13875
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13878 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 # `set' does not quote correctly, so add quotes: double-quote
13880 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013882 "s/'/'\\\\''/g;
13883 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 *)
13886 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013887 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889 esac |
13890 sort
13891) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013892 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013895 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013896 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13897 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13899 :end' >>confcache
13900if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13901 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013902 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13904$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013905 if test ! -f "$cache_file" || test -h "$cache_file"; then
13906 cat confcache >"$cache_file"
13907 else
13908 case $cache_file in #(
13909 */* | ?:*)
13910 mv -f confcache "$cache_file"$$ &&
13911 mv -f "$cache_file"$$ "$cache_file" ;; #(
13912 *)
13913 mv -f confcache "$cache_file" ;;
13914 esac
13915 fi
13916 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013917 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13919$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013920 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013922rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013924test "x$prefix" = xNONE && prefix=$ac_default_prefix
13925# Let make expand exec_prefix.
13926test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013928DEFS=-DHAVE_CONFIG_H
13929
Skip Montanaro6dead952003-09-25 14:50:04 +000013930ac_libobjs=
13931ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013932U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013933for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13934 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13938 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13940 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013941done
13942LIBOBJS=$ac_libobjs
13943
13944LTLIBOBJS=$ac_ltlibobjs
13945
13946
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013949: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013950ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013951ac_clean_files_save=$ac_clean_files
13952ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13954$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13955as_write_fail=0
13956cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013957#! $SHELL
13958# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013959# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013961# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013962
Martin v. Löwis11437992002-04-12 09:54:03 +000013963debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013964ac_cs_recheck=false
13965ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967SHELL=\${CONFIG_SHELL-$SHELL}
13968export SHELL
13969_ASEOF
13970cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13971## -------------------- ##
13972## M4sh Initialization. ##
13973## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975# Be more Bourne compatible
13976DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013977if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 emulate sh
13979 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013981 # is contrary to our usage. Disable this feature.
13982 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013984else
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 case `(set -o) 2>/dev/null` in #(
13986 *posix*) :
13987 set -o posix ;; #(
13988 *) :
13989 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013991fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013992
13993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994as_nl='
13995'
13996export as_nl
13997# Printing a long string crashes Solaris 7 /usr/bin/printf.
13998as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13999as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14000as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14001# Prefer a ksh shell builtin over an external printf program on Solaris,
14002# but without wasting forks for bash or zsh.
14003if test -z "$BASH_VERSION$ZSH_VERSION" \
14004 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14005 as_echo='print -r --'
14006 as_echo_n='print -rn --'
14007elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14008 as_echo='printf %s\n'
14009 as_echo_n='printf %s'
14010else
14011 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14012 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14013 as_echo_n='/usr/ucb/echo -n'
14014 else
14015 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14016 as_echo_n_body='eval
14017 arg=$1;
14018 case $arg in #(
14019 *"$as_nl"*)
14020 expr "X$arg" : "X\\(.*\\)$as_nl";
14021 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14022 esac;
14023 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14024 '
14025 export as_echo_n_body
14026 as_echo_n='sh -c $as_echo_n_body as_echo'
14027 fi
14028 export as_echo_body
14029 as_echo='sh -c $as_echo_body as_echo'
14030fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014031
14032# The user is always right.
14033if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 PATH_SEPARATOR=:
14035 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14036 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14037 PATH_SEPARATOR=';'
14038 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014041
14042# IFS
14043# We need space, tab and new line, in precisely that order. Quoting is
14044# there to prevent editors from complaining about space-tab.
14045# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14046# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047IFS=" "" $as_nl"
14048
14049# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014050as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014051case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052 *[\\/]* ) as_myself=$0 ;;
14053 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014054for as_dir in $PATH
14055do
14056 IFS=$as_save_IFS
14057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014058 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14059 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062 ;;
14063esac
14064# We did not find ourselves, most probably we were run as `sh COMMAND'
14065# in which case we are not to be found in the path.
14066if test "x$as_myself" = x; then
14067 as_myself=$0
14068fi
14069if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014070 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14071 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072fi
14073
Matthias Kloseb9621712010-04-24 17:59:49 +000014074# Unset variables that we do not need and which cause bugs (e.g. in
14075# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14076# suppresses any "Segmentation fault" message there. '((' could
14077# trigger a bug in pdksh 5.2.14.
14078for as_var in BASH_ENV ENV MAIL MAILPATH
14079do eval test x\${$as_var+set} = xset \
14080 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014081done
14082PS1='$ '
14083PS2='> '
14084PS4='+ '
14085
14086# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014087LC_ALL=C
14088export LC_ALL
14089LANGUAGE=C
14090export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092# CDPATH.
14093(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14094
14095
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014096# as_fn_error STATUS ERROR [LINENO LOG_FD]
14097# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014098# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14099# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014100# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014101as_fn_error ()
14102{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014103 as_status=$1; test $as_status -eq 0 && as_status=1
14104 if test "$4"; then
14105 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14106 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014108 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 as_fn_exit $as_status
14110} # as_fn_error
14111
14112
14113# as_fn_set_status STATUS
14114# -----------------------
14115# Set $? to STATUS, without forking.
14116as_fn_set_status ()
14117{
14118 return $1
14119} # as_fn_set_status
14120
14121# as_fn_exit STATUS
14122# -----------------
14123# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14124as_fn_exit ()
14125{
14126 set +e
14127 as_fn_set_status $1
14128 exit $1
14129} # as_fn_exit
14130
14131# as_fn_unset VAR
14132# ---------------
14133# Portably unset VAR.
14134as_fn_unset ()
14135{
14136 { eval $1=; unset $1;}
14137}
14138as_unset=as_fn_unset
14139# as_fn_append VAR VALUE
14140# ----------------------
14141# Append the text in VALUE to the end of the definition contained in VAR. Take
14142# advantage of any shell optimizations that allow amortized linear growth over
14143# repeated appends, instead of the typical quadratic growth present in naive
14144# implementations.
14145if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14146 eval 'as_fn_append ()
14147 {
14148 eval $1+=\$2
14149 }'
14150else
14151 as_fn_append ()
14152 {
14153 eval $1=\$$1\$2
14154 }
14155fi # as_fn_append
14156
14157# as_fn_arith ARG...
14158# ------------------
14159# Perform arithmetic evaluation on the ARGs, and store the result in the
14160# global $as_val. Take advantage of shells that can avoid forks. The arguments
14161# must be portable across $(()) and expr.
14162if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14163 eval 'as_fn_arith ()
14164 {
14165 as_val=$(( $* ))
14166 }'
14167else
14168 as_fn_arith ()
14169 {
14170 as_val=`expr "$@" || test $? -eq 1`
14171 }
14172fi # as_fn_arith
14173
14174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175if expr a : '\(a\)' >/dev/null 2>&1 &&
14176 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14177 as_expr=expr
14178else
14179 as_expr=false
14180fi
14181
14182if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14183 as_basename=basename
14184else
14185 as_basename=false
14186fi
14187
Matthias Kloseb9621712010-04-24 17:59:49 +000014188if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14189 as_dirname=dirname
14190else
14191 as_dirname=false
14192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194as_me=`$as_basename -- "$0" ||
14195$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14196 X"$0" : 'X\(//\)$' \| \
14197 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014198$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199 sed '/^.*\/\([^/][^/]*\)\/*$/{
14200 s//\1/
14201 q
14202 }
14203 /^X\/\(\/\/\)$/{
14204 s//\1/
14205 q
14206 }
14207 /^X\/\(\/\).*/{
14208 s//\1/
14209 q
14210 }
14211 s/.*/./; q'`
14212
Matthias Kloseb9621712010-04-24 17:59:49 +000014213# Avoid depending upon Character Ranges.
14214as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14215as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14216as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14217as_cr_digits='0123456789'
14218as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219
14220ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014221case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014222-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 xy) ECHO_C='\c';;
14226 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14227 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228 esac;;
14229*)
14230 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014231esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014232
Martin v. Löwis11437992002-04-12 09:54:03 +000014233rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234if test -d conf$$.dir; then
14235 rm -f conf$$.dir/conf$$.file
14236else
14237 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014240if (echo >conf$$.file) 2>/dev/null; then
14241 if ln -s conf$$.file conf$$ 2>/dev/null; then
14242 as_ln_s='ln -s'
14243 # ... but there are two gotchas:
14244 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14245 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14246 # In both cases, we have to default to `cp -p'.
14247 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14248 as_ln_s='cp -p'
14249 elif ln conf$$.file conf$$ 2>/dev/null; then
14250 as_ln_s=ln
14251 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014254else
14255 as_ln_s='cp -p'
14256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014257rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14258rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260
14261# as_fn_mkdir_p
14262# -------------
14263# Create "$as_dir" as a directory, including parents if necessary.
14264as_fn_mkdir_p ()
14265{
14266
14267 case $as_dir in #(
14268 -*) as_dir=./$as_dir;;
14269 esac
14270 test -d "$as_dir" || eval $as_mkdir_p || {
14271 as_dirs=
14272 while :; do
14273 case $as_dir in #(
14274 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14275 *) as_qdir=$as_dir;;
14276 esac
14277 as_dirs="'$as_qdir' $as_dirs"
14278 as_dir=`$as_dirname -- "$as_dir" ||
14279$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14280 X"$as_dir" : 'X\(//\)[^/]' \| \
14281 X"$as_dir" : 'X\(//\)$' \| \
14282 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14283$as_echo X"$as_dir" |
14284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14285 s//\1/
14286 q
14287 }
14288 /^X\(\/\/\)[^/].*/{
14289 s//\1/
14290 q
14291 }
14292 /^X\(\/\/\)$/{
14293 s//\1/
14294 q
14295 }
14296 /^X\(\/\).*/{
14297 s//\1/
14298 q
14299 }
14300 s/.*/./; q'`
14301 test -d "$as_dir" && break
14302 done
14303 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014304 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014305
14306
14307} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014308if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014310else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014311 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014312 as_mkdir_p=false
14313fi
14314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014315if test -x / >/dev/null 2>&1; then
14316 as_test_x='test -x'
14317else
14318 if ls -dL / >/dev/null 2>&1; then
14319 as_ls_L_option=L
14320 else
14321 as_ls_L_option=
14322 fi
14323 as_test_x='
14324 eval sh -c '\''
14325 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 case $1 in #(
14329 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332 ???[sx]*):;;*)false;;esac;fi
14333 '\'' sh
14334 '
14335fi
14336as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014337
14338# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014339as_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 +000014340
14341# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014342as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014343
14344
Martin v. Löwis11437992002-04-12 09:54:03 +000014345exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014346## ----------------------------------- ##
14347## Main body of $CONFIG_STATUS script. ##
14348## ----------------------------------- ##
14349_ASEOF
14350test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014351
Matthias Kloseb9621712010-04-24 17:59:49 +000014352cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14353# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014354# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355# values after options handling.
14356ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014357This file was extended by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014358generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014359
14360 CONFIG_FILES = $CONFIG_FILES
14361 CONFIG_HEADERS = $CONFIG_HEADERS
14362 CONFIG_LINKS = $CONFIG_LINKS
14363 CONFIG_COMMANDS = $CONFIG_COMMANDS
14364 $ $0 $@
14365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366on `(hostname || uname -n) 2>/dev/null | sed 1q`
14367"
14368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369_ACEOF
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371case $ac_config_files in *"
14372"*) set x $ac_config_files; shift; ac_config_files=$*;;
14373esac
14374
14375case $ac_config_headers in *"
14376"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14377esac
14378
14379
14380cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014381# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014382config_files="$ac_config_files"
14383config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Matthias Kloseb9621712010-04-24 17:59:49 +000014387cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014388ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014389\`$as_me' instantiates files and other configuration actions
14390from templates according to the current configuration. Unless the files
14391and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
Matthias Kloseb9621712010-04-24 17:59:49 +000014393Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014394
14395 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 --config print configuration, then exit
14398 -q, --quiet, --silent
14399 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 -d, --debug don't remove temporary files
14401 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 --file=FILE[:TEMPLATE]
14403 instantiate the configuration file FILE
14404 --header=FILE[:TEMPLATE]
14405 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014406
14407Configuration files:
14408$config_files
14409
14410Configuration headers:
14411$config_headers
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14417ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014418ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014419python config.status 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014420configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014422
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014423Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014424This config.status script is free software; the Free Software Foundation
14425gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426
14427ac_pwd='$ac_pwd'
14428srcdir='$srcdir'
14429INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014430test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014431_ACEOF
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14434# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014435ac_need_defaults=:
14436while test $# != 0
14437do
14438 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014439 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14441 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014442 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014443 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014444 --*=)
14445 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14446 ac_optarg=
14447 ac_shift=:
14448 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014450 ac_option=$1
14451 ac_optarg=$2
14452 ac_shift=shift
14453 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 esac
14455
Skip Montanaro6dead952003-09-25 14:50:04 +000014456 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014458 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14459 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 $as_echo "$ac_cs_version"; exit ;;
14462 --config | --confi | --conf | --con | --co | --c )
14463 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 debug=: ;;
14466 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014467 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 case $ac_optarg in
14469 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014470 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 esac
14472 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 ac_need_defaults=false;;
14474 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014475 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 case $ac_optarg in
14477 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14478 esac
14479 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014480 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481 --he | --h)
14482 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014483 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014484Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014487 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14488 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14489 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
14491 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014492 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014493Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
14498 esac
14499 shift
14500done
14501
Skip Montanaro6dead952003-09-25 14:50:04 +000014502ac_configure_extra_args=
14503
14504if $ac_cs_silent; then
14505 exec 6>/dev/null
14506 ac_configure_extra_args="$ac_configure_extra_args --silent"
14507fi
14508
14509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014511if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14513 shift
14514 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14515 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014518fi
14519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014521cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014522exec 5>>config.log
14523{
14524 echo
14525 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14526## Running $as_me. ##
14527_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536
14537# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014538for ac_config_target in $ac_config_targets
14539do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540 case $ac_config_target in
14541 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14542 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14543 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014544 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14545 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14547 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014548 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014549 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014551 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 esac
14553done
14554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555
Martin v. Löwis11437992002-04-12 09:54:03 +000014556# If the user did not use the arguments to specify the items to instantiate,
14557# then the envvar interface is used. Set only those that are not.
14558# We use the long form for the default assignment because of an extremely
14559# bizarre bug on SunOS 4.1.3.
14560if $ac_need_defaults; then
14561 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14562 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14563fi
14564
Skip Montanaro6dead952003-09-25 14:50:04 +000014565# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014567# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568# Hook for its removal unless debugging.
14569# Note that there is a small window in which the directory will not be cleaned:
14570# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014571$debug ||
14572{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014573 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014574 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014575 : "${ac_tmp:=$tmp}"
14576 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014579}
Martin v. Löwis11437992002-04-12 09:54:03 +000014580# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014581
Martin v. Löwis11437992002-04-12 09:54:03 +000014582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014583 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014584 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014585} ||
14586{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587 tmp=./conf$$-$RANDOM
14588 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014589} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14590ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592# Set up the scripts for CONFIG_FILES section.
14593# No need to generate them if there are no CONFIG_FILES.
14594# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597
14598ac_cr=`echo X | tr X '\015'`
14599# On cygwin, bash can eat \r inside `` if the user requested igncr.
14600# But we know of no other shell where ac_cr would be empty at this
14601# point, so we can use a bashism as a fallback.
14602if test "x$ac_cr" = x; then
14603 eval ac_cr=\$\'\\r\'
14604fi
14605ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14606if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014607 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014608else
14609 ac_cs_awk_cr=$ac_cr
14610fi
14611
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014612echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014613_ACEOF
14614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{
14617 echo "cat >conf$$subs.awk <<_ACEOF" &&
14618 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14619 echo "_ACEOF"
14620} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014621 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14622ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623ac_delim='%!_!# '
14624for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014625 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014626 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14629 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630 break
14631 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014632 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014633 else
14634 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636done
Matthias Kloseb9621712010-04-24 17:59:49 +000014637rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638
Matthias Kloseb9621712010-04-24 17:59:49 +000014639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014640cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014642sed -n '
14643h
14644s/^/S["/; s/!.*/"]=/
14645p
14646g
14647s/^[^!]*!//
14648:repl
14649t repl
14650s/'"$ac_delim"'$//
14651t delim
14652:nl
14653h
14654s/\(.\{148\}\)..*/\1/
14655t more1
14656s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14657p
14658n
14659b repl
14660:more1
14661s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14662p
14663g
14664s/.\{148\}//
14665t nl
14666:delim
14667h
14668s/\(.\{148\}\)..*/\1/
14669t more2
14670s/["\\]/\\&/g; s/^/"/; s/$/"/
14671p
14672b
14673:more2
14674s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14675p
14676g
14677s/.\{148\}//
14678t delim
14679' <conf$$subs.awk | sed '
14680/^[^""]/{
14681 N
14682 s/\n//
14683}
14684' >>$CONFIG_STATUS || ac_write_fail=1
14685rm -f conf$$subs.awk
14686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14687_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014688cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 for (key in S) S_is_set[key] = 1
14690 FS = ""
14691
14692}
14693{
14694 line = $ 0
14695 nfields = split(line, field, "@")
14696 substed = 0
14697 len = length(field[1])
14698 for (i = 2; i < nfields; i++) {
14699 key = field[i]
14700 keylen = length(key)
14701 if (S_is_set[key]) {
14702 value = S[key]
14703 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14704 len += length(value) + length(field[++i])
14705 substed = 1
14706 } else
14707 len += 1 + keylen
14708 }
14709
14710 print line
14711}
14712
14713_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14716if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14717 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14718else
14719 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014720fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14721 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014722_ACEOF
14723
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014724# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14725# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726# trailing colons and then remove the whole line if VPATH becomes empty
14727# (actually we leave an empty line to preserve line numbers).
14728if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014729 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14730h
14731s///
14732s/^/:/
14733s/[ ]*$/:/
14734s/:\$(srcdir):/:/g
14735s/:\${srcdir}:/:/g
14736s/:@srcdir@:/:/g
14737s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014739x
14740s/\(=[ ]*\).*/\1/
14741G
14742s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743s/^[^=]*=[ ]*$//
14744}'
14745fi
14746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014748fi # test -n "$CONFIG_FILES"
14749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750# Set up the scripts for CONFIG_HEADERS section.
14751# No need to generate them if there are no CONFIG_HEADERS.
14752# This happens for instance with `./config.status Makefile'.
14753if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014754cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014755BEGIN {
14756_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758# Transform confdefs.h into an awk script `defines.awk', embedded as
14759# here-document in config.status, that substitutes the proper values into
14760# config.h.in to produce config.h.
14761
14762# Create a delimiter string that does not exist in confdefs.h, to ease
14763# handling of long lines.
14764ac_delim='%!_!# '
14765for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014766 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14767 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 break
14769 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014770 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 else
14772 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14773 fi
14774done
14775
14776# For the awk script, D is an array of macro values keyed by name,
14777# likewise P contains macro parameters if any. Preserve backslash
14778# newline sequences.
14779
14780ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14781sed -n '
14782s/.\{148\}/&'"$ac_delim"'/g
14783t rset
14784:rset
14785s/^[ ]*#[ ]*define[ ][ ]*/ /
14786t def
14787d
14788:def
14789s/\\$//
14790t bsnl
14791s/["\\]/\\&/g
14792s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14793D["\1"]=" \3"/p
14794s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14795d
14796:bsnl
14797s/["\\]/\\&/g
14798s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14799D["\1"]=" \3\\\\\\n"\\/p
14800t cont
14801s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14802t cont
14803d
14804:cont
14805n
14806s/.\{148\}/&'"$ac_delim"'/g
14807t clear
14808:clear
14809s/\\$//
14810t bsnlc
14811s/["\\]/\\&/g; s/^/"/; s/$/"/p
14812d
14813:bsnlc
14814s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14815b cont
14816' <confdefs.h | sed '
14817s/'"$ac_delim"'/"\\\
14818"/g' >>$CONFIG_STATUS || ac_write_fail=1
14819
14820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14821 for (key in D) D_is_set[key] = 1
14822 FS = ""
14823}
14824/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14825 line = \$ 0
14826 split(line, arg, " ")
14827 if (arg[1] == "#") {
14828 defundef = arg[2]
14829 mac1 = arg[3]
14830 } else {
14831 defundef = substr(arg[1], 2)
14832 mac1 = arg[2]
14833 }
14834 split(mac1, mac2, "(") #)
14835 macro = mac2[1]
14836 prefix = substr(line, 1, index(line, defundef) - 1)
14837 if (D_is_set[macro]) {
14838 # Preserve the white space surrounding the "#".
14839 print prefix "define", macro P[macro] D[macro]
14840 next
14841 } else {
14842 # Replace #undef with comments. This is necessary, for example,
14843 # in the case of _POSIX_SOURCE, which is predefined and required
14844 # on some systems where configure will not decide to define it.
14845 if (defundef == "undef") {
14846 print "/*", prefix defundef, macro, "*/"
14847 next
14848 }
14849 }
14850}
14851{ print }
14852_ACAWK
14853_ACEOF
14854cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014855 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014856fi # test -n "$CONFIG_HEADERS"
14857
14858
14859eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14860shift
14861for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862do
14863 case $ac_tag in
14864 :[FHLC]) ac_mode=$ac_tag; continue;;
14865 esac
14866 case $ac_mode$ac_tag in
14867 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014868 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869 :[FH]-) ac_tag=-:-;;
14870 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14871 esac
14872 ac_save_IFS=$IFS
14873 IFS=:
14874 set x $ac_tag
14875 IFS=$ac_save_IFS
14876 shift
14877 ac_file=$1
14878 shift
14879
14880 case $ac_mode in
14881 :L) ac_source=$1;;
14882 :[FH])
14883 ac_file_inputs=
14884 for ac_f
14885 do
14886 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014887 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888 *) # Look for the file first in the build tree, then in the source tree
14889 # (if the path is not absolute). The absolute path cannot be DOS-style,
14890 # because $ac_f cannot contain `:'.
14891 test -f "$ac_f" ||
14892 case $ac_f in
14893 [\\/$]*) false;;
14894 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14895 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014896 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014897 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014898 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14899 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900 done
14901
14902 # Let's still pretend it is `configure' which instantiates (i.e., don't
14903 # use $as_me), people would be surprised to read:
14904 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 configure_input='Generated from '`
14906 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14907 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014908 if test x"$ac_file" != x-; then
14909 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14911$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 # Neutralize special characters interpreted by sed in replacement strings.
14914 case $configure_input in #(
14915 *\&* | *\|* | *\\* )
14916 ac_sed_conf_input=`$as_echo "$configure_input" |
14917 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14918 *) ac_sed_conf_input=$configure_input;;
14919 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920
14921 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014922 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14923 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924 esac
14925 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 esac
14927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014929$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014930 X"$ac_file" : 'X\(//\)[^/]' \| \
14931 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14935 s//\1/
14936 q
14937 }
14938 /^X\(\/\/\)[^/].*/{
14939 s//\1/
14940 q
14941 }
14942 /^X\(\/\/\)$/{
14943 s//\1/
14944 q
14945 }
14946 /^X\(\/\).*/{
14947 s//\1/
14948 q
14949 }
14950 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 ac_builddir=.
14953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954case "$ac_dir" in
14955.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14956*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 case $ac_top_builddir_sub in
14961 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14962 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14963 esac ;;
14964esac
14965ac_abs_top_builddir=$ac_pwd
14966ac_abs_builddir=$ac_pwd$ac_dir_suffix
14967# for backward compatibility:
14968ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014969
14970case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973 ac_top_srcdir=$ac_top_builddir_sub
14974 ac_abs_top_srcdir=$ac_pwd ;;
14975 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 ac_top_srcdir=$srcdir
14978 ac_abs_top_srcdir=$srcdir ;;
14979 *) # Relative name.
14980 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14981 ac_top_srcdir=$ac_top_build_prefix$srcdir
14982 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014983esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014985
Martin v. Löwis11437992002-04-12 09:54:03 +000014986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987 case $ac_mode in
14988 :F)
14989 #
14990 # CONFIG_FILE
14991 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014992
14993 case $INSTALL in
14994 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014995 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014996 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014997_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015000# If the template does not know about datarootdir, expand it.
15001# FIXME: This hack should be removed a few years after 2.60.
15002ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015003ac_sed_dataroot='
15004/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005 p
15006 q
15007}
15008/@datadir@/p
15009/@docdir@/p
15010/@infodir@/p
15011/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015012/@mandir@/p'
15013case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015014*datarootdir*) ac_datarootdir_seen=yes;;
15015*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15017$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015019cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020 ac_datarootdir_hack='
15021 s&@datadir@&$datadir&g
15022 s&@docdir@&$docdir&g
15023 s&@infodir@&$infodir&g
15024 s&@localedir@&$localedir&g
15025 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027esac
15028_ACEOF
15029
15030# Neutralize VPATH when `$srcdir' = `.'.
15031# Shell code in configure.ac might set extrasub.
15032# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15034ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015035$extrasub
15036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015038:t
15039/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015040s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015042s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043s&@srcdir@&$ac_srcdir&;t t
15044s&@abs_srcdir@&$ac_abs_srcdir&;t t
15045s&@top_srcdir@&$ac_top_srcdir&;t t
15046s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15047s&@builddir@&$ac_builddir&;t t
15048s&@abs_builddir@&$ac_abs_builddir&;t t
15049s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15050s&@INSTALL@&$ac_INSTALL&;t t
15051$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015052"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015053eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15054 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015057 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15058 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15059 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 { $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 +000015061which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015062$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015063which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015064
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015065 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015066 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015067 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15068 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015070 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015071 ;;
15072 :H)
15073 #
15074 # CONFIG_HEADER
15075 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 {
15078 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015079 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15080 } >"$ac_tmp/config.h" \
15081 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15082 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15084$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015087 mv "$ac_tmp/config.h" "$ac_file" \
15088 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 fi
15090 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015091 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015092 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15093 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097
15098 esac
15099
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015100
15101 case $ac_file$ac_mode in
15102 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15103
15104 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105done # for ac_tag
15106
Guido van Rossum627b2d71993-12-24 10:39:16 +000015107
Matthias Kloseb9621712010-04-24 17:59:49 +000015108as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015109_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015110ac_clean_files=$ac_clean_files_save
15111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015113 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
15116# configure is writing to config.log, and then calls config.status.
15117# config.status does its own redirection, appending to config.log.
15118# Unfortunately, on DOS this fails, as config.log is still kept open
15119# by configure, so config.status won't be able to write to it; its
15120# output is simply discarded. So we exec the FD to /dev/null,
15121# effectively closing config.log, so it can be properly (re)opened and
15122# appended to by config.status. When coming back to configure, we
15123# need to make the FD available again.
15124if test "$no_create" != yes; then
15125 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015126 ac_config_status_args=
15127 test "$silent" = yes &&
15128 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015130 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015131 exec 5>>config.log
15132 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15133 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015134 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015135fi
15136if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15138$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015139fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015140
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015141
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015142echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015143if test ! -f Modules/Setup
15144then
15145 cp $srcdir/Modules/Setup.dist Modules/Setup
15146fi
15147
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015148echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015149if test ! -f Modules/Setup.local
15150then
15151 echo "# Edit this file for local setup changes" >Modules/Setup.local
15152fi
15153
15154echo "creating Makefile"
15155$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15156 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015157 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015158mv config.c Modules