blob: 4b6929275f4306edce969d33ad4f99869a4ebd92 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Georg Brandl1ca2e792011-03-05 20:51:24 +01002# From configure.in Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Georg Brandlfe09a542011-03-06 10:26:32 +01004# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Kloseb9621712010-04-24 17:59:49 +00008#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000029else
Matthias Kloseb9621712010-04-24 17:59:49 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000037
38
Matthias Kloseb9621712010-04-24 17:59:49 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000095as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000096case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000117fi
118
Matthias Kloseb9621712010-04-24 17:59:49 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
Matthias Kloseb9621712010-04-24 17:59:49 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000221 # Preserve -v and -x to the replacement shell.
Matthias Kloseb9621712010-04-24 17:59:49 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000375# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000376as_fn_error ()
377{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000382 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Kloseb9621712010-04-24 17:59:49 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000410$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Kloseb9621712010-04-24 17:59:49 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000431
432
Matthias Kloseb9621712010-04-24 17:59:49 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000465case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000467 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000482 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000522 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000523 else
Matthias Kloseb9621712010-04-24 17:59:49 +0000524 case $1 in #(
525 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000526 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Kloseb9621712010-04-24 17:59:49 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000564PACKAGE_VERSION='3.3'
565PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000598#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Kloseb9621712010-04-24 17:59:49 +0000606ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000607SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000608THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000609SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000642ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000643LN
644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Georg Brandl1ca2e792011-03-05 20:51:24 +0100647HAS_HG
648HGBRANCH
649HGTAG
650HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
652AR
653RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000654USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000655GNULD
656LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000657LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000658RUNSHARED
659INSTSONAME
660LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000661PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000662BLDLIBRARY
663DLLLIBRARY
664LDLIBRARY
665LIBRARY
666BUILDEXEEXT
667EGREP
668GREP
669CPP
670MAINCC
671CXX
672OBJEXT
673EXEEXT
674ac_ct_CC
675CPPFLAGS
676LDFLAGS
677CFLAGS
678CC
679EXPORT_MACOSX_DEPLOYMENT_TARGET
680CONFIGURE_MACOSX_DEPLOYMENT_TARGET
681SGI_ABI
682MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000683FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000684FRAMEWORKUNIXTOOLSPREFIX
685FRAMEWORKALTINSTALLLAST
686FRAMEWORKALTINSTALLFIRST
687FRAMEWORKINSTALLLAST
688FRAMEWORKINSTALLFIRST
689PYTHONFRAMEWORKINSTALLDIR
690PYTHONFRAMEWORKPREFIX
691PYTHONFRAMEWORKDIR
692PYTHONFRAMEWORKIDENTIFIER
693PYTHONFRAMEWORK
694LIPO_32BIT_FLAGS
695ARCH_RUN_32BIT
696UNIVERSALSDK
697CONFIG_ARGS
698SOVERSION
699VERSION
700target_alias
701host_alias
702build_alias
703LIBS
704ECHO_T
705ECHO_N
706ECHO_C
707DEFS
708mandir
709localedir
710libdir
711psdir
712pdfdir
713dvidir
714htmldir
715infodir
716docdir
717oldincludedir
718includedir
719localstatedir
720sharedstatedir
721sysconfdir
722datadir
723datarootdir
724libexecdir
725sbindir
726bindir
727program_transform_name
728prefix
729exec_prefix
730PACKAGE_URL
731PACKAGE_BUGREPORT
732PACKAGE_STRING
733PACKAGE_VERSION
734PACKAGE_TARNAME
735PACKAGE_NAME
736PATH_SEPARATOR
737SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000739ac_user_opts='
740enable_option_checking
741enable_universalsdk
742with_universal_archs
743with_framework_name
744enable_framework
745with_gcc
746with_cxx_main
747with_suffix
748enable_shared
749enable_profiling
750with_pydebug
751with_libs
752with_system_expat
753with_system_ffi
Benjamin Peterson076ed002010-10-31 17:11:02 +0000754enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000755with_dbmliborder
756with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000757with_threads
758with_thread
759enable_ipv6
760with_doc_strings
761with_tsc
762with_pymalloc
763with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000764with_fpectl
765with_libm
766with_libc
767enable_big_digits
768with_wide_unicode
769with_computed_gotos
770'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000771 ac_precious_vars='build_alias
772host_alias
773target_alias
774CC
775CFLAGS
776LDFLAGS
777LIBS
778CPPFLAGS
Ross Lagerwall7807c352011-03-17 20:20:30 +0200779CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000780
Guido van Rossum627b2d71993-12-24 10:39:16 +0000781
Guido van Rossum7f43da71994-08-01 12:15:30 +0000782# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000783ac_init_help=
784ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000785ac_unrecognized_opts=
786ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787# The variables have the same names as the options, with
788# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000789cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792no_recursion=
793prefix=NONE
794program_prefix=NONE
795program_suffix=NONE
796program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000798site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801x_includes=NONE
802x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000803
804# Installation directory options.
805# These are left unexpanded so users can "make install exec_prefix=/foo"
806# and all the variables that are supposed to be based on exec_prefix
807# by default will actually change.
808# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000810bindir='${exec_prefix}/bin'
811sbindir='${exec_prefix}/sbin'
812libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000813datarootdir='${prefix}/share'
814datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815sysconfdir='${prefix}/etc'
816sharedstatedir='${prefix}/com'
817localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818includedir='${prefix}/include'
819oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
821infodir='${datarootdir}/info'
822htmldir='${docdir}'
823dvidir='${docdir}'
824pdfdir='${docdir}'
825psdir='${docdir}'
826libdir='${exec_prefix}/lib'
827localedir='${datarootdir}/locale'
828mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834 # If the previous option needs an argument, assign it.
835 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837 ac_prev=
838 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000839 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 case $ac_option in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000842 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
843 *=) ac_optarg= ;;
844 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847 # Accept the important Cygnus configure options, so we can diagnose typos.
848
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 case $ac_dashdash$ac_option in
850 --)
851 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853 -bindir | --bindir | --bindi | --bind | --bin | --bi)
854 ac_prev=bindir ;;
855 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000856 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857
858 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863 -cache-file | --cache-file | --cache-fil | --cache-fi \
864 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
865 ac_prev=cache_file ;;
866 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
867 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 cache_file=$ac_optarg ;;
869
870 --config-cache | -C)
871 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
879 | --dataroo | --dataro | --datar)
880 ac_prev=datarootdir ;;
881 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
882 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
883 datarootdir=$ac_optarg ;;
884
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000886 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000888 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000889 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000890 ac_useropt_orig=$ac_useropt
891 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
892 case $ac_user_opts in
893 *"
894"enable_$ac_useropt"
895"*) ;;
896 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
897 ac_unrecognized_sep=', ';;
898 esac
899 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900
901 -docdir | --docdir | --docdi | --doc | --do)
902 ac_prev=docdir ;;
903 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
904 docdir=$ac_optarg ;;
905
906 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
907 ac_prev=dvidir ;;
908 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
909 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
911 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000912 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000914 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +0000915 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000916 ac_useropt_orig=$ac_useropt
917 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
918 case $ac_user_opts in
919 *"
920"enable_$ac_useropt"
921"*) ;;
922 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
923 ac_unrecognized_sep=', ';;
924 esac
925 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
928 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
929 | --exec | --exe | --ex)
930 ac_prev=exec_prefix ;;
931 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
932 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
933 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
936 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937 # Obsolete; use --with-gas.
938 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 -help | --help | --hel | --he | -h)
941 ac_init_help=long ;;
942 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
943 ac_init_help=recursive ;;
944 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
945 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946
947 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
953 ac_prev=htmldir ;;
954 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
955 | --ht=*)
956 htmldir=$ac_optarg ;;
957
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958 -includedir | --includedir | --includedi | --included | --include \
959 | --includ | --inclu | --incl | --inc)
960 ac_prev=includedir ;;
961 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
962 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
965 -infodir | --infodir | --infodi | --infod | --info | --inf)
966 ac_prev=infodir ;;
967 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000969
970 -libdir | --libdir | --libdi | --libd)
971 ac_prev=libdir ;;
972 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000974
975 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
976 | --libexe | --libex | --libe)
977 ac_prev=libexecdir ;;
978 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
979 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982 -localedir | --localedir | --localedi | --localed | --locale)
983 ac_prev=localedir ;;
984 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
985 localedir=$ac_optarg ;;
986
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000988 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 ac_prev=localstatedir ;;
990 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000991 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993
994 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
995 ac_prev=mandir ;;
996 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000 # Obsolete; use --without-fp.
1001 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
1003 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 no_create=yes ;;
1006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1008 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1009 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1012 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1013 | --oldin | --oldi | --old | --ol | --o)
1014 ac_prev=oldincludedir ;;
1015 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1016 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1017 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1021 ac_prev=prefix ;;
1022 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1026 | --program-pre | --program-pr | --program-p)
1027 ac_prev=program_prefix ;;
1028 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1029 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
1032 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1033 | --program-suf | --program-su | --program-s)
1034 ac_prev=program_suffix ;;
1035 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1036 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038
1039 -program-transform-name | --program-transform-name \
1040 | --program-transform-nam | --program-transform-na \
1041 | --program-transform-n | --program-transform- \
1042 | --program-transform | --program-transfor \
1043 | --program-transfo | --program-transf \
1044 | --program-trans | --program-tran \
1045 | --progr-tra | --program-tr | --program-t)
1046 ac_prev=program_transform_name ;;
1047 -program-transform-name=* | --program-transform-name=* \
1048 | --program-transform-nam=* | --program-transform-na=* \
1049 | --program-transform-n=* | --program-transform-=* \
1050 | --program-transform=* | --program-transfor=* \
1051 | --program-transfo=* | --program-transf=* \
1052 | --program-trans=* | --program-tran=* \
1053 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001056 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1057 ac_prev=pdfdir ;;
1058 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1059 pdfdir=$ac_optarg ;;
1060
1061 -psdir | --psdir | --psdi | --psd | --ps)
1062 ac_prev=psdir ;;
1063 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1064 psdir=$ac_optarg ;;
1065
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1067 | -silent | --silent | --silen | --sile | --sil)
1068 silent=yes ;;
1069
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1071 ac_prev=sbindir ;;
1072 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1073 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1077 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1078 | --sharedst | --shareds | --shared | --share | --shar \
1079 | --sha | --sh)
1080 ac_prev=sharedstatedir ;;
1081 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1082 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1083 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1084 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -site | --site | --sit)
1088 ac_prev=site ;;
1089 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1093 ac_prev=srcdir ;;
1094 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1098 | --syscon | --sysco | --sysc | --sys | --sy)
1099 ac_prev=sysconfdir ;;
1100 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1101 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1110 verbose=yes ;;
1111
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 -version | --version | --versio | --versi | --vers | -V)
1113 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001116 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001118 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001119 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001120 ac_useropt_orig=$ac_useropt
1121 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1122 case $ac_user_opts in
1123 *"
1124"with_$ac_useropt"
1125"*) ;;
1126 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1127 ac_unrecognized_sep=', ';;
1128 esac
1129 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001132 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001135 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 ac_useropt_orig=$ac_useropt
1137 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1138 case $ac_user_opts in
1139 *"
1140"with_$ac_useropt"
1141"*) ;;
1142 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1143 ac_unrecognized_sep=', ';;
1144 esac
1145 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147 --x)
1148 # Obsolete; use --with-x.
1149 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
1151 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1152 | --x-incl | --x-inc | --x-in | --x-i)
1153 ac_prev=x_includes ;;
1154 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1155 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
1158 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1159 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1160 ac_prev=x_libraries ;;
1161 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1162 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001165 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1166Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 ;;
1168
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 *=*)
1170 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 case $ac_envvar in #(
1173 '' | [0-9]* | *[!_$as_cr_alnum]* )
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001174 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001176 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 export $ac_envvar ;;
1178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001184 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ;;
1186
1187 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001188done
1189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001192 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193fi
1194
Matthias Kloseb9621712010-04-24 17:59:49 +00001195if test -n "$ac_unrecognized_opts"; then
1196 case $enable_option_checking in
1197 no) ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001198 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1200 esac
1201fi
1202
1203# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001204for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1205 datadir sysconfdir sharedstatedir localstatedir includedir \
1206 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1207 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001209 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 # Remove trailing slashes.
1211 case $ac_val in
1212 */ )
1213 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1214 eval $ac_var=\$ac_val;;
1215 esac
1216 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001218 [\\/$]* | ?:[\\/]* ) continue;;
1219 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220 esac
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001221 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001222done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
Martin v. Löwis11437992002-04-12 09:54:03 +00001224# There might be people who depend on the old broken behavior: `$host'
1225# used to hold the argument of --host etc.
1226# FIXME: To remove some day.
1227build=$build_alias
1228host=$host_alias
1229target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230
Martin v. Löwis11437992002-04-12 09:54:03 +00001231# FIXME: To remove some day.
1232if test "x$host_alias" != x; then
1233 if test "x$build_alias" = x; then
1234 cross_compiling=maybe
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001235 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1236 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 elif test "x$build_alias" != "x$host_alias"; then
1238 cross_compiling=yes
1239 fi
1240fi
1241
1242ac_tool_prefix=
1243test -n "$host_alias" && ac_tool_prefix=$host_alias-
1244
1245test "$silent" = yes && exec 6>/dev/null
1246
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248ac_pwd=`pwd` && test -n "$ac_pwd" &&
1249ac_ls_di=`ls -di .` &&
1250ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001251 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001252test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001253 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254
1255
Guido van Rossum627b2d71993-12-24 10:39:16 +00001256# Find the source files, if location was not specified.
1257if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 ac_confdir=`$as_dirname -- "$as_myself" ||
1261$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1262 X"$as_myself" : 'X\(//\)[^/]' \| \
1263 X"$as_myself" : 'X\(//\)$' \| \
1264 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1265$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1267 s//\1/
1268 q
1269 }
1270 /^X\(\/\/\)[^/].*/{
1271 s//\1/
1272 q
1273 }
1274 /^X\(\/\/\)$/{
1275 s//\1/
1276 q
1277 }
1278 /^X\(\/\).*/{
1279 s//\1/
1280 q
1281 }
1282 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285 srcdir=..
1286 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287else
1288 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290if test ! -r "$srcdir/$ac_unique_file"; then
1291 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001292 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1295ac_abs_confdir=`(
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001296 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 pwd)`
1298# When building in place, set srcdir=.
1299if test "$ac_abs_confdir" = "$ac_pwd"; then
1300 srcdir=.
1301fi
1302# Remove unnecessary trailing slashes from srcdir.
1303# Double slashes in file names in object file debugging info
1304# mess up M-x gdb in Emacs.
1305case $srcdir in
1306*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1307esac
1308for ac_var in $ac_precious_vars; do
1309 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1310 eval ac_env_${ac_var}_value=\$${ac_var}
1311 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1313done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315#
1316# Report the --help message.
1317#
1318if test "$ac_init_help" = "long"; then
1319 # Omit some internal or obsolete options to make the list less imposing.
1320 # This message is too long to be a string in the A/UX 3.1 sh.
1321 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001322\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001323
1324Usage: $0 [OPTION]... [VAR=VALUE]...
1325
1326To assign environment variables (e.g., CC, CFLAGS...), specify them as
1327VAR=VALUE. See below for descriptions of some of the useful variables.
1328
1329Defaults for the options are specified in brackets.
1330
1331Configuration:
1332 -h, --help display this help and exit
1333 --help=short display options specific to this package
1334 --help=recursive display the short help of all the included packages
1335 -V, --version display version information and exit
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001336 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001337 --cache-file=FILE cache test results in FILE [disabled]
1338 -C, --config-cache alias for \`--cache-file=config.cache'
1339 -n, --no-create do not create output files
1340 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1341
Martin v. Löwis11437992002-04-12 09:54:03 +00001342Installation directories:
1343 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001345 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001346 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347
1348By default, \`make install' will install all the files in
1349\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1350an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1351for instance \`--prefix=\$HOME'.
1352
1353For better control, use the options below.
1354
1355Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001356 --bindir=DIR user executables [EPREFIX/bin]
1357 --sbindir=DIR system admin executables [EPREFIX/sbin]
1358 --libexecdir=DIR program executables [EPREFIX/libexec]
1359 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1360 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1361 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1362 --libdir=DIR object code libraries [EPREFIX/lib]
1363 --includedir=DIR C header files [PREFIX/include]
1364 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1365 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1366 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1367 --infodir=DIR info documentation [DATAROOTDIR/info]
1368 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1369 --mandir=DIR man documentation [DATAROOTDIR/man]
1370 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1371 --htmldir=DIR html documentation [DOCDIR]
1372 --dvidir=DIR dvi documentation [DOCDIR]
1373 --pdfdir=DIR pdf documentation [DOCDIR]
1374 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001375_ACEOF
1376
1377 cat <<\_ACEOF
1378_ACEOF
1379fi
1380
1381if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001382 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001383 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001385 cat <<\_ACEOF
1386
1387Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001388 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1390 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001391 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001392 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001393 --enable-framework[=INSTALLDIR]
1394 Build (MacOSX|Darwin) framework
1395 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001396 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001397 --enable-loadable-sqlite-extensions
1398 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --enable-ipv6 Enable ipv6 (with ipv4) support
1400 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001401 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001402 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Optional Packages:
1405 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1406 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001407 --with-universal-archs=ARCH
1408 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001409 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001410 --with-framework-name=FRAMEWORK
1411 specify an alternate name of the framework built
1412 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001413 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001414 --with-cxx-main=<compiler>
1415 compile main() and link python executable with C++
1416 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --with-suffix=.exe set executable suffix
1418 --with-pydebug build with Py_DEBUG defined
1419 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001420 --with-system-expat build pyexpat module using an installed expat
1421 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001422 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001423 --with-dbmliborder=db1:db2:...
1424 order to check db backends for dbm. Valid value is a
1425 colon separated string with the backend names
1426 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001427 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --with(out)-threads[=DIRECTORY]
1429 disable/enable thread support
1430 --with(out)-thread[=DIRECTORY]
1431 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001433 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001435 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with-fpectl enable SIGFPE catching
1437 --with-libm=STRING math library
1438 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001439 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitrou042b1282010-08-13 21:15:58 +00001440 --with(out)-computed-gotos
1441 Use computed gotos in evaluation loop (enabled by
1442 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444Some influential environment variables:
1445 CC C compiler command
1446 CFLAGS C compiler flags
1447 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1448 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001449 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001451 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 CPP C preprocessor
1453
1454Use these variables to override the choices made by `configure' or to help
1455it to find libraries and programs with nonstandard names/locations.
1456
Georg Brandle2e15612009-05-20 18:25:10 +00001457Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001459ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001460fi
1461
1462if test "$ac_init_help" = "recursive"; then
1463 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001464 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 test -d "$ac_dir" ||
1466 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1467 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 ac_builddir=.
1469
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001470case "$ac_dir" in
1471.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1472*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001476 case $ac_top_builddir_sub in
1477 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1478 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1479 esac ;;
1480esac
1481ac_abs_top_builddir=$ac_pwd
1482ac_abs_builddir=$ac_pwd$ac_dir_suffix
1483# for backward compatibility:
1484ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489 ac_top_srcdir=$ac_top_builddir_sub
1490 ac_abs_top_srcdir=$ac_pwd ;;
1491 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 ac_top_srcdir=$srcdir
1494 ac_abs_top_srcdir=$srcdir ;;
1495 *) # Relative name.
1496 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1497 ac_top_srcdir=$ac_top_build_prefix$srcdir
1498 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001499esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 cd "$ac_dir" || { ac_status=$?; continue; }
1503 # Check for guested configure.
1504 if test -f "$ac_srcdir/configure.gnu"; then
1505 echo &&
1506 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1507 elif test -f "$ac_srcdir/configure"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001511 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 fi || ac_status=$?
1513 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 done
1515fi
1516
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001518if $ac_init_version; then
1519 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001520python configure 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001521generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001522
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001523Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001524This configure script is free software; the Free Software Foundation
1525gives unlimited permission to copy, distribute and modify it.
1526_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001529
1530## ------------------------ ##
1531## Autoconf initialization. ##
1532## ------------------------ ##
1533
1534# ac_fn_c_try_compile LINENO
1535# --------------------------
1536# Try to compile conftest.$ac_ext, and return whether this succeeded.
1537ac_fn_c_try_compile ()
1538{
1539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1540 rm -f conftest.$ac_objext
1541 if { { ac_try="$ac_compile"
1542case "(($ac_try" in
1543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1544 *) ac_try_echo=$ac_try;;
1545esac
1546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1547$as_echo "$ac_try_echo"; } >&5
1548 (eval "$ac_compile") 2>conftest.err
1549 ac_status=$?
1550 if test -s conftest.err; then
1551 grep -v '^ *+' conftest.err >conftest.er1
1552 cat conftest.er1 >&5
1553 mv -f conftest.er1 conftest.err
1554 fi
1555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1556 test $ac_status = 0; } && {
1557 test -z "$ac_c_werror_flag" ||
1558 test ! -s conftest.err
1559 } && test -s conftest.$ac_objext; then :
1560 ac_retval=0
1561else
1562 $as_echo "$as_me: failed program was:" >&5
1563sed 's/^/| /' conftest.$ac_ext >&5
1564
1565 ac_retval=1
1566fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001567 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 as_fn_set_status $ac_retval
1569
1570} # ac_fn_c_try_compile
1571
1572# ac_fn_c_try_cpp LINENO
1573# ----------------------
1574# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1575ac_fn_c_try_cpp ()
1576{
1577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1578 if { { ac_try="$ac_cpp conftest.$ac_ext"
1579case "(($ac_try" in
1580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1581 *) ac_try_echo=$ac_try;;
1582esac
1583eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1584$as_echo "$ac_try_echo"; } >&5
1585 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1586 ac_status=$?
1587 if test -s conftest.err; then
1588 grep -v '^ *+' conftest.err >conftest.er1
1589 cat conftest.er1 >&5
1590 mv -f conftest.er1 conftest.err
1591 fi
1592 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001593 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001594 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1595 test ! -s conftest.err
1596 }; then :
1597 ac_retval=0
1598else
1599 $as_echo "$as_me: failed program was:" >&5
1600sed 's/^/| /' conftest.$ac_ext >&5
1601
1602 ac_retval=1
1603fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001604 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001605 as_fn_set_status $ac_retval
1606
1607} # ac_fn_c_try_cpp
1608
1609# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1610# -------------------------------------------------------
1611# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1612# the include files in INCLUDES and setting the cache variable VAR
1613# accordingly.
1614ac_fn_c_check_header_mongrel ()
1615{
1616 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001617 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1619$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001620if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 $as_echo_n "(cached) " >&6
1622fi
1623eval ac_res=\$$3
1624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1625$as_echo "$ac_res" >&6; }
1626else
1627 # Is the header compilable?
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1629$as_echo_n "checking $2 usability... " >&6; }
1630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1631/* end confdefs.h. */
1632$4
1633#include <$2>
1634_ACEOF
1635if ac_fn_c_try_compile "$LINENO"; then :
1636 ac_header_compiler=yes
1637else
1638 ac_header_compiler=no
1639fi
1640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1642$as_echo "$ac_header_compiler" >&6; }
1643
1644# Is the header present?
1645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1646$as_echo_n "checking $2 presence... " >&6; }
1647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1648/* end confdefs.h. */
1649#include <$2>
1650_ACEOF
1651if ac_fn_c_try_cpp "$LINENO"; then :
1652 ac_header_preproc=yes
1653else
1654 ac_header_preproc=no
1655fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001656rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1658$as_echo "$ac_header_preproc" >&6; }
1659
1660# So? What about this header?
1661case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1662 yes:no: )
1663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1664$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1666$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1667 ;;
1668 no:yes:* )
1669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1670$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1672$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1674$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1676$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1678$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001679( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001680## Report this to http://bugs.python.org/ ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001681## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 ) | sed "s/^/$as_me: WARNING: /" >&2
1683 ;;
1684esac
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1686$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001687if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001688 $as_echo_n "(cached) " >&6
1689else
1690 eval "$3=\$ac_header_compiler"
1691fi
1692eval ac_res=\$$3
1693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1694$as_echo "$ac_res" >&6; }
1695fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001697
1698} # ac_fn_c_check_header_mongrel
1699
1700# ac_fn_c_try_run LINENO
1701# ----------------------
1702# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1703# that executables *can* be run.
1704ac_fn_c_try_run ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 if { { ac_try="$ac_link"
1708case "(($ac_try" in
1709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710 *) ac_try_echo=$ac_try;;
1711esac
1712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713$as_echo "$ac_try_echo"; } >&5
1714 (eval "$ac_link") 2>&5
1715 ac_status=$?
1716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1717 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1718 { { case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721esac
1722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723$as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_try") 2>&5
1725 ac_status=$?
1726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1727 test $ac_status = 0; }; }; then :
1728 ac_retval=0
1729else
1730 $as_echo "$as_me: program exited with status $ac_status" >&5
1731 $as_echo "$as_me: failed program was:" >&5
1732sed 's/^/| /' conftest.$ac_ext >&5
1733
1734 ac_retval=$ac_status
1735fi
1736 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001737 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001738 as_fn_set_status $ac_retval
1739
1740} # ac_fn_c_try_run
1741
1742# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1743# -------------------------------------------------------
1744# Tests whether HEADER exists and can be compiled using the include files in
1745# INCLUDES, setting the cache variable VAR accordingly.
1746ac_fn_c_check_header_compile ()
1747{
1748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1750$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001751if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 $as_echo_n "(cached) " >&6
1753else
1754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1755/* end confdefs.h. */
1756$4
1757#include <$2>
1758_ACEOF
1759if ac_fn_c_try_compile "$LINENO"; then :
1760 eval "$3=yes"
1761else
1762 eval "$3=no"
1763fi
1764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1765fi
1766eval ac_res=\$$3
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1768$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001769 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001770
1771} # ac_fn_c_check_header_compile
1772
1773# ac_fn_c_try_link LINENO
1774# -----------------------
1775# Try to link conftest.$ac_ext, and return whether this succeeded.
1776ac_fn_c_try_link ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1779 rm -f conftest.$ac_objext conftest$ac_exeext
1780 if { { ac_try="$ac_link"
1781case "(($ac_try" in
1782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1783 *) ac_try_echo=$ac_try;;
1784esac
1785eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1786$as_echo "$ac_try_echo"; } >&5
1787 (eval "$ac_link") 2>conftest.err
1788 ac_status=$?
1789 if test -s conftest.err; then
1790 grep -v '^ *+' conftest.err >conftest.er1
1791 cat conftest.er1 >&5
1792 mv -f conftest.er1 conftest.err
1793 fi
1794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1795 test $ac_status = 0; } && {
1796 test -z "$ac_c_werror_flag" ||
1797 test ! -s conftest.err
1798 } && test -s conftest$ac_exeext && {
1799 test "$cross_compiling" = yes ||
1800 $as_test_x conftest$ac_exeext
1801 }; then :
1802 ac_retval=0
1803else
1804 $as_echo "$as_me: failed program was:" >&5
1805sed 's/^/| /' conftest.$ac_ext >&5
1806
1807 ac_retval=1
1808fi
1809 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1810 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1811 # interfere with the next link command; also delete a directory that is
1812 # left behind by Apple's compiler. We do this before executing the actions.
1813 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001814 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001815 as_fn_set_status $ac_retval
1816
1817} # ac_fn_c_try_link
1818
1819# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1820# -------------------------------------------
1821# Tests whether TYPE exists after having included INCLUDES, setting cache
1822# variable VAR accordingly.
1823ac_fn_c_check_type ()
1824{
1825 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001828if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001829 $as_echo_n "(cached) " >&6
1830else
1831 eval "$3=no"
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833/* end confdefs.h. */
1834$4
1835int
1836main ()
1837{
1838if (sizeof ($2))
1839 return 0;
1840 ;
1841 return 0;
1842}
1843_ACEOF
1844if ac_fn_c_try_compile "$LINENO"; then :
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h. */
1847$4
1848int
1849main ()
1850{
1851if (sizeof (($2)))
1852 return 0;
1853 ;
1854 return 0;
1855}
1856_ACEOF
1857if ac_fn_c_try_compile "$LINENO"; then :
1858
1859else
1860 eval "$3=yes"
1861fi
1862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866eval ac_res=\$$3
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1868$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001869 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001870
1871} # ac_fn_c_check_type
1872
1873# ac_fn_c_find_uintX_t LINENO BITS VAR
1874# ------------------------------------
1875# Finds an unsigned integer type with width BITS, setting cache variable VAR
1876# accordingly.
1877ac_fn_c_find_uintX_t ()
1878{
1879 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1881$as_echo_n "checking for uint$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001882if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001883 $as_echo_n "(cached) " >&6
1884else
1885 eval "$3=no"
1886 # Order is important - never check a type that is potentially smaller
1887 # than half of the expected target width.
1888 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1889 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892$ac_includes_default
1893int
1894main ()
1895{
1896static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1897test_array [0] = 0
1898
1899 ;
1900 return 0;
1901}
1902_ACEOF
1903if ac_fn_c_try_compile "$LINENO"; then :
1904 case $ac_type in #(
1905 uint$2_t) :
1906 eval "$3=yes" ;; #(
1907 *) :
1908 eval "$3=\$ac_type" ;;
1909esac
1910fi
1911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001912 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914else
1915 break
1916fi
1917 done
1918fi
1919eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001922 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001923
1924} # ac_fn_c_find_uintX_t
1925
1926# ac_fn_c_find_intX_t LINENO BITS VAR
1927# -----------------------------------
1928# Finds a signed integer type with width BITS, setting cache variable VAR
1929# accordingly.
1930ac_fn_c_find_intX_t ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1934$as_echo_n "checking for int$2_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001935if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=no"
1939 # Order is important - never check a type that is potentially smaller
1940 # than half of the expected target width.
1941 for ac_type in int$2_t 'int' 'long int' \
1942 'long long int' 'short int' 'signed char'; do
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001946 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001947int
1948main ()
1949{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001950static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Kloseb9621712010-04-24 17:59:49 +00001951test_array [0] = 0
1952
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001961 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001962int
1963main ()
1964{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001965static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001966 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1967test_array [0] = 0
1968
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973if ac_fn_c_try_compile "$LINENO"; then :
1974
1975else
1976 case $ac_type in #(
1977 int$2_t) :
1978 eval "$3=yes" ;; #(
1979 *) :
1980 eval "$3=\$ac_type" ;;
1981esac
1982fi
1983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001986 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001987
1988else
1989 break
1990fi
1991 done
1992fi
1993eval ac_res=\$$3
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001997
1998} # ac_fn_c_find_intX_t
1999
2000# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2001# --------------------------------------------
2002# Tries to find the compile-time value of EXPR in a program that includes
2003# INCLUDES, setting VAR accordingly. Returns whether the value could be
2004# computed
2005ac_fn_c_compute_int ()
2006{
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 if test "$cross_compiling" = yes; then
2009 # Depending upon the size, compute the lo and hi bounds.
2010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) >= 0)];
2017test_array [0] = 0
2018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_lo=0 ac_mid=0
2025 while :; do
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027/* end confdefs.h. */
2028$4
2029int
2030main ()
2031{
2032static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2033test_array [0] = 0
2034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 ac_hi=$ac_mid; break
2041else
2042 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2043 if test $ac_lo -le $ac_mid; then
2044 ac_lo= ac_hi=
2045 break
2046 fi
2047 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050 done
2051else
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
2056main ()
2057{
2058static int test_array [1 - 2 * !(($2) < 0)];
2059test_array [0] = 0
2060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066 ac_hi=-1 ac_mid=-1
2067 while :; do
2068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2075test_array [0] = 0
2076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081if ac_fn_c_try_compile "$LINENO"; then :
2082 ac_lo=$ac_mid; break
2083else
2084 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2085 if test $ac_mid -le $ac_hi; then
2086 ac_lo= ac_hi=
2087 break
2088 fi
2089 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092 done
2093else
2094 ac_lo= ac_hi=
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099# Binary search between lo and hi bounds.
2100while test "x$ac_lo" != "x$ac_hi"; do
2101 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2109test_array [0] = 0
2110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=$ac_mid
2117else
2118 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121done
2122case $ac_lo in #((
2123?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2124'') ac_retval=1 ;;
2125esac
2126 else
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130static long int longval () { return $2; }
2131static unsigned long int ulongval () { return $2; }
2132#include <stdio.h>
2133#include <stdlib.h>
2134int
2135main ()
2136{
2137
2138 FILE *f = fopen ("conftest.val", "w");
2139 if (! f)
2140 return 1;
2141 if (($2) < 0)
2142 {
2143 long int i = longval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%ld", i);
2147 }
2148 else
2149 {
2150 unsigned long int i = ulongval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%lu", i);
2154 }
2155 /* Do not output a trailing newline, as this causes \r\n confusion
2156 on some platforms. */
2157 return ferror (f) || fclose (f) != 0;
2158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_run "$LINENO"; then :
2164 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2165else
2166 ac_retval=1
2167fi
2168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2169 conftest.$ac_objext conftest.beam conftest.$ac_ext
2170rm -f conftest.val
2171
2172 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002173 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 as_fn_set_status $ac_retval
2175
2176} # ac_fn_c_compute_int
2177
2178# ac_fn_c_check_func LINENO FUNC VAR
2179# ----------------------------------
2180# Tests whether FUNC exists, setting the cache variable VAR accordingly
2181ac_fn_c_check_func ()
2182{
2183 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2185$as_echo_n "checking for $2... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002186if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 $as_echo_n "(cached) " >&6
2188else
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2193#define $2 innocuous_$2
2194
2195/* System header to define __stub macros and hopefully few prototypes,
2196 which can conflict with char $2 (); below.
2197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2198 <limits.h> exists even on freestanding compilers. */
2199
2200#ifdef __STDC__
2201# include <limits.h>
2202#else
2203# include <assert.h>
2204#endif
2205
2206#undef $2
2207
2208/* Override any GCC internal prototype to avoid an error.
2209 Use char because int might match the return type of a GCC
2210 builtin and then its argument prototype would still apply. */
2211#ifdef __cplusplus
2212extern "C"
2213#endif
2214char $2 ();
2215/* The GNU C library defines this for functions which it implements
2216 to always fail with ENOSYS. Some functions are actually named
2217 something starting with __ and the normal name is an alias. */
2218#if defined __stub_$2 || defined __stub___$2
2219choke me
2220#endif
2221
2222int
2223main ()
2224{
2225return $2 ();
2226 ;
2227 return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_link "$LINENO"; then :
2231 eval "$3=yes"
2232else
2233 eval "$3=no"
2234fi
2235rm -f core conftest.err conftest.$ac_objext \
2236 conftest$ac_exeext conftest.$ac_ext
2237fi
2238eval ac_res=\$$3
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002242
2243} # ac_fn_c_check_func
2244
2245# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2246# ----------------------------------------------------
2247# Tries to find if the field MEMBER exists in type AGGR, after including
2248# INCLUDES, setting cache variable VAR accordingly.
2249ac_fn_c_check_member ()
2250{
2251 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2253$as_echo_n "checking for $2.$3... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002254if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002255 $as_echo_n "(cached) " >&6
2256else
2257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258/* end confdefs.h. */
2259$5
2260int
2261main ()
2262{
2263static $2 ac_aggr;
2264if (ac_aggr.$3)
2265return 0;
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$4=yes"
2272else
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274/* end confdefs.h. */
2275$5
2276int
2277main ()
2278{
2279static $2 ac_aggr;
2280if (sizeof ac_aggr.$3)
2281return 0;
2282 ;
2283 return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"; then :
2287 eval "$4=yes"
2288else
2289 eval "$4=no"
2290fi
2291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295eval ac_res=\$$4
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2297$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002299
2300} # ac_fn_c_check_member
2301
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002302# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2303# ---------------------------------------------
2304# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2305# accordingly.
Matthias Kloseb9621712010-04-24 17:59:49 +00002306ac_fn_c_check_decl ()
2307{
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002309 as_decl_name=`echo $2|sed 's/ *(.*//'`
2310 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002314 $as_echo_n "(cached) " >&6
2315else
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317/* end confdefs.h. */
2318$4
2319int
2320main ()
2321{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002322#ifndef $as_decl_name
2323#ifdef __cplusplus
2324 (void) $as_decl_use;
2325#else
2326 (void) $as_decl_name;
2327#endif
Matthias Kloseb9621712010-04-24 17:59:49 +00002328#endif
2329
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_compile "$LINENO"; then :
2335 eval "$3=yes"
2336else
2337 eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$3
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002345
2346} # ac_fn_c_check_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002348This file contains any messages produced by compilers while
2349running configure, to aid debugging if configure makes a mistake.
2350
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002351It was created by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002352generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
2354 $ $0 $@
2355
2356_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002358{
2359cat <<_ASUNAME
2360## --------- ##
2361## Platform. ##
2362## --------- ##
2363
2364hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2365uname -m = `(uname -m) 2>/dev/null || echo unknown`
2366uname -r = `(uname -r) 2>/dev/null || echo unknown`
2367uname -s = `(uname -s) 2>/dev/null || echo unknown`
2368uname -v = `(uname -v) 2>/dev/null || echo unknown`
2369
2370/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2371/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2372
2373/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2374/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2375/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002377/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2378/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2379/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2380
2381_ASUNAME
2382
2383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002388 $as_echo "PATH: $as_dir"
2389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002391
2392} >&5
2393
2394cat >&5 <<_ACEOF
2395
2396
2397## ----------- ##
2398## Core tests. ##
2399## ----------- ##
2400
2401_ACEOF
2402
2403
2404# Keep a trace of the command line.
2405# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002407# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002410ac_configure_args0=
2411ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_must_keep_next=false
2413for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002414do
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 for ac_arg
2416 do
2417 case $ac_arg in
2418 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2419 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2420 | -silent | --silent | --silen | --sile | --sil)
2421 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 esac
2425 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002430 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 case $ac_arg in
2433 *=* | --config-cache | -C | -disable-* | --disable-* \
2434 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2435 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2436 | -with-* | --with-* | -without-* | --without-* | --x)
2437 case "$ac_configure_args0 " in
2438 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2439 esac
2440 ;;
2441 -* ) ac_must_keep_next=true ;;
2442 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 ;;
2446 esac
2447 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002448done
Matthias Kloseb9621712010-04-24 17:59:49 +00002449{ ac_configure_args0=; unset ac_configure_args0;}
2450{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
2452# When interrupted or exit'd, cleanup temporary files, and complete
2453# config.log. We remove comments because anyway the quotes in there
2454# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455# WARNING: Use '\'' to represent an apostrophe within the trap.
2456# 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 +00002457trap 'exit_status=$?
2458 # Save into config.log some information that might help in debugging.
2459 {
2460 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002461
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002462 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002463## Cache variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002464## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 echo
2466 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467(
2468 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2469 eval ac_val=\$$ac_var
2470 case $ac_val in #(
2471 *${as_nl}*)
2472 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2474$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac
2476 case $ac_var in #(
2477 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2479 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac ;;
2481 esac
2482 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2485 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 "s/'\''/'\''\\\\'\'''\''/g;
2488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2489 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002490 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac |
2494 sort
2495)
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002497
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002498 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002499## Output variables. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002500## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_vars
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511
2512 if test -n "$ac_subst_files"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002513 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514## File substitutions. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002515## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 echo
2517 for ac_var in $ac_subst_files
2518 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 eval ac_val=\$$ac_var
2520 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 done | sort
2525 echo
2526 fi
2527
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 if test -s confdefs.h; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002529 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002530## confdefs.h. ##
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002531## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
2535 fi
2536 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 $as_echo "$as_me: caught signal $ac_signal"
2538 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 rm -f core *.core core.conftest.* &&
2541 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002544for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002546done
2547ac_signal=0
2548
2549# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
Matthias Kloseb9621712010-04-24 17:59:49 +00002552$as_echo "/* confdefs.h */" > confdefs.h
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554# Predefined preprocessor variables.
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_NAME "$PACKAGE_NAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_VERSION "$PACKAGE_VERSION"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_STRING "$PACKAGE_STRING"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2574_ACEOF
2575
Matthias Kloseb9621712010-04-24 17:59:49 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_URL "$PACKAGE_URL"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
2581# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002582# Prefer an explicitly selected file to automatically selected ones.
2583ac_site_file1=NONE
2584ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585if test -n "$CONFIG_SITE"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002586 # We do not want a PATH search for config.site.
2587 case $CONFIG_SITE in #((
2588 -*) ac_site_file1=./$CONFIG_SITE;;
2589 */*) ac_site_file1=$CONFIG_SITE;;
2590 *) ac_site_file1=./$CONFIG_SITE;;
2591 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 ac_site_file1=$prefix/share/config.site
2594 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595else
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$ac_default_prefix/share/config.site
2597 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002599for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600do
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 test "x$ac_site_file" = xNONE && continue
2602 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2604$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 sed 's/^/| /' "$ac_site_file" >&5
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002606 . "$ac_site_file" \
2607 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609as_fn_error $? "failed to load site script $ac_site_file
2610See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611 fi
2612done
2613
2614if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 # Some versions of bash will fail to source /dev/null (special files
2616 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2617 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2619$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2622 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 esac
2624 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625else
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2627$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 >$cache_file
2629fi
2630
2631# Check that the precious variables saved in the cache have kept the same
2632# value.
2633ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2636 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2638 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 case $ac_old_set,$ac_new_set in
2640 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2642$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 +00002643 ac_cache_corrupted=: ;;
2644 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2646$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_cache_corrupted=: ;;
2648 ,);;
2649 *)
2650 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 # differences in whitespace do not lead to failure.
2652 ac_old_val_w=`echo x $ac_old_val`
2653 ac_new_val_w=`echo x $ac_new_val`
2654 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2656$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2657 ac_cache_corrupted=:
2658 else
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2660$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2661 eval $ac_var=\$ac_old_val
2662 fi
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2664$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2666$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 fi;;
2668 esac
2669 # Pass precious variables to config.status.
2670 if test "$ac_new_set" = set; then
2671 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 *) ac_arg=$ac_var=$ac_new_val ;;
2674 esac
2675 case " $ac_configure_args " in
2676 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 esac
2679 fi
2680done
2681if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2685$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002686 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002688## -------------------- ##
2689## Main body of script. ##
2690## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691
Guido van Rossum7f43da71994-08-01 12:15:30 +00002692ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2696ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697
Guido van Rossum627b2d71993-12-24 10:39:16 +00002698
Michael W. Hudson54241132001-12-07 15:38:26 +00002699
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002701
2702
Martin v. Löwis11437992002-04-12 09:54:03 +00002703
Benjamin Petersond23f8222009-04-05 19:13:16 +00002704if test "$prefix" != "/"; then
2705 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2706fi
2707
2708
Martin v. Löwis11437992002-04-12 09:54:03 +00002709
2710
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002711# We don't use PACKAGE_ variables, and they cause conflicts
2712# with other autoconf-based packages that include Python.h
2713grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2714rm confdefs.h
2715mv confdefs.h.new confdefs.h
2716
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002717
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002718VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002719
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002720# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002721
2722SOVERSION=1.0
2723
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002724# The later defininition of _XOPEN_SOURCE disables certain features
2725# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2726
Matthias Kloseb9621712010-04-24 17:59:49 +00002727$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002728
2729
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002730# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2731# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2732# them.
2733
Matthias Kloseb9621712010-04-24 17:59:49 +00002734$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002735
2736
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002737# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2738# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2739# them.
2740
Matthias Kloseb9621712010-04-24 17:59:49 +00002741$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002742
2743
Martin v. Löwisd6320502004-08-12 13:45:08 +00002744# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2745# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2746
Matthias Kloseb9621712010-04-24 17:59:49 +00002747$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002748
2749
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002750# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2751# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2752# them.
2753
Matthias Kloseb9621712010-04-24 17:59:49 +00002754$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002755
2756
2757
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002758define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002759
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002760# Arguments passed to configure.
2761
2762CONFIG_ARGS="$ac_configure_args"
2763
Matthias Kloseb9621712010-04-24 17:59:49 +00002764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2765$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002767if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002769 case $enableval in
2770 yes)
2771 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002772 if test ! -d "${enableval}"
2773 then
2774 enableval=/
2775 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002776 ;;
2777 esac
2778 case $enableval in
2779 no)
2780 UNIVERSALSDK=
2781 enable_universalsdk=
2782 ;;
2783 *)
2784 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002785 if test ! -d "${UNIVERSALSDK}"
2786 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002787 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002788 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002789 ;;
2790 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002791
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002792
Thomas Wouters477c8d52006-05-27 19:21:47 +00002793else
2794
2795 UNIVERSALSDK=
2796 enable_universalsdk=
2797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002799
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002800if test -n "${UNIVERSALSDK}"
2801then
Matthias Kloseb9621712010-04-24 17:59:49 +00002802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2803$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002804else
Matthias Kloseb9621712010-04-24 17:59:49 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2806$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002807fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002809
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002810
2811
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002812UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002813
Matthias Kloseb9621712010-04-24 17:59:49 +00002814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2815$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002816
2817# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002818if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002819 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00002820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2821$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002822 UNIVERSAL_ARCHS="$withval"
2823
2824else
2825
Matthias Kloseb9621712010-04-24 17:59:49 +00002826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2827$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002828
2829fi
2830
2831
2832
2833
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002834
2835# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002836if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002837 withval=$with_framework_name;
2838 PYTHONFRAMEWORK=${withval}
2839 PYTHONFRAMEWORKDIR=${withval}.framework
2840 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2841
2842else
2843
2844 PYTHONFRAMEWORK=Python
2845 PYTHONFRAMEWORKDIR=Python.framework
2846 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2847
2848fi
2849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002850# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002851if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002852 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002853 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002855 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002856 esac
2857 case $enableval in
2858 no)
2859 PYTHONFRAMEWORK=
2860 PYTHONFRAMEWORKDIR=no-framework
2861 PYTHONFRAMEWORKPREFIX=
2862 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002863 FRAMEWORKINSTALLFIRST=
2864 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002865 FRAMEWORKALTINSTALLFIRST=
2866 FRAMEWORKALTINSTALLLAST=
2867 if test "x${prefix}" = "xNONE"; then
2868 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2869 else
2870 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2871 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002872 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002873 ;;
2874 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002875 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002876 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002877 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002878 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00002879 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2880 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002881 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002882
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002883 if test "x${prefix}" = "xNONE" ; then
2884 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002885
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002886 else
2887 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2888 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002889
2890 case "${enableval}" in
2891 /System*)
2892 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2893 if test "${prefix}" = "NONE" ; then
2894 # See below
2895 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2896 fi
2897 ;;
2898
2899 /Library*)
2900 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2901 ;;
2902
2903 */Library/Frameworks)
2904 MDIR="`dirname "${enableval}"`"
2905 MDIR="`dirname "${MDIR}"`"
2906 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2907
2908 if test "${prefix}" = "NONE"; then
2909 # User hasn't specified the
2910 # --prefix option, but wants to install
2911 # the framework in a non-default location,
2912 # ensure that the compatibility links get
2913 # installed relative to that prefix as well
2914 # instead of in /usr/local.
2915 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2916 fi
2917 ;;
2918
2919 *)
2920 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2921 ;;
2922 esac
2923
Jack Jansen127e56e2001-09-11 14:41:54 +00002924 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002925
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002926 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002927 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002928 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002930 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002931
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002932 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2933
2934 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2935
Jack Jansene578a632001-08-15 01:27:14 +00002936 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Guido van Rossum563e7081996-09-10 18:20:48 +00002938else
Martin v. Löwis11437992002-04-12 09:54:03 +00002939
Jack Jansene578a632001-08-15 01:27:14 +00002940 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002941 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002942 PYTHONFRAMEWORKPREFIX=
2943 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002944 FRAMEWORKINSTALLFIRST=
2945 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002946 FRAMEWORKALTINSTALLFIRST=
2947 FRAMEWORKALTINSTALLLAST=
2948 if test "x${prefix}" = "xNONE" ; then
2949 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2950 else
2951 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2952 fi
Jack Jansene578a632001-08-15 01:27:14 +00002953 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002954
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002956fi
2957
Thomas Wouters477c8d52006-05-27 19:21:47 +00002958
2959
Michael W. Hudson54241132001-12-07 15:38:26 +00002960
2961
2962
2963
Jack Jansene578a632001-08-15 01:27:14 +00002964
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002965
2966
2967
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002968
Ronald Oussoren86b33c82010-04-30 11:41:56 +00002969
Jack Jansene578a632001-08-15 01:27:14 +00002970##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00002971## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00002972## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002973##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002974# Set name for machine-dependent library files
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2977$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002978if test -z "$MACHDEP"
2979then
Guido van Rossum563e7081996-09-10 18:20:48 +00002980 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002981 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002982 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002983 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002984 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002985 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002986 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002987 ac_md_system=`echo $ac_sys_system |
2988 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2989 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002990 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002991 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002992
Guido van Rossum07397971997-04-29 21:49:50 +00002993 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002994 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002995 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002996 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002997 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002998 esac
2999fi
Guido van Rossum91922671997-10-09 20:24:13 +00003000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003001# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3002# disable features if it is defined, without any means to access these
3003# features as extensions. For these systems, we skip the definition of
3004# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3005# some feature, make sure there is no alternative way to access this
3006# feature. Also, when using wildcards, make sure you have verified the
3007# need for not defining _XOPEN_SOURCE on all systems matching the
3008# wildcard, and that the wildcard does not include future systems
3009# (which may remove their limitations).
3010case $ac_sys_system/$ac_sys_release in
3011 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3012 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003013 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003014 # In addition, Stefan Krah confirms that issue #1244610 exists through
3015 # OpenBSD 4.6, but is fixed in 4.7.
3016 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003017 define_xopen_source=no
3018 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3019 # also defined. This can be overridden by defining _BSD_SOURCE
3020 # As this has a different meaning on Linux, only define it on OpenBSD
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003023
3024 ;;
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003025 OpenBSD/4.[789])
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003026 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3027 # also defined. This can be overridden by defining _BSD_SOURCE
3028 # As this has a different meaning on Linux, only define it on OpenBSD
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003031
3032 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003033 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3034 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3035 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003036 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 +00003037 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003038 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3039 # request to enable features supported by the standard as a request
3040 # to disable features not supported by the standard. The best way
3041 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3042 # entirely and define __EXTENSIONS__ instead.
3043 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003044 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003045 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3046 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003047 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003048 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003049 define_xopen_source=no;;
3050 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003051 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003052 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003053 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003054 # On FreeBSD 4, the math functions C89 does not cover are never defined
3055 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3056 FreeBSD/4.*)
3057 define_xopen_source=no;;
3058 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3059 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3060 # identifies itself as Darwin/7.*
3061 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3062 # disables platform specific features beyond repair.
3063 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3064 # has no effect, don't bother defining them
3065 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003066 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003067 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003068 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003069 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3070 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3071 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003072 AIX/4)
3073 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003074 AIX/5)
3075 if test `uname -r` -eq 1; then
3076 define_xopen_source=no
3077 fi
3078 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003079 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3080 # defining NI_NUMERICHOST.
3081 QNX/6.3.2)
3082 define_xopen_source=no
3083 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003084
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003085esac
3086
3087if test $define_xopen_source = yes
3088then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003089
Matthias Kloseb9621712010-04-24 17:59:49 +00003090$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003091
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003092
3093 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3094 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3095 # several APIs are not declared. Since this is also needed in some
3096 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003097
Matthias Kloseb9621712010-04-24 17:59:49 +00003098$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003099
3100
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003101
Matthias Kloseb9621712010-04-24 17:59:49 +00003102$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003103
3104
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003105fi
3106
Guido van Rossum91922671997-10-09 20:24:13 +00003107#
3108# SGI compilers allow the specification of the both the ABI and the
3109# ISA on the command line. Depending on the values of these switches,
3110# different and often incompatable code will be generated.
3111#
3112# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3113# thus supply support for various ABI/ISA combinations. The MACHDEP
3114# variable is also adjusted.
3115#
3116
3117if test ! -z "$SGI_ABI"
3118then
3119 CC="cc $SGI_ABI"
3120 LDFLAGS="$SGI_ABI $LDFLAGS"
3121 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3124$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003125
Jack Jansen6b08a402004-06-03 12:41:45 +00003126# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3127# it may influence the way we can build extensions, so distutils
3128# needs to check it
3129
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130
Jack Jansen6b08a402004-06-03 12:41:45 +00003131CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003133
Matthias Kloseb9621712010-04-24 17:59:49 +00003134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3135$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003136ac_sys_machine=`uname -m`
Matthias Kloseb9621712010-04-24 17:59:49 +00003137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3138$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00003139
Guido van Rossum627b2d71993-12-24 10:39:16 +00003140# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003141
3142# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3143# for debug/optimization stuff. BASECFLAGS is for flags that are required
3144# just to get things to compile and link. Users are free to override OPT
3145# when running configure or make. The build should not break if they do.
3146# BASECFLAGS should generally not be messed with, however.
3147
3148# XXX shouldn't some/most/all of this code be merged with the stuff later
3149# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3151$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003153# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003154if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003156 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003157 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003158 without_gcc=yes;;
3159 yes) CC=gcc
3160 without_gcc=no;;
3161 *) CC=$withval
3162 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003163 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003164else
Martin v. Löwis11437992002-04-12 09:54:03 +00003165
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003166 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003167 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003168 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003169 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003170 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171fi
3172
Matthias Kloseb9621712010-04-24 17:59:49 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3174$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003175
Guido van Rossum8b131c51995-03-09 14:10:13 +00003176# If the user switches compilers, we can't believe the cache
3177if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3178then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003179 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003180(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003181fi
3182
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003183# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3184# when the compiler supports them, but we don't always want -O2, and
3185# we set -g later.
3186if test -z "$CFLAGS"; then
3187 CFLAGS=
3188fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003189ac_ext=c
3190ac_cpp='$CPP $CPPFLAGS'
3191ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3192ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3193ac_compiler_gnu=$ac_cv_c_compiler_gnu
3194if test -n "$ac_tool_prefix"; then
3195 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3196set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3198$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003199if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003200 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003201else
3202 if test -n "$CC"; then
3203 ac_cv_prog_CC="$CC" # Let the user override the test.
3204else
Martin v. Löwis11437992002-04-12 09:54:03 +00003205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3206for as_dir in $PATH
3207do
3208 IFS=$as_save_IFS
3209 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003210 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211 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 +00003212 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003213 $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 +00003214 break 2
3215 fi
3216done
Matthias Kloseb9621712010-04-24 17:59:49 +00003217 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003219
Jack Jansendd19cf82001-12-06 22:36:17 +00003220fi
3221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003222CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003223if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3225$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003226else
Matthias Kloseb9621712010-04-24 17:59:49 +00003227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3228$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003229fi
3230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231
Martin v. Löwis11437992002-04-12 09:54:03 +00003232fi
3233if test -z "$ac_cv_prog_CC"; then
3234 ac_ct_CC=$CC
3235 # Extract the first word of "gcc", so it can be a program name with args.
3236set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3238$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003239if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003240 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003241else
3242 if test -n "$ac_ct_CC"; then
3243 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3244else
3245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3246for as_dir in $PATH
3247do
3248 IFS=$as_save_IFS
3249 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003250 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 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 +00003252 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003253 $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 +00003254 break 2
3255 fi
3256done
Matthias Kloseb9621712010-04-24 17:59:49 +00003257 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003259
3260fi
3261fi
3262ac_ct_CC=$ac_cv_prog_ac_ct_CC
3263if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3265$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003266else
Matthias Kloseb9621712010-04-24 17:59:49 +00003267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3268$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003269fi
3270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271 if test "x$ac_ct_CC" = x; then
3272 CC=""
3273 else
3274 case $cross_compiling:$ac_tool_warned in
3275yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003276{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3277$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278ac_tool_warned=yes ;;
3279esac
3280 CC=$ac_ct_CC
3281 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003282else
3283 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003284fi
3285
Jack Jansendd19cf82001-12-06 22:36:17 +00003286if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287 if test -n "$ac_tool_prefix"; then
3288 # 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 +00003289set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3291$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003292if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003293 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003294else
3295 if test -n "$CC"; then
3296 ac_cv_prog_CC="$CC" # Let the user override the test.
3297else
Martin v. Löwis11437992002-04-12 09:54:03 +00003298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3299for as_dir in $PATH
3300do
3301 IFS=$as_save_IFS
3302 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003303 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304 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 +00003305 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003306 $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 +00003307 break 2
3308 fi
3309done
Matthias Kloseb9621712010-04-24 17:59:49 +00003310 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003312
3313fi
3314fi
3315CC=$ac_cv_prog_CC
3316if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3318$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003319else
Matthias Kloseb9621712010-04-24 17:59:49 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3321$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322fi
3323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324
Martin v. Löwis11437992002-04-12 09:54:03 +00003325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003326fi
3327if test -z "$CC"; then
3328 # Extract the first word of "cc", so it can be a program name with args.
3329set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3331$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003332if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003333 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003334else
3335 if test -n "$CC"; then
3336 ac_cv_prog_CC="$CC" # Let the user override the test.
3337else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3340for as_dir in $PATH
3341do
3342 IFS=$as_save_IFS
3343 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003344 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003345 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 +00003346 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3347 ac_prog_rejected=yes
3348 continue
3349 fi
3350 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003351 $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 +00003352 break 2
3353 fi
3354done
Matthias Kloseb9621712010-04-24 17:59:49 +00003355 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003357
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003358if test $ac_prog_rejected = yes; then
3359 # We found a bogon in the path, so make sure we never use it.
3360 set dummy $ac_cv_prog_CC
3361 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003362 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363 # We chose a different compiler from the bogus one.
3364 # However, it has the same basename, so the bogon will be chosen
3365 # first if we set CC to just the basename; use the full file name.
3366 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003367 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003368 fi
3369fi
3370fi
3371fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003372CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3375$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003376else
Matthias Kloseb9621712010-04-24 17:59:49 +00003377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3378$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003379fi
3380
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003381
Martin v. Löwis11437992002-04-12 09:54:03 +00003382fi
3383if test -z "$CC"; then
3384 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003386 do
3387 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3388set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3390$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003391if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003392 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003393else
3394 if test -n "$CC"; then
3395 ac_cv_prog_CC="$CC" # Let the user override the test.
3396else
Martin v. Löwis11437992002-04-12 09:54:03 +00003397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3398for as_dir in $PATH
3399do
3400 IFS=$as_save_IFS
3401 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003402 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003403 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 +00003404 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003405 $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 +00003406 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003407 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003408done
Matthias Kloseb9621712010-04-24 17:59:49 +00003409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003411
3412fi
3413fi
3414CC=$ac_cv_prog_CC
3415if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3417$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003418else
Matthias Kloseb9621712010-04-24 17:59:49 +00003419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3420$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003421fi
3422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003423
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 test -n "$CC" && break
3425 done
3426fi
3427if test -z "$CC"; then
3428 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003429 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003430do
3431 # Extract the first word of "$ac_prog", so it can be a program name with args.
3432set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3434$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003435if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003437else
3438 if test -n "$ac_ct_CC"; then
3439 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3440else
3441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3442for as_dir in $PATH
3443do
3444 IFS=$as_save_IFS
3445 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003446 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447 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 +00003448 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003449 $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 +00003450 break 2
3451 fi
3452done
Matthias Kloseb9621712010-04-24 17:59:49 +00003453 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003454IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003455
Martin v. Löwis11437992002-04-12 09:54:03 +00003456fi
3457fi
3458ac_ct_CC=$ac_cv_prog_ac_ct_CC
3459if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3461$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003462else
Matthias Kloseb9621712010-04-24 17:59:49 +00003463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003465fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 test -n "$ac_ct_CC" && break
3469done
Michael W. Hudson54241132001-12-07 15:38:26 +00003470
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003471 if test "x$ac_ct_CC" = x; then
3472 CC=""
3473 else
3474 case $cross_compiling:$ac_tool_warned in
3475yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478ac_tool_warned=yes ;;
3479esac
3480 CC=$ac_ct_CC
3481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003482fi
3483
3484fi
3485
3486
Matthias Kloseb9621712010-04-24 17:59:49 +00003487test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003489as_fn_error $? "no acceptable C compiler found in \$PATH
3490See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003491
3492# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003493$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3494set X $ac_compile
3495ac_compiler=$2
3496for ac_option in --version -v -V -qversion; do
3497 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003498case "(($ac_try" in
3499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3500 *) ac_try_echo=$ac_try;;
3501esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3503$as_echo "$ac_try_echo"; } >&5
3504 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003505 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003506 if test -s conftest.err; then
3507 sed '10a\
3508... rest of stderr output deleted ...
3509 10q' conftest.err >conftest.er1
3510 cat conftest.er1 >&5
3511 fi
3512 rm -f conftest.er1 conftest.err
3513 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3514 test $ac_status = 0; }
3515done
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Matthias Kloseb9621712010-04-24 17:59:49 +00003517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003518/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003519
Martin v. Löwis11437992002-04-12 09:54:03 +00003520int
3521main ()
3522{
3523
3524 ;
3525 return 0;
3526}
3527_ACEOF
3528ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003529ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003530# Try to create an executable without -o first, disregard a.out.
3531# It will help us diagnose broken compilers, and finding out an intuition
3532# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3534$as_echo_n "checking whether the C compiler works... " >&6; }
3535ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3536
3537# The possible output files:
3538ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540ac_rmfiles=
3541for ac_file in $ac_files
3542do
3543 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003545 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3546 esac
3547done
3548rm -f $ac_rmfiles
3549
Matthias Kloseb9621712010-04-24 17:59:49 +00003550if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551case "(($ac_try" in
3552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3553 *) ac_try_echo=$ac_try;;
3554esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3556$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3560 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3562# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3563# in a Makefile. We should not override ac_cv_exeext if it was cached,
3564# so that the user can short-circuit this test for compilers unknown to
3565# Autoconf.
3566for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003567do
3568 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003571 ;;
3572 [ab].out )
3573 # We found the default executable, but exeext='' is most
3574 # certainly right.
3575 break;;
3576 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003578 then :; else
3579 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3580 fi
3581 # We set ac_cv_exeext here because the later test for it is not
3582 # safe: cross compilers may not add the suffix if given an `-o'
3583 # argument, so we may need to know it at that point already.
3584 # Even if this section looks crufty: it has the advantage of
3585 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003586 break;;
3587 * )
3588 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 esac
3590done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591test "$ac_cv_exeext" = no && ac_cv_exeext=
3592
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003593else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594 ac_file=''
3595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003596if test -z "$ac_file"; then :
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598$as_echo "no" >&6; }
3599$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003600sed 's/^/| /' conftest.$ac_ext >&5
3601
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003604as_fn_error 77 "C compiler cannot create executables
3605See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003606else
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3608$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3611$as_echo_n "checking for C compiler default output file name... " >&6; }
3612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3613$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003614ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003615
Matthias Kloseb9621712010-04-24 17:59:49 +00003616rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003617ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3619$as_echo_n "checking for suffix of executables... " >&6; }
3620if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621case "(($ac_try" in
3622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3623 *) ac_try_echo=$ac_try;;
3624esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3626$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3630 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003631 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3632# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3633# work properly (i.e., refer to `conftest.exe'), while it won't with
3634# `rm'.
3635for ac_file in conftest.exe conftest conftest.*; do
3636 test -f "$ac_file" || continue
3637 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003639 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3640 break;;
3641 * ) break;;
3642 esac
3643done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003644else
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003647as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3648See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003650rm -f conftest conftest$ac_cv_exeext
3651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3652$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003653
3654rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003655EXEEXT=$ac_cv_exeext
3656ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3658/* end confdefs.h. */
3659#include <stdio.h>
3660int
3661main ()
3662{
3663FILE *f = fopen ("conftest.out", "w");
3664 return ferror (f) || fclose (f) != 0;
3665
3666 ;
3667 return 0;
3668}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003670ac_clean_files="$ac_clean_files conftest.out"
3671# Check that the compiler produces executables we can run. If not, either
3672# the compiler is broken, or we cross compile.
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3674$as_echo_n "checking whether we are cross compiling... " >&6; }
3675if test "$cross_compiling" != yes; then
3676 { { ac_try="$ac_link"
3677case "(($ac_try" in
3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
3681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3682$as_echo "$ac_try_echo"; } >&5
3683 (eval "$ac_link") 2>&5
3684 ac_status=$?
3685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3686 test $ac_status = 0; }
3687 if { ac_try='./conftest$ac_cv_exeext'
3688 { { case "(($ac_try" in
3689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3690 *) ac_try_echo=$ac_try;;
3691esac
3692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3693$as_echo "$ac_try_echo"; } >&5
3694 (eval "$ac_try") 2>&5
3695 ac_status=$?
3696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3697 test $ac_status = 0; }; }; then
3698 cross_compiling=no
3699 else
3700 if test "$cross_compiling" = maybe; then
3701 cross_compiling=yes
3702 else
3703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003705as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003706If you meant to cross compile, use \`--host'.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003707See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 fi
3709 fi
3710fi
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3712$as_echo "$cross_compiling" >&6; }
3713
3714rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3715ac_clean_files=$ac_clean_files_save
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3717$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003718if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $as_echo_n "(cached) " >&6
3720else
3721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003722/* end confdefs.h. */
3723
3724int
3725main ()
3726{
3727
3728 ;
3729 return 0;
3730}
3731_ACEOF
3732rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00003733if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734case "(($ac_try" in
3735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3736 *) ac_try_echo=$ac_try;;
3737esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003738eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3739$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003740 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003741 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3743 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744 for ac_file in conftest.o conftest.obj conftest.*; do
3745 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3749 break;;
3750 esac
3751done
3752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003754sed 's/^/| /' conftest.$ac_ext >&5
3755
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003758as_fn_error $? "cannot compute suffix of object files: cannot compile
3759See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003761rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3764$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003765OBJEXT=$ac_cv_objext
3766ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3768$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003769if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003771else
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775int
3776main ()
3777{
3778#ifndef __GNUC__
3779 choke me
3780#endif
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_compiler_gnu=yes
3788else
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003792ac_cv_c_compiler_gnu=$ac_compiler_gnu
3793
3794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3796$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3797if test $ac_compiler_gnu = yes; then
3798 GCC=yes
3799else
3800 GCC=
3801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802ac_test_CFLAGS=${CFLAGS+set}
3803ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00003804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3805$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003806if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003808else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809 ac_save_c_werror_flag=$ac_c_werror_flag
3810 ac_c_werror_flag=yes
3811 ac_cv_prog_cc_g=no
3812 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003814/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816int
3817main ()
3818{
3819
3820 ;
3821 return 0;
3822}
3823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003824if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003825 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003826else
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 CFLAGS=""
3828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829/* end confdefs.h. */
3830
3831int
3832main ()
3833{
3834
3835 ;
3836 return 0;
3837}
3838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003839if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840
Matthias Kloseb9621712010-04-24 17:59:49 +00003841else
3842 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845/* end confdefs.h. */
3846
3847int
3848main ()
3849{
3850
3851 ;
3852 return 0;
3853}
3854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003855if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3863 ac_c_werror_flag=$ac_save_c_werror_flag
3864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3866$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003868 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003869elif test $ac_cv_prog_cc_g = yes; then
3870 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003871 CFLAGS="-g -O2"
3872 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003873 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003874 fi
3875else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003876 if test "$GCC" = yes; then
3877 CFLAGS="-O2"
3878 else
3879 CFLAGS=
3880 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3883$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00003884if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003886else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003888ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00003889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003890/* end confdefs.h. */
3891#include <stdarg.h>
3892#include <stdio.h>
3893#include <sys/types.h>
3894#include <sys/stat.h>
3895/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3896struct buf { int x; };
3897FILE * (*rcsopen) (struct buf *, struct stat *, int);
3898static char *e (p, i)
3899 char **p;
3900 int i;
3901{
3902 return p[i];
3903}
3904static char *f (char * (*g) (char **, int), char **p, ...)
3905{
3906 char *s;
3907 va_list v;
3908 va_start (v,p);
3909 s = g (p, va_arg (v,int));
3910 va_end (v);
3911 return s;
3912}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003913
3914/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3915 function prototypes and stuff, but not '\xHH' hex character constants.
3916 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003918 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3919 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003921int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3924 inside strings and character constants. */
3925#define FOO(x) 'x'
3926int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3927
Skip Montanaro6dead952003-09-25 14:50:04 +00003928int test (int i, double x);
3929struct s1 {int (*f) (int a);};
3930struct s2 {int (*f) (double a);};
3931int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3932int argc;
3933char **argv;
3934int
3935main ()
3936{
3937return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3938 ;
3939 return 0;
3940}
3941_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3943 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003944do
3945 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003948fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949rm -f core conftest.err conftest.$ac_objext
3950 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003951done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003952rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003953CC=$ac_save_CC
3954
3955fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956# AC_CACHE_VAL
3957case "x$ac_cv_prog_cc_c89" in
3958 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3960$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3963$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003964 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3967$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00003970
Matthias Kloseb9621712010-04-24 17:59:49 +00003971fi
Skip Montanaro6dead952003-09-25 14:50:04 +00003972
Martin v. Löwis11437992002-04-12 09:54:03 +00003973ac_ext=c
3974ac_cpp='$CPP $CPPFLAGS'
3975ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3976ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3977ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003978
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003979
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003980
3981
Matthias Kloseb9621712010-04-24 17:59:49 +00003982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
3983$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003986if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003988
3989 case $withval in
3990 no) with_cxx_main=no
3991 MAINCC='$(CC)';;
3992 yes) with_cxx_main=yes
3993 MAINCC='$(CXX)';;
3994 *) with_cxx_main=yes
3995 MAINCC=$withval
3996 if test -z "$CXX"
3997 then
3998 CXX=$withval
3999 fi;;
4000 esac
4001else
4002
4003 with_cxx_main=no
4004 MAINCC='$(CC)'
4005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006fi
4007
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4009$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004010
4011preset_cxx="$CXX"
4012if test -z "$CXX"
4013then
4014 case "$CC" in
4015 gcc) # Extract the first word of "g++", so it can be a program name with args.
4016set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4018$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004019if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004020 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004021else
4022 case $CXX in
4023 [\\/]* | ?:[\\/]*)
4024 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4025 ;;
4026 *)
4027 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4028for as_dir in notfound
4029do
4030 IFS=$as_save_IFS
4031 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033 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 +00004034 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004036 break 2
4037 fi
4038done
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004041
4042 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4043 ;;
4044esac
4045fi
4046CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004047if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4049$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004050else
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4052$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004054
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004055 ;;
4056 cc) # Extract the first word of "c++", so it can be a program name with args.
4057set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4059$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004060if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004062else
4063 case $CXX in
4064 [\\/]* | ?:[\\/]*)
4065 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4066 ;;
4067 *)
4068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in notfound
4070do
4071 IFS=$as_save_IFS
4072 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074 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 +00004075 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004077 break 2
4078 fi
4079done
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004082
4083 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4084 ;;
4085esac
4086fi
4087CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004088if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4090$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004091else
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4093$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004096 ;;
4097 esac
4098 if test "$CXX" = "notfound"
4099 then
4100 CXX=""
4101 fi
4102fi
4103if test -z "$CXX"
4104then
4105 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4106do
4107 # Extract the first word of "$ac_prog", so it can be a program name with args.
4108set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4110$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004111if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004113else
4114 if test -n "$CXX"; then
4115 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4116else
4117as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118for as_dir in $PATH
4119do
4120 IFS=$as_save_IFS
4121 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 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 +00004124 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004126 break 2
4127 fi
4128done
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004131
4132fi
4133fi
4134CXX=$ac_cv_prog_CXX
4135if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4137$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4140$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004141fi
4142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004144 test -n "$CXX" && break
4145done
4146test -n "$CXX" || CXX="notfound"
4147
4148 if test "$CXX" = "notfound"
4149 then
4150 CXX=""
4151 fi
4152fi
4153if test "$preset_cxx" != "$CXX"
4154then
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004156
4157 By default, distutils will build C++ extension modules with \"$CXX\".
4158 If this is not intended, then set CXX on the configure command line.
4159 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004160$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004161
4162 By default, distutils will build C++ extension modules with \"$CXX\".
4163 If this is not intended, then set CXX on the configure command line.
4164 " >&2;}
4165fi
4166
4167
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004168# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004169
4170ac_ext=c
4171ac_cpp='$CPP $CPPFLAGS'
4172ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4173ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4174ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4176$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004177# On Suns, sometimes $CPP names a directory.
4178if test -n "$CPP" && test -d "$CPP"; then
4179 CPP=
4180fi
4181if test -z "$CPP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004182 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004184else
Martin v. Löwis11437992002-04-12 09:54:03 +00004185 # Double quotes because CPP needs to be expanded
4186 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4187 do
4188 ac_preproc_ok=false
4189for ac_c_preproc_warn_flag in '' yes
4190do
4191 # Use a header file that comes with gcc, so configuring glibc
4192 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004193 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4194 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004195 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
4199#ifdef __STDC__
4200# include <limits.h>
4201#else
4202# include <assert.h>
4203#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004204 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004207
Matthias Kloseb9621712010-04-24 17:59:49 +00004208else
Martin v. Löwis11437992002-04-12 09:54:03 +00004209 # Broken: fails on valid input.
4210continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004211fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004212rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004213
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004214 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004218#include <ac_nonexistent.h>
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004221 # Broken: success on invalid input.
4222continue
4223else
Martin v. Löwis11437992002-04-12 09:54:03 +00004224 # Passes both tests.
4225ac_preproc_ok=:
4226break
4227fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004228rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
4230done
4231# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004232rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 break
4235fi
4236
4237 done
4238 ac_cv_prog_CPP=$CPP
4239
4240fi
4241 CPP=$ac_cv_prog_CPP
4242else
4243 ac_cv_prog_CPP=$CPP
4244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4246$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004247ac_preproc_ok=false
4248for ac_c_preproc_warn_flag in '' yes
4249do
4250 # Use a header file that comes with gcc, so configuring glibc
4251 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004252 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4253 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # On the NeXT, cc -E runs the code through the compiler's parser,
4255 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#ifdef __STDC__
4259# include <limits.h>
4260#else
4261# include <assert.h>
4262#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004263 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004265if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004266
Matthias Kloseb9621712010-04-24 17:59:49 +00004267else
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 # Broken: fails on valid input.
4269continue
4270fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004271rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004277#include <ac_nonexistent.h>
4278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004279if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 # Broken: success on invalid input.
4281continue
4282else
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 # Passes both tests.
4284ac_preproc_ok=:
4285break
4286fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004287rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004288
4289done
4290# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004291rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004292if $ac_preproc_ok; then :
4293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294else
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004297as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4298See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004299fi
4300
4301ac_ext=c
4302ac_cpp='$CPP $CPPFLAGS'
4303ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4304ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4305ac_compiler_gnu=$ac_cv_c_compiler_gnu
4306
4307
Matthias Kloseb9621712010-04-24 17:59:49 +00004308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4309$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004310if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004311 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004312else
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 # Loop through the user's path and test for each of PROGNAME-LIST
4316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4318do
4319 IFS=$as_save_IFS
4320 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004321 for ac_prog in grep ggrep; do
4322 for ac_exec_ext in '' $ac_executable_extensions; do
4323 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4324 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4325# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 # Check for GNU $ac_path_GREP
4327case `"$ac_path_GREP" --version 2>&1` in
4328*GNU*)
4329 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4330*)
4331 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 while :
4334 do
4335 cat "conftest.in" "conftest.in" >"conftest.tmp"
4336 mv "conftest.tmp" "conftest.in"
4337 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4340 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4343 # Best one so far, save it but keep looking for a better one
4344 ac_cv_path_GREP="$ac_path_GREP"
4345 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004346 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 # 10*(2^10) chars as input seems more than enough
4348 test $ac_count -gt 10 && break
4349 done
4350 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4351esac
4352
Matthias Kloseb9621712010-04-24 17:59:49 +00004353 $ac_path_GREP_found && break 3
4354 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 if test -z "$ac_cv_path_GREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004359 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 +00004360 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361else
4362 ac_cv_path_GREP=$GREP
4363fi
4364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4367$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004368 GREP="$ac_cv_path_GREP"
4369
4370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4372$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004373if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375else
4376 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4377 then ac_cv_path_EGREP="$GREP -E"
4378 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004381 # Loop through the user's path and test for each of PROGNAME-LIST
4382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4384do
4385 IFS=$as_save_IFS
4386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 for ac_prog in egrep; do
4388 for ac_exec_ext in '' $ac_executable_extensions; do
4389 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4390 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4391# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 # Check for GNU $ac_path_EGREP
4393case `"$ac_path_EGREP" --version 2>&1` in
4394*GNU*)
4395 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4396*)
4397 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004398 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004399 while :
4400 do
4401 cat "conftest.in" "conftest.in" >"conftest.tmp"
4402 mv "conftest.tmp" "conftest.in"
4403 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4406 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004407 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004408 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4409 # Best one so far, save it but keep looking for a better one
4410 ac_cv_path_EGREP="$ac_path_EGREP"
4411 ac_path_EGREP_max=$ac_count
4412 fi
4413 # 10*(2^10) chars as input seems more than enough
4414 test $ac_count -gt 10 && break
4415 done
4416 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4417esac
4418
Matthias Kloseb9621712010-04-24 17:59:49 +00004419 $ac_path_EGREP_found && break 3
4420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004421 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004423IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004424 if test -z "$ac_cv_path_EGREP"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004425 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 +00004426 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004427else
4428 ac_cv_path_EGREP=$EGREP
4429fi
4430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 fi
4432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4434$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004436
4437
Matthias Kloseb9621712010-04-24 17:59:49 +00004438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4439$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004440if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 $as_echo_n "(cached) " >&6
4442else
4443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004444/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004445#include <stdlib.h>
4446#include <stdarg.h>
4447#include <string.h>
4448#include <float.h>
4449
4450int
4451main ()
4452{
4453
4454 ;
4455 return 0;
4456}
4457_ACEOF
4458if ac_fn_c_try_compile "$LINENO"; then :
4459 ac_cv_header_stdc=yes
4460else
4461 ac_cv_header_stdc=no
4462fi
4463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464
4465if test $ac_cv_header_stdc = yes; then
4466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h. */
4469#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004470
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004471_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004474
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004475else
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004477fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004478rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004479
Matthias Kloseb9621712010-04-24 17:59:49 +00004480fi
4481
4482if test $ac_cv_header_stdc = yes; then
4483 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4485/* end confdefs.h. */
4486#include <stdlib.h>
4487
4488_ACEOF
4489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4490 $EGREP "free" >/dev/null 2>&1; then :
4491
4492else
4493 ac_cv_header_stdc=no
4494fi
4495rm -f conftest*
4496
4497fi
4498
4499if test $ac_cv_header_stdc = yes; then
4500 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4501 if test "$cross_compiling" = yes; then :
4502 :
4503else
4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4505/* end confdefs.h. */
4506#include <ctype.h>
4507#include <stdlib.h>
4508#if ((' ' & 0x0FF) == 0x020)
4509# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4510# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4511#else
4512# define ISLOWER(c) \
4513 (('a' <= (c) && (c) <= 'i') \
4514 || ('j' <= (c) && (c) <= 'r') \
4515 || ('s' <= (c) && (c) <= 'z'))
4516# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4517#endif
4518
4519#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4520int
4521main ()
4522{
4523 int i;
4524 for (i = 0; i < 256; i++)
4525 if (XOR (islower (i), ISLOWER (i))
4526 || toupper (i) != TOUPPER (i))
4527 return 2;
4528 return 0;
4529}
4530_ACEOF
4531if ac_fn_c_try_run "$LINENO"; then :
4532
4533else
4534 ac_cv_header_stdc=no
4535fi
4536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4537 conftest.$ac_objext conftest.beam conftest.$ac_ext
4538fi
4539
4540fi
4541fi
4542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4543$as_echo "$ac_cv_header_stdc" >&6; }
4544if test $ac_cv_header_stdc = yes; then
4545
4546$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4547
4548fi
4549
4550# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4551for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4552 inttypes.h stdint.h unistd.h
4553do :
4554 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4555ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4556"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004557if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 cat >>confdefs.h <<_ACEOF
4559#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4560_ACEOF
4561
4562fi
4563
4564done
4565
4566
4567
4568 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 +00004569if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004570 MINIX=yes
4571else
4572 MINIX=
4573fi
4574
4575
4576 if test "$MINIX" = yes; then
4577
4578$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4579
4580
4581$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4582
4583
4584$as_echo "#define _MINIX 1" >>confdefs.h
4585
4586 fi
4587
4588
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4590$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004591if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004592 $as_echo_n "(cached) " >&6
4593else
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595/* end confdefs.h. */
4596
4597# define __EXTENSIONS__ 1
4598 $ac_includes_default
4599int
4600main ()
4601{
4602
4603 ;
4604 return 0;
4605}
4606_ACEOF
4607if ac_fn_c_try_compile "$LINENO"; then :
4608 ac_cv_safe_to_define___extensions__=yes
4609else
4610 ac_cv_safe_to_define___extensions__=no
4611fi
4612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4613fi
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4615$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4616 test $ac_cv_safe_to_define___extensions__ = yes &&
4617 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4618
4619 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4620
4621 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4622
4623 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4624
4625 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4626
4627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004629# Check for unsupported systems
4630case $ac_sys_system/$ac_sys_release in
4631atheos*|Linux*/1*)
4632 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4633 echo See README for details.
4634 exit 1;;
4635esac
4636
4637
Matthias Kloseb9621712010-04-24 17:59:49 +00004638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4639$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004640
4641# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004642if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004643 withval=$with_suffix;
4644 case $withval in
4645 no) EXEEXT=;;
4646 yes) EXEEXT=.exe;;
4647 *) EXEEXT=$withval;;
4648 esac
4649fi
4650
Matthias Kloseb9621712010-04-24 17:59:49 +00004651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4652$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004653
4654# Test whether we're running on a non-case-sensitive system, in which
4655# case we give a warning if no ext is given
4656
Matthias Kloseb9621712010-04-24 17:59:49 +00004657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4658$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004659if test ! -d CaseSensitiveTestDir; then
4660mkdir CaseSensitiveTestDir
4661fi
4662
4663if test -d casesensitivetestdir
4664then
Matthias Kloseb9621712010-04-24 17:59:49 +00004665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4666$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004667 BUILDEXEEXT=.exe
4668else
Matthias Kloseb9621712010-04-24 17:59:49 +00004669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004671 BUILDEXEEXT=$EXEEXT
4672fi
4673rmdir CaseSensitiveTestDir
4674
4675case $MACHDEP in
4676bsdos*)
4677 case $CC in
4678 gcc) CC="$CC -D_HAVE_BSDI";;
4679 esac;;
4680esac
4681
4682case $ac_sys_system in
4683hp*|HP*)
4684 case $CC in
4685 cc|*/cc) CC="$CC -Ae";;
4686 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004687esac
4688
4689
4690
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4692$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004693if test -z "$LIBRARY"
4694then
Barry Warsawf040d7d2010-10-18 17:09:07 +00004695 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4698$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004699
4700# LDLIBRARY is the name of the library to link against (as opposed to the
4701# name of the library into which to insert object files). BLDLIBRARY is also
4702# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4703# is blank as the main program is not linked directly against LDLIBRARY.
4704# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4705# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4706# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4707# DLLLIBRARY is the shared (i.e., DLL) library.
4708#
4709# RUNSHARED is used to run shared python without installed libraries
4710#
4711# INSTSONAME is the name of the shared library that will be use to install
4712# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004713#
4714# LDVERSION is the shared library version number, normally the Python version
4715# with the ABI build flags appended.
4716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004717
4718
4719
4720
4721
4722
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004723
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004724LDLIBRARY="$LIBRARY"
4725BLDLIBRARY='$(LDLIBRARY)'
4726INSTSONAME='$(LDLIBRARY)'
4727DLLLIBRARY=''
4728LDLIBRARYDIR=''
4729RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00004730LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004731
4732# LINKCC is the command that links the python executable -- default is $(CC).
4733# If CXX is set, and if it is needed to link a main function that was
4734# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4735# python might then depend on the C++ runtime
4736# This is altered for AIX in order to build the export list before
4737# linking.
4738
Matthias Kloseb9621712010-04-24 17:59:49 +00004739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4740$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004741if test -z "$LINKCC"
4742then
4743 LINKCC='$(PURIFY) $(MAINCC)'
4744 case $ac_sys_system in
4745 AIX*)
4746 exp_extra="\"\""
4747 if test $ac_sys_release -ge 5 -o \
4748 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4749 exp_extra="."
4750 fi
4751 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004752 QNX*)
4753 # qcc must be used because the other compilers do not
4754 # support -N.
4755 LINKCC=qcc;;
4756 esac
4757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4759$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004760
4761# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4762# make sure we default having it set to "no": this is used by
4763# distutils.unixccompiler to know if it should add --enable-new-dtags
4764# to linker command lines, and failing to detect GNU ld simply results
4765# in the same bahaviour as before.
4766
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4768$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004769ac_prog=ld
4770if test "$GCC" = yes; then
4771 ac_prog=`$CC -print-prog-name=ld`
4772fi
4773case `"$ac_prog" -V 2>&1 < /dev/null` in
4774 *GNU*)
4775 GNULD=yes;;
4776 *)
4777 GNULD=no;;
4778esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4780$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004781
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4783$as_echo_n "checking for inline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004784if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004785 $as_echo_n "(cached) " >&6
4786else
4787 ac_cv_c_inline=no
4788for ac_kw in inline __inline__ __inline; do
4789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4790/* end confdefs.h. */
4791#ifndef __cplusplus
4792typedef int foo_t;
4793static $ac_kw foo_t static_foo () {return 0; }
4794$ac_kw foo_t foo () {return 0; }
4795#endif
4796
4797_ACEOF
4798if ac_fn_c_try_compile "$LINENO"; then :
4799 ac_cv_c_inline=$ac_kw
4800fi
4801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 test "$ac_cv_c_inline" != no && break
4803done
4804
4805fi
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4807$as_echo "$ac_cv_c_inline" >&6; }
4808
4809case $ac_cv_c_inline in
4810 inline | yes) ;;
4811 *)
4812 case $ac_cv_c_inline in
4813 no) ac_val=;;
4814 *) ac_val=$ac_cv_c_inline;;
4815 esac
4816 cat >>confdefs.h <<_ACEOF
4817#ifndef __cplusplus
4818#define inline $ac_val
4819#endif
4820_ACEOF
4821 ;;
4822esac
4823
4824if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00004825
4826$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00004827
4828
4829fi
4830
4831
Matthias Kloseb9621712010-04-24 17:59:49 +00004832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4833$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004835if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004836 enableval=$enable_shared;
4837fi
4838
4839
4840if test -z "$enable_shared"
4841then
4842 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00004843 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004844 enable_shared="yes";;
4845 *)
4846 enable_shared="no";;
4847 esac
4848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4850$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004851
Matthias Kloseb9621712010-04-24 17:59:49 +00004852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4853$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004854# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004855if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004856 enableval=$enable_profiling; ac_save_cc="$CC"
4857 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004858 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859 ac_enable_profiling="no"
4860else
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004862/* end confdefs.h. */
4863int main() { return 0; }
4864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004865if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004866 ac_enable_profiling="yes"
4867else
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872fi
4873
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004874 CC="$ac_save_cc"
4875fi
4876
Matthias Kloseb9621712010-04-24 17:59:49 +00004877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4878$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004879
4880case "$ac_enable_profiling" in
4881 "yes")
4882 BASECFLAGS="-pg $BASECFLAGS"
4883 LDFLAGS="-pg $LDFLAGS"
4884 ;;
4885esac
4886
Matthias Kloseb9621712010-04-24 17:59:49 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4888$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004889
4890# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4891# library that we build, but we do not want to link against it (we
4892# will find it with a -framework option). For this reason there is an
4893# extra variable BLDLIBRARY against which Python and the extension
4894# modules are linked, BLDLIBRARY. This is normally the same as
4895# LDLIBRARY, but empty for MacOSX framework builds.
4896if test "$enable_framework"
4897then
4898 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4899 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4900 BLDLIBRARY=''
4901else
4902 BLDLIBRARY='$(LDLIBRARY)'
4903fi
4904
4905# Other platforms follow
4906if test $enable_shared = "yes"; then
4907
Matthias Kloseb9621712010-04-24 17:59:49 +00004908$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004909
4910 case $ac_sys_system in
4911 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004912 LDLIBRARY='libpython$(LDVERSION).dll.a'
4913 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004914 ;;
4915 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004916 LDLIBRARY='libpython$(LDVERSION).so'
4917 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004918 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4919 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004920 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004921 then
4922 PY3LIBRARY=libpython3.so
4923 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004924 ;;
4925 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004926 LDLIBRARY='libpython$(LDVERSION).so'
4927 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004928 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4929 case $ac_sys_system in
4930 FreeBSD*)
4931 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4932 ;;
4933 esac
4934 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004935 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00004936 then
4937 PY3LIBRARY=libpython3.so
4938 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004939 ;;
4940 hp*|HP*)
4941 case `uname -m` in
4942 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004943 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004944 ;;
4945 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004946 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004947 ;;
4948 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004949 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004950 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4951 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004952 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004953 LDLIBRARY='libpython$(LDVERSION).dylib'
4954 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004955 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4956 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004957 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004958 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00004959 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4960 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004961
4962 esac
4963else # shared is disabled
4964 case $ac_sys_system in
4965 CYGWIN*)
4966 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00004967 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004968 ;;
4969 esac
4970fi
4971
Matthias Kloseb9621712010-04-24 17:59:49 +00004972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4973$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004974
4975if test -n "$ac_tool_prefix"; then
4976 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4977set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00004980if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004982else
4983 if test -n "$RANLIB"; then
4984 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4985else
4986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987for as_dir in $PATH
4988do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004992 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4993 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995 break 2
4996 fi
4997done
Matthias Kloseb9621712010-04-24 17:59:49 +00004998 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004999IFS=$as_save_IFS
5000
5001fi
5002fi
5003RANLIB=$ac_cv_prog_RANLIB
5004if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5006$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007else
Matthias Kloseb9621712010-04-24 17:59:49 +00005008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005010fi
5011
5012
5013fi
5014if test -z "$ac_cv_prog_RANLIB"; then
5015 ac_ct_RANLIB=$RANLIB
5016 # Extract the first word of "ranlib", so it can be a program name with args.
5017set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005020if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005022else
5023 if test -n "$ac_ct_RANLIB"; then
5024 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5025else
5026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027for as_dir in $PATH
5028do
5029 IFS=$as_save_IFS
5030 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5033 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005035 break 2
5036 fi
5037done
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005039IFS=$as_save_IFS
5040
5041fi
5042fi
5043ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5044if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5046$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047else
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5049$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005050fi
5051
5052 if test "x$ac_ct_RANLIB" = x; then
5053 RANLIB=":"
5054 else
5055 case $cross_compiling:$ac_tool_warned in
5056yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005057{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5058$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059ac_tool_warned=yes ;;
5060esac
5061 RANLIB=$ac_ct_RANLIB
5062 fi
5063else
5064 RANLIB="$ac_cv_prog_RANLIB"
5065fi
5066
5067
5068for ac_prog in ar aal
5069do
5070 # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005074if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005076else
5077 if test -n "$AR"; then
5078 ac_cv_prog_AR="$AR" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005086 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5087 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005089 break 2
5090 fi
5091done
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005093IFS=$as_save_IFS
5094
5095fi
5096fi
5097AR=$ac_cv_prog_AR
5098if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5100$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005101else
Matthias Kloseb9621712010-04-24 17:59:49 +00005102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005104fi
5105
5106
5107 test -n "$AR" && break
5108done
5109test -n "$AR" || AR="ar"
5110
5111
5112# tweak ARFLAGS only if the user didn't set it on the command line
5113
5114if test -z "$ARFLAGS"
5115then
5116 ARFLAGS="rc"
5117fi
5118
5119
Georg Brandl1ca2e792011-03-05 20:51:24 +01005120
5121
5122# Extract the first word of "hg", so it can be a program name with args.
5123set dummy hg; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_prog_HAS_HG+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128else
5129 if test -n "$HAS_HG"; then
5130 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5131else
5132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135 IFS=$as_save_IFS
5136 test -z "$as_dir" && as_dir=.
5137 for ac_exec_ext in '' $ac_executable_extensions; do
5138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5139 ac_cv_prog_HAS_HG="found"
5140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141 break 2
5142 fi
5143done
5144 done
5145IFS=$as_save_IFS
5146
5147 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5148fi
5149fi
5150HAS_HG=$ac_cv_prog_HAS_HG
5151if test -n "$HAS_HG"; then
5152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5153$as_echo "$HAS_HG" >&6; }
5154else
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156$as_echo "no" >&6; }
5157fi
5158
5159
5160if test $HAS_HG = found
5161then
5162 HGVERSION="hg id -i \$(srcdir)"
5163 HGTAG="hg id -t \$(srcdir)"
5164 HGBRANCH="hg id -b \$(srcdir)"
5165else
5166 HGVERSION=""
5167 HGTAG=""
5168 HGBRANCH=""
5169fi
5170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171case $MACHDEP in
5172bsdos*|hp*|HP*)
5173 # install -d does not work on BSDI or HP-UX
5174 if test -z "$INSTALL"
5175 then
5176 INSTALL="${srcdir}/install-sh -c"
5177 fi
5178esac
5179ac_aux_dir=
5180for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005181 if test -f "$ac_dir/install-sh"; then
5182 ac_aux_dir=$ac_dir
5183 ac_install_sh="$ac_aux_dir/install-sh -c"
5184 break
5185 elif test -f "$ac_dir/install.sh"; then
5186 ac_aux_dir=$ac_dir
5187 ac_install_sh="$ac_aux_dir/install.sh -c"
5188 break
5189 elif test -f "$ac_dir/shtool"; then
5190 ac_aux_dir=$ac_dir
5191 ac_install_sh="$ac_aux_dir/shtool install -c"
5192 break
5193 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005194done
5195if test -z "$ac_aux_dir"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005196 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005197fi
5198
5199# These three variables are undocumented and unsupported,
5200# and are intended to be withdrawn in a future Autoconf release.
5201# They can cause serious problems if a builder's source tree is in a directory
5202# whose full name contains unusual characters.
5203ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5204ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5205ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5206
5207
5208# Find a good install program. We prefer a C program (faster),
5209# so one script is as good as another. But avoid the broken or
5210# incompatible versions:
5211# SysV /etc/install, /usr/sbin/install
5212# SunOS /usr/etc/install
5213# IRIX /sbin/install
5214# AIX /bin/install
5215# AmigaOS /C/install, which installs bootblocks on floppy discs
5216# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5217# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5218# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5219# OS/2's system install, which has a completely different semantic
5220# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005221# Reject install programs that cannot install multiple files.
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5223$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224if test -z "$INSTALL"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005225if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005227else
5228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH
5230do
5231 IFS=$as_save_IFS
5232 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005233 # Account for people who put trailing slashes in PATH elements.
5234case $as_dir/ in #((
5235 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005236 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005237 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238 /usr/ucb/* ) ;;
5239 *)
5240 # OSF1 and SCO ODT 3.0 have their own names for install.
5241 # Don't use installbsd from OSF since it installs stuff as root
5242 # by default.
5243 for ac_prog in ginstall scoinst install; do
5244 for ac_exec_ext in '' $ac_executable_extensions; do
5245 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5246 if test $ac_prog = install &&
5247 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5248 # AIX install. It has an incompatible calling convention.
5249 :
5250 elif test $ac_prog = install &&
5251 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5252 # program-specific install script used by HP pwplus--don't use.
5253 :
5254 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005255 rm -rf conftest.one conftest.two conftest.dir
5256 echo one > conftest.one
5257 echo two > conftest.two
5258 mkdir conftest.dir
5259 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5260 test -s conftest.one && test -s conftest.two &&
5261 test -s conftest.dir/conftest.one &&
5262 test -s conftest.dir/conftest.two
5263 then
5264 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5265 break 3
5266 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267 fi
5268 fi
5269 done
5270 done
5271 ;;
5272esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005273
5274 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275IFS=$as_save_IFS
5276
Matthias Kloseb9621712010-04-24 17:59:49 +00005277rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
5279fi
5280 if test "${ac_cv_path_install+set}" = set; then
5281 INSTALL=$ac_cv_path_install
5282 else
5283 # As a last resort, use the slow shell script. Don't cache a
5284 # value for INSTALL within a source directory, because that will
5285 # break other packages using the cache if that directory is
5286 # removed, or if the value is a relative name.
5287 INSTALL=$ac_install_sh
5288 fi
5289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5291$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292
5293# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5294# It thinks the first close brace ends the variable substitution.
5295test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5296
5297test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5298
5299test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5300
5301
5302# Not every filesystem supports hard links
5303
5304if test -z "$LN" ; then
5305 case $ac_sys_system in
5306 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307 *) LN=ln;;
5308 esac
5309fi
5310
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005311# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005312
5313ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005314
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005315# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5317$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318
5319# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005320if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 withval=$with_pydebug;
5322if test "$withval" != no
5323then
5324
Matthias Kloseb9621712010-04-24 17:59:49 +00005325$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005326
Matthias Kloseb9621712010-04-24 17:59:49 +00005327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5328$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005330 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005331else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5332$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333fi
5334else
Matthias Kloseb9621712010-04-24 17:59:49 +00005335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5336$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337fi
5338
5339
5340# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5341# merged with this chunk of code?
5342
5343# Optimizer/debugger flags
5344# ------------------------
5345# (The following bit of code is complicated enough - please keep things
5346# indented properly. Just pretend you're editing Python code. ;-)
5347
5348# There are two parallel sets of case statements below, one that checks to
5349# see if OPT was set and one that does BASECFLAGS setting based upon
5350# compiler and platform. BASECFLAGS tweaks need to be made even if the
5351# user set OPT.
5352
5353# tweak OPT based on compiler and platform, only if the user didn't set
5354# it on the command line
5355
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005356if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357then
5358 case $GCC in
5359 yes)
5360 if test "$CC" != 'g++' ; then
5361 STRICT_PROTO="-Wstrict-prototypes"
5362 fi
5363 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5364 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5365 WRAP="-fwrapv"
5366 fi
5367 case $ac_cv_prog_cc_g in
5368 yes)
5369 if test "$Py_DEBUG" = 'true' ; then
5370 # Optimization messes up debuggers, so turn it off for
5371 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005372 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373 else
5374 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5375 fi
5376 ;;
5377 *)
5378 OPT="-O3 -Wall $STRICT_PROTO"
5379 ;;
5380 esac
5381 case $ac_sys_system in
5382 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5383 ;;
5384 esac
5385 ;;
5386
5387 *)
5388 OPT="-O"
5389 ;;
5390 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391fi
5392
5393
5394
5395# The -arch flags for universal builds on OSX
5396UNIVERSAL_ARCH_FLAGS=
5397
5398
5399# tweak BASECFLAGS based on compiler and platform
5400case $GCC in
5401yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005402 # Python doesn't violate C99 aliasing rules, but older versions of
5403 # GCC produce warnings for legal Python code. Enable
5404 # -fno-strict-aliasing on versions of GCC that support but produce
5405 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5407$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408 ac_save_cc="$CC"
5409 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005410 save_CFLAGS="$CFLAGS"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005411 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005413else
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005416
Matthias Kloseb159a552010-04-25 21:00:44 +00005417
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005418int
5419main ()
5420{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005421
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005422 ;
5423 return 0;
5424}
Matthias Kloseb159a552010-04-25 21:00:44 +00005425
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005427if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005428
5429 CC="$ac_save_cc -fstrict-aliasing"
5430 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005432/* end confdefs.h. */
5433
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005434 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005435int
5436main ()
5437{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005438double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005439 ;
5440 return 0;
5441}
Matthias Kloseb159a552010-04-25 21:00:44 +00005442
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005444if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005445
5446 ac_cv_no_strict_aliasing=no
5447
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448else
Matthias Kloseb159a552010-04-25 21:00:44 +00005449
5450 ac_cv_no_strict_aliasing=yes
5451
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005452fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005454
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005455else
Matthias Kloseb159a552010-04-25 21:00:44 +00005456
5457 ac_cv_no_strict_aliasing=no
5458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005461fi
5462
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005463 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5466$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005467 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005468 then
5469 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5470 fi
5471
5472 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5473 # support. Without this, treatment of subnormals doesn't follow
5474 # the standard.
5475 case $ac_sys_machine in
5476 alpha*)
5477 BASECFLAGS="$BASECFLAGS -mieee"
5478 ;;
5479 esac
5480
5481 case $ac_sys_system in
5482 SCO_SV*)
5483 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5484 ;;
5485 # is there any other compiler on Darwin besides gcc?
5486 Darwin*)
5487 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5488 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005489 if test "${CC}" = gcc
5490 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5492$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005493 case "${UNIVERSALSDK}" in
5494 */MacOSX10.4u.sdk)
5495 # Build using 10.4 SDK, force usage of gcc when the
5496 # compiler is gcc, otherwise the user will get very
5497 # confusing error messages when building on OSX 10.6
5498 CC=gcc-4.0
5499 CPP=cpp-4.0
5500 ;;
5501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5503$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005504 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505
5506
5507 if test "${enable_universalsdk}"; then
5508 UNIVERSAL_ARCH_FLAGS=""
5509 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5510 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5511 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005512 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005513 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5514 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005515 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005516 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
5518 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5519 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005520 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005521 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005523 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5524 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005525 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005526 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005527
5528 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5529 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005530 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005531 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533 else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005534 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 +00005535
5536 fi
5537
5538
Ronald Oussoren666028b2010-04-18 19:07:43 +00005539 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5540 if test "${UNIVERSALSDK}" != "/"
5541 then
5542 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5543 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005544 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545 fi
5546 fi
5547
5548 # Calculate the right deployment target for this build.
5549 #
5550 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5551 if test ${cur_target} '>' 10.2; then
5552 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005553 if test ${enable_universalsdk}; then
5554 if test "${UNIVERSAL_ARCHS}" = "all"; then
5555 # Ensure that the default platform for a
5556 # 4-way universal build is OSX 10.5,
5557 # that's the first OS release where
5558 # 4-way builds make sense.
5559 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005560
5561 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5562 cur_target='10.5'
5563
5564 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5565 cur_target='10.5'
5566
5567 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5568 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005569 fi
5570 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005571 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005572 # On Intel macs default to a deployment
5573 # target of 10.4, that's the first OSX
5574 # release with Intel support.
5575 cur_target="10.4"
5576 fi
5577 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578 fi
5579 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5580
5581 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5582 # environment with a value that is the same as what we'll use
5583 # in the Makefile to ensure that we'll get the same compiler
5584 # environment during configure and build time.
5585 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5586 export MACOSX_DEPLOYMENT_TARGET
5587 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5588
5589 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 esac
5591 ;;
5592
5593*)
5594 case $ac_sys_system in
5595 OpenUNIX*|UnixWare*)
5596 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5597 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 SCO_SV*)
5599 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5600 ;;
5601 esac
5602 ;;
5603esac
5604
5605if test "$Py_DEBUG" = 'true'; then
5606 :
5607else
5608 OPT="-DNDEBUG $OPT"
5609fi
5610
5611if test "$ac_arch_flags"
5612then
5613 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5614fi
5615
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616# Check whether GCC supports PyArg_ParseTuple format
5617if test "$GCC" = "yes"
5618then
Matthias Kloseb9621712010-04-24 17:59:49 +00005619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5620$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 save_CFLAGS=$CFLAGS
5622 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00005623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624/* end confdefs.h. */
5625
5626 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627int
5628main ()
5629{
5630
5631 ;
5632 return 0;
5633}
Matthias Kloseb159a552010-04-25 21:00:44 +00005634
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005636if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
Matthias Kloseb159a552010-04-25 21:00:44 +00005638
Matthias Kloseb9621712010-04-24 17:59:49 +00005639$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
Matthias Kloseb159a552010-04-25 21:00:44 +00005641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005642$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00005643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644else
Matthias Kloseb159a552010-04-25 21:00:44 +00005645
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00005647$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648
5649fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5651 CFLAGS=$save_CFLAGS
5652fi
5653
5654# On some compilers, pthreads are available without further options
5655# (e.g. MacOS X). On some of these systems, the compiler will not
5656# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5657# So we have to see first whether pthreads are available without
5658# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5660$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005661if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005662 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663else
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ac_cv_pthread_is_default=no
5666else
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668/* end confdefs.h. */
5669
5670#include <pthread.h>
5671
5672void* routine(void* p){return NULL;}
5673
5674int main(){
5675 pthread_t p;
5676 if(pthread_create(&p,NULL,routine,NULL)!=0)
5677 return 1;
5678 (void)pthread_detach(p);
5679 return 0;
5680}
5681
5682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005683if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684
5685 ac_cv_pthread_is_default=yes
5686 ac_cv_kthread=no
5687 ac_cv_pthread=no
5688
5689else
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694fi
5695
5696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697fi
5698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5700$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702
5703if test $ac_cv_pthread_is_default = yes
5704then
5705 ac_cv_kpthread=no
5706else
5707# -Kpthread, if available, provides the right #defines
5708# and linker options to make pthread_create available
5709# Some compilers won't report that they do not support -Kpthread,
5710# so we need to run a program to see whether it really made the
5711# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5713$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005714if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716else
5717 ac_save_cc="$CC"
5718CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005719if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 ac_cv_kpthread=no
5721else
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723/* end confdefs.h. */
5724
5725#include <pthread.h>
5726
5727void* routine(void* p){return NULL;}
5728
5729int main(){
5730 pthread_t p;
5731 if(pthread_create(&p,NULL,routine,NULL)!=0)
5732 return 1;
5733 (void)pthread_detach(p);
5734 return 0;
5735}
5736
5737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005738if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 ac_cv_kpthread=yes
5740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745fi
5746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747CC="$ac_save_cc"
5748fi
5749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5751$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752fi
5753
5754if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5755then
5756# -Kthread, if available, provides the right #defines
5757# and linker options to make pthread_create available
5758# Some compilers won't report that they do not support -Kthread,
5759# so we need to run a program to see whether it really made the
5760# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5762$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005763if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 ac_save_cc="$CC"
5767CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005768if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769 ac_cv_kthread=no
5770else
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772/* end confdefs.h. */
5773
5774#include <pthread.h>
5775
5776void* routine(void* p){return NULL;}
5777
5778int main(){
5779 pthread_t p;
5780 if(pthread_create(&p,NULL,routine,NULL)!=0)
5781 return 1;
5782 (void)pthread_detach(p);
5783 return 0;
5784}
5785
5786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_cv_kthread=yes
5789else
Matthias Kloseb9621712010-04-24 17:59:49 +00005790 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794fi
5795
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796CC="$ac_save_cc"
5797fi
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5800$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801fi
5802
5803if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5804then
5805# -pthread, if available, provides the right #defines
5806# and linker options to make pthread_create available
5807# Some compilers won't report that they do not support -pthread,
5808# so we need to run a program to see whether it really made the
5809# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5811$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005812if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814else
5815 ac_save_cc="$CC"
5816CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00005817if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818 ac_cv_pthread=no
5819else
Matthias Kloseb9621712010-04-24 17:59:49 +00005820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821/* end confdefs.h. */
5822
5823#include <pthread.h>
5824
5825void* routine(void* p){return NULL;}
5826
5827int main(){
5828 pthread_t p;
5829 if(pthread_create(&p,NULL,routine,NULL)!=0)
5830 return 1;
5831 (void)pthread_detach(p);
5832 return 0;
5833}
5834
5835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837 ac_cv_pthread=yes
5838else
Matthias Kloseb9621712010-04-24 17:59:49 +00005839 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845CC="$ac_save_cc"
5846fi
5847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
5849$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850fi
5851
5852# If we have set a CC compiler flag for thread support then
5853# check if it works for CXX, too.
5854ac_cv_cxx_thread=no
5855if test ! -z "$CXX"
5856then
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
5858$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859ac_save_cxx="$CXX"
5860
5861if test "$ac_cv_kpthread" = "yes"
5862then
5863 CXX="$CXX -Kpthread"
5864 ac_cv_cxx_thread=yes
5865elif test "$ac_cv_kthread" = "yes"
5866then
5867 CXX="$CXX -Kthread"
5868 ac_cv_cxx_thread=yes
5869elif test "$ac_cv_pthread" = "yes"
5870then
5871 CXX="$CXX -pthread"
5872 ac_cv_cxx_thread=yes
5873fi
5874
5875if test $ac_cv_cxx_thread = yes
5876then
5877 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5878 $CXX -c conftest.$ac_ext 2>&5
5879 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5880 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5881 then
5882 ac_cv_cxx_thread=yes
5883 else
5884 ac_cv_cxx_thread=no
5885 fi
5886 rm -fr conftest*
5887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
5889$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890fi
5891CXX="$ac_save_cxx"
5892
5893
5894# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5896$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005897if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005898 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899else
Matthias Kloseb9621712010-04-24 17:59:49 +00005900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901/* end confdefs.h. */
5902#include <stdlib.h>
5903#include <stdarg.h>
5904#include <string.h>
5905#include <float.h>
5906
5907int
5908main ()
5909{
5910
5911 ;
5912 return 0;
5913}
5914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005915if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ac_cv_header_stdc=yes
5917else
Matthias Kloseb9621712010-04-24 17:59:49 +00005918 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5921
5922if test $ac_cv_header_stdc = yes; then
5923 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925/* end confdefs.h. */
5926#include <string.h>
5927
5928_ACEOF
5929if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005930 $EGREP "memchr" >/dev/null 2>&1; then :
5931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932else
5933 ac_cv_header_stdc=no
5934fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005935rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
5937fi
5938
5939if test $ac_cv_header_stdc = yes; then
5940 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942/* end confdefs.h. */
5943#include <stdlib.h>
5944
5945_ACEOF
5946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $EGREP "free" >/dev/null 2>&1; then :
5948
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949else
5950 ac_cv_header_stdc=no
5951fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005952rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953
5954fi
5955
5956if test $ac_cv_header_stdc = yes; then
5957 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959 :
5960else
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962/* end confdefs.h. */
5963#include <ctype.h>
5964#include <stdlib.h>
5965#if ((' ' & 0x0FF) == 0x020)
5966# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5967# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5968#else
5969# define ISLOWER(c) \
5970 (('a' <= (c) && (c) <= 'i') \
5971 || ('j' <= (c) && (c) <= 'r') \
5972 || ('s' <= (c) && (c) <= 'z'))
5973# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5974#endif
5975
5976#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5977int
5978main ()
5979{
5980 int i;
5981 for (i = 0; i < 256; i++)
5982 if (XOR (islower (i), ISLOWER (i))
5983 || toupper (i) != TOUPPER (i))
5984 return 2;
5985 return 0;
5986}
5987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005988if ac_fn_c_try_run "$LINENO"; then :
5989
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990else
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995fi
5996
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997fi
5998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6000$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001if test $ac_cv_header_stdc = yes; then
6002
Matthias Kloseb9621712010-04-24 17:59:49 +00006003$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
6005fi
6006
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006007for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6008fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006009ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006010shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006011unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006012sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6013sys/lock.h sys/mkdev.h sys/modem.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006014sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
6015sys/stat.h sys/termio.h sys/time.h \
6016sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
6017libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006018bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006019do :
6020 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6021ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006022if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006023 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006024#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006025_ACEOF
6026
6027fi
6028
Guido van Rossum627b2d71993-12-24 10:39:16 +00006029done
6030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006031ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006032for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6035$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006036if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006038else
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006040/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006041#include <sys/types.h>
6042#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006043
Martin v. Löwis11437992002-04-12 09:54:03 +00006044int
6045main ()
6046{
6047if ((DIR *) 0)
6048return 0;
6049 ;
6050 return 0;
6051}
6052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006053if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006054 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006055else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006060eval ac_res=\$$as_ac_Header
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6062$as_echo "$ac_res" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006063if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006064 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006065#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006066_ACEOF
6067
6068ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006069fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006071done
6072# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6073if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6075$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006076if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006078else
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006083/* Override any GCC internal prototype to avoid an error.
6084 Use char because int might match the return type of a GCC
6085 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006086#ifdef __cplusplus
6087extern "C"
6088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006089char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006090int
6091main ()
6092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006093return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006094 ;
6095 return 0;
6096}
6097_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006098for ac_lib in '' dir; do
6099 if test -z "$ac_lib"; then
6100 ac_res="none required"
6101 else
6102 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006103 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006104 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006106 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006108rm -f core conftest.err conftest.$ac_objext \
6109 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006110 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006111 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006113done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006114if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006116else
6117 ac_cv_search_opendir=no
6118fi
6119rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006120LIBS=$ac_func_search_save_LIBS
6121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6123$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006124ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006125if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006129
Michael W. Hudson54241132001-12-07 15:38:26 +00006130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6132$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006133if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006135else
6136 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140/* Override any GCC internal prototype to avoid an error.
6141 Use char because int might match the return type of a GCC
6142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006143#ifdef __cplusplus
6144extern "C"
6145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006146char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006147int
6148main ()
6149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006151 ;
6152 return 0;
6153}
6154_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155for ac_lib in '' x; do
6156 if test -z "$ac_lib"; then
6157 ac_res="none required"
6158 else
6159 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006161 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006165rm -f core conftest.err conftest.$ac_objext \
6166 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006167 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006170done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006171if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006173else
6174 ac_cv_search_opendir=no
6175fi
6176rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006177LIBS=$ac_func_search_save_LIBS
6178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6180$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006181ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006182if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006185fi
6186
6187fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006188
Matthias Kloseb9621712010-04-24 17:59:49 +00006189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6190$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006191if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006192 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193else
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006195/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006196#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197int
6198main ()
6199{
6200return makedev(0, 0);
6201 ;
6202 return 0;
6203}
6204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006205if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206 ac_cv_header_sys_types_h_makedev=yes
6207else
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006210rm -f core conftest.err conftest.$ac_objext \
6211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212
6213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6215$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006216
6217if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006218ac_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 +00006219if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006220
Matthias Kloseb9621712010-04-24 17:59:49 +00006221$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006222
6223fi
6224
6225
6226
6227 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006228 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 +00006229if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006230
Matthias Kloseb9621712010-04-24 17:59:49 +00006231$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232
6233fi
6234
6235
6236 fi
6237fi
6238
Michael W. Hudson54241132001-12-07 15:38:26 +00006239
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006240# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006241for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006242do :
6243 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006244#ifdef HAVE_CURSES_H
6245#include <curses.h>
6246#endif
6247
Matthias Kloseb9621712010-04-24 17:59:49 +00006248"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006249if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006250 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006251#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006252_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006253
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006254fi
6255
6256done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006257
6258
Martin v. Löwis11017b12006-01-14 18:12:57 +00006259# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006260for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006261do :
6262 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 +00006263#ifdef HAVE_ASM_TYPES_H
6264#include <asm/types.h>
6265#endif
6266#ifdef HAVE_SYS_SOCKET_H
6267#include <sys/socket.h>
6268#endif
6269
Matthias Kloseb9621712010-04-24 17:59:49 +00006270"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006271if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006273#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006274_ACEOF
6275
6276fi
6277
6278done
6279
6280
Guido van Rossum627b2d71993-12-24 10:39:16 +00006281# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006282was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6284$as_echo_n "checking for clock_t in time.h... " >&6; }
6285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006286/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006288
6289_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006291 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006292 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006293else
Martin v. Löwis11437992002-04-12 09:54:03 +00006294
6295
Matthias Kloseb9621712010-04-24 17:59:49 +00006296$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006297
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006298
Guido van Rossum627b2d71993-12-24 10:39:16 +00006299fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006300rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006301
Matthias Kloseb9621712010-04-24 17:59:49 +00006302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6303$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006304
Matthias Kloseb9621712010-04-24 17:59:49 +00006305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6306$as_echo_n "checking for makedev... " >&6; }
6307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006308/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006309
Jesus Cea740f53a2010-04-28 11:35:30 +00006310#if defined(MAJOR_IN_MKDEV)
6311#include <sys/mkdev.h>
6312#elif defined(MAJOR_IN_SYSMACROS)
6313#include <sys/sysmacros.h>
6314#else
6315#include <sys/types.h>
6316#endif
6317
Neal Norwitz11690112002-07-30 01:08:28 +00006318int
6319main ()
6320{
Jesus Cea740f53a2010-04-28 11:35:30 +00006321
6322 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006323 ;
6324 return 0;
6325}
Matthias Kloseb159a552010-04-25 21:00:44 +00006326
Neal Norwitz11690112002-07-30 01:08:28 +00006327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006328if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006329 ac_cv_has_makedev=yes
6330else
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006333rm -f core conftest.err conftest.$ac_objext \
6334 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6336$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006337if test "$ac_cv_has_makedev" = "yes"; then
6338
Matthias Kloseb9621712010-04-24 17:59:49 +00006339$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006340
6341fi
6342
Martin v. Löwis399a6892002-10-04 10:22:02 +00006343# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6344# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6345# defined, but the compiler does not support pragma redefine_extname,
6346# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6347# structures (such as rlimit64) without declaring them. As a
6348# work-around, disable LFS on such configurations
6349
6350use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6352$as_echo_n "checking Solaris LFS bug... " >&6; }
6353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006354/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006355
6356#define _LARGEFILE_SOURCE 1
6357#define _FILE_OFFSET_BITS 64
6358#include <sys/resource.h>
6359
Martin v. Löwis399a6892002-10-04 10:22:02 +00006360int
6361main ()
6362{
6363struct rlimit foo;
6364 ;
6365 return 0;
6366}
6367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006369 sol_lfs_bug=no
6370else
Matthias Kloseb9621712010-04-24 17:59:49 +00006371 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6375$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006376if test "$sol_lfs_bug" = "yes"; then
6377 use_lfs=no
6378fi
6379
6380if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006381# Two defines needed to enable largefile support on various platforms
6382# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006383case $ac_sys_system/$ac_sys_release in
6384AIX*)
6385
6386$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6387
6388 ;;
6389esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006390
Matthias Kloseb9621712010-04-24 17:59:49 +00006391$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006392
6393
Matthias Kloseb9621712010-04-24 17:59:49 +00006394$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006395
Martin v. Löwis399a6892002-10-04 10:22:02 +00006396fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006397
Guido van Rossum84e7b241996-08-19 21:59:00 +00006398# Add some code to confdefs.h so that the test for off_t works on SCO
6399cat >> confdefs.h <<\EOF
6400#if defined(SCO_DS)
6401#undef _OFF_T
6402#endif
6403EOF
6404
Guido van Rossumef2255b2000-03-10 22:30:29 +00006405# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006406ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006407if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006409else
Martin v. Löwis11437992002-04-12 09:54:03 +00006410
6411cat >>confdefs.h <<_ACEOF
6412#define mode_t int
6413_ACEOF
6414
6415fi
6416
Matthias Kloseb9621712010-04-24 17:59:49 +00006417ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006418if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006420else
Martin v. Löwis11437992002-04-12 09:54:03 +00006421
6422cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006423#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006424_ACEOF
6425
6426fi
6427
Matthias Kloseb9621712010-04-24 17:59:49 +00006428ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006429if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006430
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006431else
Martin v. Löwis11437992002-04-12 09:54:03 +00006432
6433cat >>confdefs.h <<_ACEOF
6434#define pid_t int
6435_ACEOF
6436
6437fi
6438
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006439
Martin v. Löwis11437992002-04-12 09:54:03 +00006440cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006441#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006442_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006443
Matthias Kloseb9621712010-04-24 17:59:49 +00006444ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006445if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447else
Martin v. Löwis11437992002-04-12 09:54:03 +00006448
6449cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006450#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006451_ACEOF
6452
6453fi
6454
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6456$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006457if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006458 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006459else
Matthias Kloseb9621712010-04-24 17:59:49 +00006460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006461/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
6464_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006466 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467 ac_cv_type_uid_t=yes
6468else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469 ac_cv_type_uid_t=no
6470fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006471rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6475$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006476if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477
Matthias Kloseb9621712010-04-24 17:59:49 +00006478$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006479
6480
Matthias Kloseb9621712010-04-24 17:59:49 +00006481$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482
6483fi
6484
Matthias Kloseb9621712010-04-24 17:59:49 +00006485ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6486case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006487 no|yes) ;; #(
6488 *)
6489
Matthias Kloseb9621712010-04-24 17:59:49 +00006490$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006491
6492
6493cat >>confdefs.h <<_ACEOF
6494#define uint32_t $ac_cv_c_uint32_t
6495_ACEOF
6496;;
6497 esac
6498
Matthias Kloseb9621712010-04-24 17:59:49 +00006499ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6500case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006501 no|yes) ;; #(
6502 *)
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006505
6506
6507cat >>confdefs.h <<_ACEOF
6508#define uint64_t $ac_cv_c_uint64_t
6509_ACEOF
6510;;
6511 esac
6512
Matthias Kloseb9621712010-04-24 17:59:49 +00006513ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6514case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006515 no|yes) ;; #(
6516 *)
6517
6518cat >>confdefs.h <<_ACEOF
6519#define int32_t $ac_cv_c_int32_t
6520_ACEOF
6521;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006522esac
6523
Matthias Kloseb9621712010-04-24 17:59:49 +00006524ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6525case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006526 no|yes) ;; #(
6527 *)
6528
6529cat >>confdefs.h <<_ACEOF
6530#define int64_t $ac_cv_c_int64_t
6531_ACEOF
6532;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006533esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006534
Matthias Kloseb9621712010-04-24 17:59:49 +00006535ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006536if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537
Matthias Kloseb9621712010-04-24 17:59:49 +00006538$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006539
6540fi
6541
Jack Jansendd19cf82001-12-06 22:36:17 +00006542
Michael W. Hudson54241132001-12-07 15:38:26 +00006543# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006544# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006545# The cast to long int works around a bug in the HP C Compiler
6546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6548# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6550$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006551if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006552 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006553else
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 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 +00006555
Martin v. Löwis11437992002-04-12 09:54:03 +00006556else
Matthias Kloseb9621712010-04-24 17:59:49 +00006557 if test "$ac_cv_type_int" = yes; then
6558 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006560as_fn_error 77 "cannot compute sizeof (int)
6561See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006562 else
6563 ac_cv_sizeof_int=0
6564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006566
Martin v. Löwis11437992002-04-12 09:54:03 +00006567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6569$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006570
6571
6572
Martin v. Löwis11437992002-04-12 09:54:03 +00006573cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006574#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006575_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006576
6577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006578# The cast to long int works around a bug in the HP C Compiler
6579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6581# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6583$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006584if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006586else
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 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 +00006588
Martin v. Löwis11437992002-04-12 09:54:03 +00006589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 if test "$ac_cv_type_long" = yes; then
6591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006593as_fn_error 77 "cannot compute sizeof (long)
6594See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006595 else
6596 ac_cv_sizeof_long=0
6597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006599
Martin v. Löwis11437992002-04-12 09:54:03 +00006600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6602$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006603
6604
6605
Martin v. Löwis11437992002-04-12 09:54:03 +00006606cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006607#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006608_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006609
6610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611# The cast to long int works around a bug in the HP C Compiler
6612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6616$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006617if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006618 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006619else
Matthias Kloseb9621712010-04-24 17:59:49 +00006620 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 +00006621
Martin v. Löwis11437992002-04-12 09:54:03 +00006622else
Matthias Kloseb9621712010-04-24 17:59:49 +00006623 if test "$ac_cv_type_void_p" = yes; then
6624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006626as_fn_error 77 "cannot compute sizeof (void *)
6627See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 else
6629 ac_cv_sizeof_void_p=0
6630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006632
Martin v. Löwis11437992002-04-12 09:54:03 +00006633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6635$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006636
6637
6638
Martin v. Löwis11437992002-04-12 09:54:03 +00006639cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006640#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006641_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006642
6643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006644# The cast to long int works around a bug in the HP C Compiler
6645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6647# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6649$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006650if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006652else
Matthias Kloseb9621712010-04-24 17:59:49 +00006653 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 +00006654
Martin v. Löwis11437992002-04-12 09:54:03 +00006655else
Matthias Kloseb9621712010-04-24 17:59:49 +00006656 if test "$ac_cv_type_short" = yes; then
6657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006659as_fn_error 77 "cannot compute sizeof (short)
6660See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006661 else
6662 ac_cv_sizeof_short=0
6663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6668$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006669
6670
6671
Martin v. Löwis11437992002-04-12 09:54:03 +00006672cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006673#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006674_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006675
6676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006677# The cast to long int works around a bug in the HP C Compiler
6678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6680# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6682$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006683if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006685else
Matthias Kloseb9621712010-04-24 17:59:49 +00006686 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 +00006687
Martin v. Löwis11437992002-04-12 09:54:03 +00006688else
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 if test "$ac_cv_type_float" = yes; then
6690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006692as_fn_error 77 "cannot compute sizeof (float)
6693See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006694 else
6695 ac_cv_sizeof_float=0
6696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006698
Martin v. Löwis11437992002-04-12 09:54:03 +00006699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6701$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006702
6703
6704
Martin v. Löwis11437992002-04-12 09:54:03 +00006705cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006706#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006707_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006708
6709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006710# The cast to long int works around a bug in the HP C Compiler
6711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6713# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6715$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006716if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006718else
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 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 +00006720
Martin v. Löwis11437992002-04-12 09:54:03 +00006721else
Matthias Kloseb9621712010-04-24 17:59:49 +00006722 if test "$ac_cv_type_double" = yes; then
6723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006725as_fn_error 77 "cannot compute sizeof (double)
6726See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006727 else
6728 ac_cv_sizeof_double=0
6729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006731
Martin v. Löwis11437992002-04-12 09:54:03 +00006732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6734$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006735
6736
6737
Martin v. Löwis11437992002-04-12 09:54:03 +00006738cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006739#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006740_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006741
6742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006743# The cast to long int works around a bug in the HP C Compiler
6744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6746# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6748$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006749if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006751else
Matthias Kloseb9621712010-04-24 17:59:49 +00006752 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 +00006753
Martin v. Löwis11437992002-04-12 09:54:03 +00006754else
Matthias Kloseb9621712010-04-24 17:59:49 +00006755 if test "$ac_cv_type_fpos_t" = yes; then
6756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006758as_fn_error 77 "cannot compute sizeof (fpos_t)
6759See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006760 else
6761 ac_cv_sizeof_fpos_t=0
6762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006764
Martin v. Löwis11437992002-04-12 09:54:03 +00006765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6767$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768
6769
6770
Martin v. Löwis11437992002-04-12 09:54:03 +00006771cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006772#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006773_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006774
Michael W. Hudson54241132001-12-07 15:38:26 +00006775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006776# The cast to long int works around a bug in the HP C Compiler
6777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6781$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006782if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006784else
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 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 +00006786
Martin v. Löwis18e16552006-02-15 17:27:45 +00006787else
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 if test "$ac_cv_type_size_t" = yes; then
6789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006791as_fn_error 77 "cannot compute sizeof (size_t)
6792See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006793 else
6794 ac_cv_sizeof_size_t=0
6795 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006797
Martin v. Löwis18e16552006-02-15 17:27:45 +00006798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6800$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006801
6802
6803
Martin v. Löwis18e16552006-02-15 17:27:45 +00006804cat >>confdefs.h <<_ACEOF
6805#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6806_ACEOF
6807
6808
Christian Heimes400adb02008-02-01 08:12:03 +00006809# The cast to long int works around a bug in the HP C Compiler
6810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6812# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
6814$as_echo_n "checking size of pid_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006815if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 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 +00006819
Christian Heimes400adb02008-02-01 08:12:03 +00006820else
Matthias Kloseb9621712010-04-24 17:59:49 +00006821 if test "$ac_cv_type_pid_t" = yes; then
6822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006824as_fn_error 77 "cannot compute sizeof (pid_t)
6825See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00006826 else
6827 ac_cv_sizeof_pid_t=0
6828 fi
6829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006830
Christian Heimes400adb02008-02-01 08:12:03 +00006831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
6833$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00006834
6835
6836
6837cat >>confdefs.h <<_ACEOF
6838#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
6839_ACEOF
6840
6841
Michael W. Hudson54241132001-12-07 15:38:26 +00006842
Matthias Kloseb9621712010-04-24 17:59:49 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
6844$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006845have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006847/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006848
Martin v. Löwis11437992002-04-12 09:54:03 +00006849int
6850main ()
6851{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006852long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006853 ;
6854 return 0;
6855}
6856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006858
6859
Matthias Kloseb9621712010-04-24 17:59:49 +00006860$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006861
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006862 have_long_long=yes
6863
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
6867$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00006868if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006869# The cast to long int works around a bug in the HP C Compiler
6870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6872# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6874$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006875if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006877else
Matthias Kloseb9621712010-04-24 17:59:49 +00006878 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 +00006879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880else
Matthias Kloseb9621712010-04-24 17:59:49 +00006881 if test "$ac_cv_type_long_long" = yes; then
6882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006884as_fn_error 77 "cannot compute sizeof (long long)
6885See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006886 else
6887 ac_cv_sizeof_long_long=0
6888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6893$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006894
6895
6896
Martin v. Löwis11437992002-04-12 09:54:03 +00006897cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006898#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006899_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006900
Michael W. Hudson54241132001-12-07 15:38:26 +00006901
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006902fi
6903
Matthias Kloseb9621712010-04-24 17:59:49 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
6905$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006906have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006908/* end confdefs.h. */
6909
6910int
6911main ()
6912{
6913long double x; x = (long double)0;
6914 ;
6915 return 0;
6916}
6917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006918if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006919
6920
Matthias Kloseb9621712010-04-24 17:59:49 +00006921$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006922
6923 have_long_double=yes
6924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006925fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
6928$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006929if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006930# The cast to long int works around a bug in the HP C Compiler
6931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
6935$as_echo_n "checking size of long double... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006936if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006938else
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 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 +00006940
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006941else
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 if test "$ac_cv_type_long_double" = yes; then
6943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006945as_fn_error 77 "cannot compute sizeof (long double)
6946See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006947 else
6948 ac_cv_sizeof_long_double=0
6949 fi
6950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006951
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
6954$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00006955
6956
6957
6958cat >>confdefs.h <<_ACEOF
6959#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
6960_ACEOF
6961
6962
6963fi
6964
6965
Matthias Kloseb9621712010-04-24 17:59:49 +00006966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
6967$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006968have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00006970/* end confdefs.h. */
6971
6972int
6973main ()
6974{
6975_Bool x; x = (_Bool)0;
6976 ;
6977 return 0;
6978}
6979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006980if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00006981
6982
Matthias Kloseb9621712010-04-24 17:59:49 +00006983$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00006984
6985 have_c99_bool=yes
6986
Thomas Woutersb2137042007-02-01 18:02:27 +00006987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
6990$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00006991if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992# The cast to long int works around a bug in the HP C Compiler
6993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
6997$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006998if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007000else
Matthias Kloseb9621712010-04-24 17:59:49 +00007001 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 +00007002
Thomas Woutersb2137042007-02-01 18:02:27 +00007003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 if test "$ac_cv_type__Bool" = yes; then
7005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007007as_fn_error 77 "cannot compute sizeof (_Bool)
7008See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009 else
7010 ac_cv_sizeof__Bool=0
7011 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013
Thomas Woutersb2137042007-02-01 18:02:27 +00007014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7016$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007017
7018
7019
Thomas Woutersb2137042007-02-01 18:02:27 +00007020cat >>confdefs.h <<_ACEOF
7021#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7022_ACEOF
7023
7024
7025fi
7026
Matthias Kloseb9621712010-04-24 17:59:49 +00007027ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007028 #include <stdint.h>
7029 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007030 #ifdef HAVE_INTTYPES_H
7031 #include <inttypes.h>
7032 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007033"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007034if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007035
7036cat >>confdefs.h <<_ACEOF
7037#define HAVE_UINTPTR_T 1
7038_ACEOF
7039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040# The cast to long int works around a bug in the HP C Compiler
7041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7043# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7045$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007046if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007048else
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 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 +00007050
Martin v. Löwis11437992002-04-12 09:54:03 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 if test "$ac_cv_type_uintptr_t" = yes; then
7053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007055as_fn_error 77 "cannot compute sizeof (uintptr_t)
7056See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 else
7058 ac_cv_sizeof_uintptr_t=0
7059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007061
Martin v. Löwis11437992002-04-12 09:54:03 +00007062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7064$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007065
7066
7067
Martin v. Löwis11437992002-04-12 09:54:03 +00007068cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007069#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007070_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007071
Michael W. Hudson54241132001-12-07 15:38:26 +00007072
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007073fi
7074
Thomas Wouters89f507f2006-12-13 04:49:30 +00007075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007076# The cast to long int works around a bug in the HP C Compiler
7077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7079# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7081$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007082if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007084else
Matthias Kloseb9621712010-04-24 17:59:49 +00007085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007086#ifdef HAVE_SYS_TYPES_H
7087#include <sys/types.h>
7088#endif
7089
Matthias Kloseb9621712010-04-24 17:59:49 +00007090"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007092else
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 if test "$ac_cv_type_off_t" = yes; then
7094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007096as_fn_error 77 "cannot compute sizeof (off_t)
7097See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007098 else
7099 ac_cv_sizeof_off_t=0
7100 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007102
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7105$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007107
7108
Martin v. Löwis11437992002-04-12 09:54:03 +00007109cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007110#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007111_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007112
Michael W. Hudson54241132001-12-07 15:38:26 +00007113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007114
Matthias Kloseb9621712010-04-24 17:59:49 +00007115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7116$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007117if test "$have_long_long" = yes
7118then
7119if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007120 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007121
Matthias Kloseb9621712010-04-24 17:59:49 +00007122$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7125$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007129fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007130else
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7132$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007133fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007135# The cast to long int works around a bug in the HP C Compiler
7136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7138# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7140$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007141if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007143else
Matthias Kloseb9621712010-04-24 17:59:49 +00007144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007145#ifdef HAVE_SYS_TYPES_H
7146#include <sys/types.h>
7147#endif
7148#ifdef HAVE_TIME_H
7149#include <time.h>
7150#endif
7151
Matthias Kloseb9621712010-04-24 17:59:49 +00007152"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007154else
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 if test "$ac_cv_type_time_t" = yes; then
7156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007158as_fn_error 77 "cannot compute sizeof (time_t)
7159See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007160 else
7161 ac_cv_sizeof_time_t=0
7162 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007164
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7167$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007169
7170
Martin v. Löwis11437992002-04-12 09:54:03 +00007171cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007172#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007173_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007174
Michael W. Hudson54241132001-12-07 15:38:26 +00007175
7176
Trent Mick635f6fb2000-08-23 21:33:05 +00007177# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007178ac_save_cc="$CC"
7179if test "$ac_cv_kpthread" = "yes"
7180then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007181elif test "$ac_cv_kthread" = "yes"
7182then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007183elif test "$ac_cv_pthread" = "yes"
7184then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007185fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007186
Matthias Kloseb9621712010-04-24 17:59:49 +00007187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7188$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007189have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007191/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007192
7193 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007194int
7195main ()
7196{
Guido van Rossum12580492000-09-24 16:47:19 +00007197pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007198 ;
7199 return 0;
7200}
Matthias Kloseb159a552010-04-25 21:00:44 +00007201
Martin v. Löwis11437992002-04-12 09:54:03 +00007202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007203if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007204 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7208$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007209if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007210 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7215$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007216if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007220#ifdef HAVE_PTHREAD_H
7221#include <pthread.h>
7222#endif
7223
Matthias Kloseb9621712010-04-24 17:59:49 +00007224"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007226else
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 if test "$ac_cv_type_pthread_t" = yes; then
7228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007230as_fn_error 77 "cannot compute sizeof (pthread_t)
7231See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007232 else
7233 ac_cv_sizeof_pthread_t=0
7234 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236
Trent Mick635f6fb2000-08-23 21:33:05 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7239$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007241
7242
Martin v. Löwis11437992002-04-12 09:54:03 +00007243cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007244#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007245_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007247
Trent Mick635f6fb2000-08-23 21:33:05 +00007248fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007249CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007250
Michael W. Hudson54241132001-12-07 15:38:26 +00007251
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007252case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007253 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007254 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7255 ;;
7256 Darwin/*)
7257 OTHER_LIBTOOL_OPT=""
7258 ;;
7259esac
7260
7261
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007262ARCH_RUN_32BIT=""
7263
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007264case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007265 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007266 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7267 if test "${enable_universalsdk}"; then
7268 :
7269 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007270 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007271 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007272 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007274 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007275 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007276 if test ${gcc_version} '<' 4.0
7277 then
7278 LIBTOOL_CRUFT="-lcc_dynamic"
7279 else
7280 LIBTOOL_CRUFT=""
7281 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007282 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007283 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007284else
Matthias Kloseb9621712010-04-24 17:59:49 +00007285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007286/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007287
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007288 #include <unistd.h>
7289 int main(int argc, char*argv[])
7290 {
7291 if (sizeof(long) == 4) {
7292 return 0;
7293 } else {
7294 return 1;
7295 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007296 }
7297
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007299if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007300 ac_osx_32bit=yes
7301else
Matthias Kloseb9621712010-04-24 17:59:49 +00007302 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007306fi
7307
7308
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007309 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007310 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007311 i386)
7312 MACOSX_DEFAULT_ARCH="i386"
7313 ;;
7314 ppc)
7315 MACOSX_DEFAULT_ARCH="ppc"
7316 ;;
7317 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007318 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007319 ;;
7320 esac
7321 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007322 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007323 i386)
7324 MACOSX_DEFAULT_ARCH="x86_64"
7325 ;;
7326 ppc)
7327 MACOSX_DEFAULT_ARCH="ppc64"
7328 ;;
7329 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007330 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007331 ;;
7332 esac
7333
7334 #ARCH_RUN_32BIT="true"
7335 fi
7336
7337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007340esac
7341
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7343$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007344if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007345then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007346 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007347 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007348 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7353$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007354 if test $enable_shared = "yes"
7355 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007356 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 +00007357 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007358else
Matthias Kloseb9621712010-04-24 17:59:49 +00007359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7360$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007361fi
7362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7364$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007365case $ac_sys_system/$ac_sys_release in
7366 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007367
Matthias Kloseb9621712010-04-24 17:59:49 +00007368$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7371$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007372 ;;
7373 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007376 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007377esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007378
Guido van Rossum0a516c91994-09-12 10:58:40 +00007379# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007380
Michael W. Hudson54241132001-12-07 15:38:26 +00007381
7382
7383
7384
Benjamin Peterson99f03762010-04-11 22:15:28 +00007385
Thomas Wouters477c8d52006-05-27 19:21:47 +00007386
Georg Brandlb1441c72009-01-03 22:33:39 +00007387
Thomas Wouters477c8d52006-05-27 19:21:47 +00007388cat >>confdefs.h <<_ACEOF
7389#define SHLIB_EXT "$SO"
7390_ACEOF
7391
Guido van Rossum0a516c91994-09-12 10:58:40 +00007392# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007393# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007394# (Shared libraries in this instance are shared modules to be loaded into
7395# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7397$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007398if test -z "$LDSHARED"
7399then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007400 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007401 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007402 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007403 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007404 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007405 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007406 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007407 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007408 if test "$GCC" = "yes" ; then
7409 LDSHARED='$(CC) -shared'
7410 LDCXXSHARED='$(CXX) -shared'
7411 else
7412 LDSHARED='$(CC) -G'
7413 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007414 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007415 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007416 if test "$GCC" = "yes" ; then
7417 LDSHARED='$(CC) -shared'
7418 LDCXXSHARED='$(CXX) -shared'
7419 else
7420 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007421 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007422 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007423 LDSHARED='$(CC) -bundle'
7424 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007425 if test "$enable_framework" ; then
7426 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007427 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7428 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007429 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007430 else
7431 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007432 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007433 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007434 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007435 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007436 LDSHARED='$(CC) -bundle'
7437 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007438 if test "$enable_framework" ; then
7439 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007440 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7441 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007442 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007443 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007444 # No framework, use the Python app as bundle-loader
7445 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007446 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007447 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007448 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007449 Darwin/*)
7450 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7451 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007452
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007453 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007454 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007455 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007456 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007457 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007458 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7459 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007460 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007461 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007462 LDSHARED='$(CC) -bundle'
7463 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007464 if test "$enable_framework" ; then
7465 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007466 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7467 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007468 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007469 else
7470 # No framework, use the Python app as bundle-loader
7471 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7472 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007473 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007474 fi
7475 fi
7476 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007477 Linux*|GNU*|QNX*)
7478 LDSHARED='$(CC) -shared'
7479 LDCXXSHARED='$(CXX) -shared';;
7480 BSD/OS*/4*)
7481 LDSHARED="gcc -shared"
7482 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007483 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007484 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007485 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007486 LDSHARED='$(CC) -shared'
7487 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007488 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007489 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007490 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007491 OpenBSD*)
7492 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7493 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007494 LDSHARED='$(CC) -shared $(CCSHARED)'
7495 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007496 else
7497 case `uname -r` in
7498 [01].* | 2.[0-7] | 2.[0-7].*)
7499 LDSHARED="ld -Bshareable ${LDFLAGS}"
7500 ;;
7501 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007502 LDSHARED='$(CC) -shared $(CCSHARED)'
7503 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007504 ;;
7505 esac
7506 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007507 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007508 LDSHARED='$(CC) -shared'
7509 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007510 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007511 if test "$GCC" = "yes" ; then
7512 LDSHARED='$(CC) -shared'
7513 LDCXXSHARED='$(CXX) -shared'
7514 else
7515 LDSHARED='$(CC) -G'
7516 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007517 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007518 SCO_SV*)
7519 LDSHARED='$(CC) -Wl,-G,-Bexport'
7520 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7521 CYGWIN*)
7522 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7523 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007524 *) LDSHARED="ld";;
7525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7528$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00007529LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007530BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007531# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007532# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7534$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007535if test -z "$CCSHARED"
7536then
Guido van Rossum07397971997-04-29 21:49:50 +00007537 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007538 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007539 then CCSHARED="-fPIC";
7540 elif test `uname -p` = sparc;
7541 then CCSHARED="-xcode=pic32";
7542 else CCSHARED="-Kpic";
7543 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007544 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007545 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007546 else CCSHARED="+z";
7547 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007548 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007549 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007550 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007551 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007552 if test "$GCC" = "yes"
7553 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007554 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007555 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007556 SCO_SV*)
7557 if test "$GCC" = "yes"
7558 then CCSHARED="-fPIC"
7559 else CCSHARED="-Kpic -belf"
7560 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007561 IRIX*/6*) case $CC in
7562 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007563 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007564 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007565 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7568$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007569# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007570# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7572$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007573if test -z "$LINKFORSHARED"
7574then
Guido van Rossum07397971997-04-29 21:49:50 +00007575 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007576 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007577 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007578 LINKFORSHARED="-Wl,-E -Wl,+s";;
7579# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007580 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007581 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007582 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007583 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00007584 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00007585 if test "$enable_framework"
7586 then
Jack Jansenda49e192005-01-07 13:08:22 +00007587 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007588 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007589 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007590 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007591 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007592 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007593 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007594 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7595 then
7596 LINKFORSHARED="-Wl,--export-dynamic"
7597 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007598 SunOS/5*) case $CC in
7599 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007600 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007601 then
7602 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007603 fi;;
7604 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007605 CYGWIN*)
7606 if test $enable_shared = "no"
7607 then
7608 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7609 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00007610 QNX*)
7611 # -Wl,-E causes the symbols to be added to the dynamic
7612 # symbol table so that they can be found when a module
7613 # is loaded. -N 2048K causes the stack size to be set
7614 # to 2048 kilobytes so that the stack doesn't overflow
7615 # when running test_compile.py.
7616 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007617 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7620$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007621
Michael W. Hudson54241132001-12-07 15:38:26 +00007622
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00007623
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7625$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007626if test ! "$LIBRARY" = "$LDLIBRARY"
7627then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007628 case $ac_sys_system in
7629 CYGWIN*)
7630 # Cygwin needs CCSHARED when building extension DLLs
7631 # but not when building the interpreter DLL.
7632 CFLAGSFORSHARED='';;
7633 *)
7634 CFLAGSFORSHARED='$(CCSHARED)'
7635 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7638$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007639
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007640# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7641# library (with --enable-shared).
7642# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007643# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7644# if it is not required, since it creates a dependency of the shared library
7645# to LIBS. This, in turn, means that applications linking the shared libpython
7646# don't need to link LIBS explicitly. The default should be only changed
7647# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007648
Matthias Kloseb9621712010-04-24 17:59:49 +00007649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7650$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007651case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007652 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007653 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007654esac
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7656$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007657
7658
Guido van Rossum627b2d71993-12-24 10:39:16 +00007659# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
7661$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007662if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007663 $as_echo_n "(cached) " >&6
7664else
7665 ac_check_lib_save_LIBS=$LIBS
7666LIBS="-lsendfile $LIBS"
7667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7668/* end confdefs.h. */
7669
7670/* Override any GCC internal prototype to avoid an error.
7671 Use char because int might match the return type of a GCC
7672 builtin and then its argument prototype would still apply. */
7673#ifdef __cplusplus
7674extern "C"
7675#endif
7676char sendfile ();
7677int
7678main ()
7679{
7680return sendfile ();
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685if ac_fn_c_try_link "$LINENO"; then :
7686 ac_cv_lib_sendfile_sendfile=yes
7687else
7688 ac_cv_lib_sendfile_sendfile=no
7689fi
7690rm -f core conftest.err conftest.$ac_objext \
7691 conftest$ac_exeext conftest.$ac_ext
7692LIBS=$ac_check_lib_save_LIBS
7693fi
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
7695$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Georg Brandlfe09a542011-03-06 10:26:32 +01007696if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00007697 cat >>confdefs.h <<_ACEOF
7698#define HAVE_LIBSENDFILE 1
7699_ACEOF
7700
7701 LIBS="-lsendfile $LIBS"
7702
7703fi
7704
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7706$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007707if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007709else
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007711LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715/* Override any GCC internal prototype to avoid an error.
7716 Use char because int might match the return type of a GCC
7717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007718#ifdef __cplusplus
7719extern "C"
7720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007721char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007722int
7723main ()
7724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007726 ;
7727 return 0;
7728}
7729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007731 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007732else
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735rm -f core conftest.err conftest.$ac_objext \
7736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007737LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7740$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007741if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 cat >>confdefs.h <<_ACEOF
7743#define HAVE_LIBDL 1
7744_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007745
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007746 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007747
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007748fi
7749 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7751$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007752if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007754else
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007756LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760/* Override any GCC internal prototype to avoid an error.
7761 Use char because int might match the return type of a GCC
7762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007763#ifdef __cplusplus
7764extern "C"
7765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007766char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007767int
7768main ()
7769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 ;
7772 return 0;
7773}
7774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007776 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007777else
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007780rm -f core conftest.err conftest.$ac_objext \
7781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
7785$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007786if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 cat >>confdefs.h <<_ACEOF
7788#define HAVE_LIBDLD 1
7789_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007791 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007793fi
7794 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00007795
Georg Brandlb1441c72009-01-03 22:33:39 +00007796# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00007797if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
7799$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007800if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007801 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007802else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007803 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807/* Override any GCC internal prototype to avoid an error.
7808 Use char because int might match the return type of a GCC
7809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007810#ifdef __cplusplus
7811extern "C"
7812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007813char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007814int
7815main ()
7816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007818 ;
7819 return 0;
7820}
7821_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822for ac_lib in '' pthread rt posix4; do
7823 if test -z "$ac_lib"; then
7824 ac_res="none required"
7825 else
7826 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832rm -f core conftest.err conftest.$ac_objext \
7833 conftest$ac_exeext
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007834 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007837done
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007838if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840else
7841 ac_cv_search_sem_init=no
7842fi
7843rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00007844LIBS=$ac_func_search_save_LIBS
7845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
7847$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00007849if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007851
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007852fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00007853 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00007854 # posix4 on Solaris 2.6
7855 # pthread (first!) on Linux
7856fi
7857
Martin v. Löwis19d17342003-06-14 21:03:05 +00007858# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
7860$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007861if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007862 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00007863else
7864 ac_check_lib_save_LIBS=$LIBS
7865LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007867/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869/* Override any GCC internal prototype to avoid an error.
7870 Use char because int might match the return type of a GCC
7871 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00007872#ifdef __cplusplus
7873extern "C"
7874#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00007875char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007876int
7877main ()
7878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00007880 ;
7881 return 0;
7882}
7883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007885 ac_cv_lib_intl_textdomain=yes
7886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00007888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889rm -f core conftest.err conftest.$ac_objext \
7890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00007891LIBS=$ac_check_lib_save_LIBS
7892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
7894$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007895if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00007896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00007898
Brett Cannonc6d936e2009-06-07 20:09:53 +00007899 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00007900fi
7901
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007902
7903# checks for system dependent C++ extensions support
7904case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
7906$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
7907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007908/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007909
Georg Brandl59e87bd2011-02-15 19:48:59 +00007910 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007911int
7912main ()
7913{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007914loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 ;
7916 return 0;
7917}
Matthias Kloseb159a552010-04-25 21:00:44 +00007918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007920if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007921
Matthias Kloseb159a552010-04-25 21:00:44 +00007922
Matthias Kloseb9621712010-04-24 17:59:49 +00007923$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007924
Matthias Kloseb159a552010-04-25 21:00:44 +00007925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007926$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007927
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007928else
Matthias Kloseb159a552010-04-25 21:00:44 +00007929
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007931$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00007932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007934rm -f core conftest.err conftest.$ac_objext \
7935 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00007936 *) ;;
7937esac
7938
Guido van Rossum70c7f481998-03-26 18:44:10 +00007939# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
7941$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007942if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007944else
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007946LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950/* Override any GCC internal prototype to avoid an error.
7951 Use char because int might match the return type of a GCC
7952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007953#ifdef __cplusplus
7954extern "C"
7955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007956char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007957int
7958main ()
7959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ;
7962 return 0;
7963}
7964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007965if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970rm -f core conftest.err conftest.$ac_objext \
7971 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007972LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
7975$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007976if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007977 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00007978fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00007979 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7981$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00007982if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007984else
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007986LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00007987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990/* Override any GCC internal prototype to avoid an error.
7991 Use char because int might match the return type of a GCC
7992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007993#ifdef __cplusplus
7994extern "C"
7995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007996char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008001 ;
8002 return 0;
8003}
8004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008007else
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010rm -f core conftest.err conftest.$ac_objext \
8011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008012LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8015$as_echo "$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008016if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008017 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008018fi
8019 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008020
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8022$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008024# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008025if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8028$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008029LIBS="$withval $LIBS"
8030
8031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8033$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034fi
8035
Guido van Rossum7f43da71994-08-01 12:15:30 +00008036
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008037if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008038 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8039set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8041$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008042if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008044else
8045 case $PKG_CONFIG in
8046 [\\/]* | ?:[\\/]*)
8047 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8048 ;;
8049 *)
8050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8051for as_dir in $PATH
8052do
8053 IFS=$as_save_IFS
8054 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008056 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8057 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008059 break 2
8060 fi
8061done
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008063IFS=$as_save_IFS
8064
8065 ;;
8066esac
8067fi
8068PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8069if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8071$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8074$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008075fi
8076
8077
8078fi
8079if test -z "$ac_cv_path_PKG_CONFIG"; then
8080 ac_pt_PKG_CONFIG=$PKG_CONFIG
8081 # Extract the first word of "pkg-config", so it can be a program name with args.
8082set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8084$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008085if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008087else
8088 case $ac_pt_PKG_CONFIG in
8089 [\\/]* | ?:[\\/]*)
8090 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8091 ;;
8092 *)
8093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8094for as_dir in $PATH
8095do
8096 IFS=$as_save_IFS
8097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Petersond78735d2010-01-01 16:04:23 +00008099 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8100 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008102 break 2
8103 fi
8104done
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008106IFS=$as_save_IFS
8107
8108 ;;
8109esac
8110fi
8111ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8112if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8114$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008115else
Matthias Kloseb9621712010-04-24 17:59:49 +00008116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8117$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008118fi
8119
8120 if test "x$ac_pt_PKG_CONFIG" = x; then
8121 PKG_CONFIG=""
8122 else
8123 case $cross_compiling:$ac_tool_warned in
8124yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008127ac_tool_warned=yes ;;
8128esac
8129 PKG_CONFIG=$ac_pt_PKG_CONFIG
8130 fi
8131else
8132 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8133fi
8134
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008135
8136# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8138$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008139
8140# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008141if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008142 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008143else
8144 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008145fi
8146
8147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8149$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008150
8151# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8153$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008154
8155# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008157 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008158else
8159 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008160fi
8161
8162
8163if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008164 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8165else
8166 LIBFFI_INCLUDEDIR=""
8167fi
8168
8169
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8171$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008172
Benjamin Peterson076ed002010-10-31 17:11:02 +00008173# Check for support for loadable sqlite extensions
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8175$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8176# Check whether --enable-loadable-sqlite-extensions was given.
8177if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8178 enableval=$enable_loadable_sqlite_extensions;
8179else
8180 enable_loadable_sqlite_extensions="no"
8181fi
8182
8183
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8185$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8186
Matthias Klose55708cc2009-04-30 08:06:49 +00008187# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8189$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008190
8191# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008192if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008193 withval=$with_dbmliborder;
8194if test x$with_dbmliborder = xyes
8195then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008196as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008197else
8198 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8199 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8200 then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008201 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008202 fi
8203 done
8204fi
8205fi
8206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8208$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008209
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008210# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008211
8212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8214$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008218 withval=$with_signal_module;
8219fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008220
8221
8222if test -z "$with_signal_module"
8223then with_signal_module="yes"
8224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8226$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008227
8228if test "${with_signal_module}" = "yes"; then
8229 USE_SIGNAL_MODULE=""
8230 SIGNAL_OBJS=""
8231else
8232 USE_SIGNAL_MODULE="#"
8233 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8234fi
8235
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008236# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008237
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008238USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241
8242# Templates for things AC_DEFINEd more than once.
8243# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008244
8245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
8247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8249$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008250
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008251# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008252if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253 withval=$with_threads;
8254fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008255
8256
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008257# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008259# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008260if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261 withval=$with_thread; with_threads=$with_thread
8262fi
8263
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008264
8265if test -z "$with_threads"
8266then with_threads="yes"
8267fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8269$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008270
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008271
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008272if test "$with_threads" = "no"
8273then
8274 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008275elif test "$ac_cv_pthread_is_default" = yes
8276then
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008278
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008279 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008281
8282 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008284elif test "$ac_cv_kpthread" = "yes"
8285then
8286 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008287 if test "$ac_cv_cxx_thread" = "yes"; then
8288 CXX="$CXX -Kpthread"
8289 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008291
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008292 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008293 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008294elif test "$ac_cv_kthread" = "yes"
8295then
8296 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008297 if test "$ac_cv_cxx_thread" = "yes"; then
8298 CXX="$CXX -Kthread"
8299 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008301
8302 posix_threads=yes
8303 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008304elif test "$ac_cv_pthread" = "yes"
8305then
8306 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008307 if test "$ac_cv_cxx_thread" = "yes"; then
8308 CXX="$CXX -pthread"
8309 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008311
8312 posix_threads=yes
8313 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008314else
8315 if test ! -z "$with_threads" -a -d "$with_threads"
8316 then LDFLAGS="$LDFLAGS -L$with_threads"
8317 fi
8318 if test ! -z "$withval" -a -d "$withval"
8319 then LDFLAGS="$LDFLAGS -L$withval"
8320 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008321
8322 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008323 # define _POSIX_THREADS in unistd.h. Some apparently don't
8324 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8326$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008328/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008329
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008330#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008331#ifdef _POSIX_THREADS
8332yes
8333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008334
8335_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008338 unistd_defines_pthreads=yes
8339else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008340 unistd_defines_pthreads=no
8341fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008342rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008343
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8345$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349 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 +00008350if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008357
8358 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008359 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008360else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 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 +00008363if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008370
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008371 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008372else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008373
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008374 # Just looking for pthread_create in libpthread is not enough:
8375 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8376 # So we really have to include pthread.h, and then link.
8377 _libs=$LIBS
8378 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8380$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008382/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008383#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008384
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008385void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008386int
8387main ()
8388{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008389
8390pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ;
8392 return 0;
8393}
8394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8398$as_echo "yes" >&6; }
8399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008402 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008403else
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008405 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008407if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008409
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008410 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008411 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008412else
Guido van Rossumad678af1998-10-02 14:42:15 +00008413
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8415$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008416if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008418else
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008420LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424/* Override any GCC internal prototype to avoid an error.
8425 Use char because int might match the return type of a GCC
8426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008427#ifdef __cplusplus
8428extern "C"
8429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008430char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008431int
8432main ()
8433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008434return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 ;
8436 return 0;
8437}
8438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008441else
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008444rm -f core conftest.err conftest.$ac_objext \
8445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008446LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8449$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008450if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008452
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008453 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008454 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008455 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008456else
Greg Steinadf63d62000-07-05 10:38:09 +00008457
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8459$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008460if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008462else
Martin v. Löwis11437992002-04-12 09:54:03 +00008463 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008464LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468/* Override any GCC internal prototype to avoid an error.
8469 Use char because int might match the return type of a GCC
8470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008471#ifdef __cplusplus
8472extern "C"
8473#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008474char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008475int
8476main ()
8477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 ;
8480 return 0;
8481}
8482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008485else
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008488rm -f core conftest.err conftest.$ac_objext \
8489 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008490LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8493$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008494if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008497 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008498 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008499 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008500else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008501
Matthias Kloseb9621712010-04-24 17:59:49 +00008502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8503$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008504if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008506else
Martin v. Löwis11437992002-04-12 09:54:03 +00008507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008508LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512/* Override any GCC internal prototype to avoid an error.
8513 Use char because int might match the return type of a GCC
8514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515#ifdef __cplusplus
8516extern "C"
8517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008518char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008519int
8520main ()
8521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008523 ;
8524 return 0;
8525}
8526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532rm -f core conftest.err conftest.$ac_objext \
8533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8537$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008538if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008540
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008542 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008543 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008544else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008545
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8547$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008548if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008550else
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008552LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008556/* Override any GCC internal prototype to avoid an error.
8557 Use char because int might match the return type of a GCC
8558 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008559#ifdef __cplusplus
8560extern "C"
8561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008562char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008563int
8564main ()
8565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008567 ;
8568 return 0;
8569}
8570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008571if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008573else
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008576rm -f core conftest.err conftest.$ac_objext \
8577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008578LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8581$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008582if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008584
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008585 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008586 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008587 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008588else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008589
Martin v. Löwis130fb172001-07-19 11:00:41 +00008590 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008591fi
8592
Guido van Rossum627b2d71993-12-24 10:39:16 +00008593
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008594fi
8595
Guido van Rossum0be3e491997-05-22 20:33:33 +00008596fi
8597
Guido van Rossum49545951997-12-02 19:28:29 +00008598fi
8599
Guido van Rossumb93a8621998-05-07 13:27:32 +00008600fi
8601
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008603rm -f core conftest.err conftest.$ac_objext \
8604 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605fi
8606
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
8608fi
8609
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008610
Michael W. Hudson54241132001-12-07 15:38:26 +00008611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8613$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008614if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008616else
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008618LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622/* Override any GCC internal prototype to avoid an error.
8623 Use char because int might match the return type of a GCC
8624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625#ifdef __cplusplus
8626extern "C"
8627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008628char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008629int
8630main ()
8631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ;
8634 return 0;
8635}
8636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642rm -f core conftest.err conftest.$ac_objext \
8643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008644LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8647$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008648if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008650
Martin v. Löwis130fb172001-07-19 11:00:41 +00008651 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008652 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008653 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008654fi
8655
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008656
Neal Norwitza978ab02002-11-02 16:58:05 +00008657 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8659$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008660if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008662else
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008664LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668/* Override any GCC internal prototype to avoid an error.
8669 Use char because int might match the return type of a GCC
8670 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671#ifdef __cplusplus
8672extern "C"
8673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008674char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675int
8676main ()
8677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008679 ;
8680 return 0;
8681}
8682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688rm -f core conftest.err conftest.$ac_objext \
8689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008690LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
8693$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008694if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008696
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008697 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008698 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008699 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008700fi
8701
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008702 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008703fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008705if test "$posix_threads" = "yes"; then
8706 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008709
8710 fi
8711
8712 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
8713 case $ac_sys_system/$ac_sys_release in
8714 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00008715$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008716
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008717 ;;
8718 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00008719$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008720
8721 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008722 AIX/5)
Matthias Kloseb9621712010-04-24 17:59:49 +00008723$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00008724
8725 ;;
Antoine Pitrou33a29942010-08-30 14:52:00 +00008726 AIX/6)
8727$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
8728
8729 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008730 esac
8731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
8733$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008734 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008736else
Matthias Kloseb9621712010-04-24 17:59:49 +00008737 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008738 ac_cv_pthread_system_supported=no
8739else
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008742#include <pthread.h>
8743 void *foo(void *parm) {
8744 return NULL;
8745 }
8746 main() {
8747 pthread_attr_t attr;
8748 pthread_t id;
8749 if (pthread_attr_init(&attr)) exit(-1);
8750 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
8751 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
8752 exit(0);
8753 }
8754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008755if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008756 ac_cv_pthread_system_supported=yes
8757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008762fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00008763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765fi
8766
Matthias Kloseb9621712010-04-24 17:59:49 +00008767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
8768$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008769 if test "$ac_cv_pthread_system_supported" = "yes"; then
8770
Matthias Kloseb9621712010-04-24 17:59:49 +00008771$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008772
8773 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 for ac_func in pthread_sigmask
8775do :
8776 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00008777if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008778 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008779#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008780_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00008781 case $ac_sys_system in
8782 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008783
Matthias Kloseb9621712010-04-24 17:59:49 +00008784$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00008785
8786 ;;
8787 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008788fi
8789done
8790
8791fi
8792
8793
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008794# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
8797$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008799if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008800 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008801 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008804 ipv6=no
8805 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8807$as_echo "yes" >&6; }
8808 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008809
8810 ipv6=yes
8811 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008813else
Martin v. Löwis11437992002-04-12 09:54:03 +00008814
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008819 ipv6=no
8820
8821else
Matthias Kloseb9621712010-04-24 17:59:49 +00008822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008823/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008824 /* AF_INET6 available check */
8825#include <sys/types.h>
8826#include <sys/socket.h>
8827main()
8828{
8829 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
8830 exit(1);
8831 else
8832 exit(0);
8833}
8834
Martin v. Löwis11437992002-04-12 09:54:03 +00008835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8839$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008840 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00008841
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008842else
Matthias Kloseb159a552010-04-25 21:00:44 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008846 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008851fi
8852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008854if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
8856$as_echo_n "checking if RFC2553 API is available... " >&6; }
8857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008858/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
8860 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008861#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008865struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00008866 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ;
8868 return 0;
8869}
Matthias Kloseb159a552010-04-25 21:00:44 +00008870
Martin v. Löwis11437992002-04-12 09:54:03 +00008871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00008873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008875$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008876 ipv6=yes
8877
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008878else
Matthias Kloseb159a552010-04-25 21:00:44 +00008879
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008882 ipv6=no
8883
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008886fi
8887
8888if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00008890
8891fi
8892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893fi
8894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008895
8896ipv6type=unknown
8897ipv6lib=none
8898ipv6trylibc=no
8899
8900if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
8902$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00008903 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
8904 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008905 case $i in
8906 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008909
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008910#include <netinet/in.h>
8911#ifdef IPV6_INRIA_VERSION
8912yes
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008917 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008918fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008919rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008920
8921 ;;
8922 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008926#include <netinet/in.h>
8927#ifdef __KAME__
8928yes
8929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008933 ipv6type=$i;
8934 ipv6lib=inet6
8935 ipv6libdir=/usr/local/v6/lib
8936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008938rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008939
8940 ;;
8941 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008943/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008945#include <features.h>
8946#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
8947yes
8948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008949_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008952 ipv6type=$i;
8953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008955rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008956
8957 ;;
8958 linux-inet6)
8959 if test -d /usr/inet6; then
8960 ipv6type=$i
8961 ipv6lib=inet6
8962 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00008963 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008964 fi
8965 ;;
8966 solaris)
8967 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00008968 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008969 ipv6type=$i
8970 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008971 fi
8972 fi
8973 ;;
8974 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008977
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008978#include <sys/param.h>
8979#ifdef _TOSHIBA_INET6
8980yes
8981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008982_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008985 ipv6type=$i;
8986 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00008987 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008990
8991 ;;
8992 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00008996#include </usr/local/v6/include/sys/v6config.h>
8997#ifdef __V6D__
8998yes
8999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009003 ipv6type=$i;
9004 ipv6lib=v6;
9005 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009006 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009007fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009008rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009009
9010 ;;
9011 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009014
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009015#include <sys/param.h>
9016#ifdef _ZETA_MINAMI_INET6
9017yes
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009022 ipv6type=$i;
9023 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009024 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009027
9028 ;;
9029 esac
9030 if test "$ipv6type" != "unknown"; then
9031 break
9032 fi
9033 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9035$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009036fi
9037
9038if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9039 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9040 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9041 echo "using lib$ipv6lib"
9042 else
9043 if test $ipv6trylibc = "yes"; then
9044 echo "using libc"
9045 else
9046 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9047 echo "You need to fetch lib$ipv6lib.a from appropriate"
9048 echo 'ipv6 kit and compile beforehand.'
9049 exit 1
9050 fi
9051 fi
9052fi
9053
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9055$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009057/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009058
9059 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009060int
9061main ()
9062{
9063FSIORefNum fRef = 0
9064 ;
9065 return 0;
9066}
Matthias Kloseb159a552010-04-25 21:00:44 +00009067
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009069if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009070
Matthias Kloseb159a552010-04-25 21:00:44 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009076
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009077else
Matthias Kloseb159a552010-04-25 21:00:44 +00009078
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009081
9082fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9084
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009085# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9087$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009089# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009090if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009091 withval=$with_doc_strings;
9092fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009093
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009094
9095if test -z "$with_doc_strings"
9096then with_doc_strings="yes"
9097fi
9098if test "$with_doc_strings" != "no"
9099then
9100
Matthias Kloseb9621712010-04-24 17:59:49 +00009101$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009102
9103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9105$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009106
Antoine Pitrou042b1282010-08-13 21:15:58 +00009107# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9109$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009110
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009111# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009112if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009113 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009114if test "$withval" != no
9115then
9116
Matthias Kloseb9621712010-04-24 17:59:49 +00009117$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9120$as_echo "yes" >&6; }
9121else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009123fi
9124else
Matthias Kloseb9621712010-04-24 17:59:49 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127fi
9128
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009129
9130# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9132$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009135if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 withval=$with_pymalloc;
9137fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009138
Neil Schemenauera35c6882001-02-27 04:45:05 +00009139
Neil Schemenauer16c22972002-03-22 15:34:49 +00009140if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009141then
9142 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009143 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009144fi
9145if test "$with_pymalloc" != "no"
9146then
Martin v. Löwis11437992002-04-12 09:54:03 +00009147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009149
9150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9152$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009153
Benjamin Peterson05159c42009-12-03 03:01:27 +00009154# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9156$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009157
9158# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009160 withval=$with_valgrind;
9161else
9162 with_valgrind=no
9163fi
9164
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9166$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009167if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009168 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 +00009169if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009172
9173else
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009174 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009175
9176fi
9177
9178
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009179 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009180fi
9181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009182# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009183
Guido van Rossum98935bf2001-09-05 19:13:16 +00009184DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009185
Guido van Rossume97ee181999-12-20 21:27:22 +00009186# the dlopen() function means we might want to use dynload_shlib.o. some
9187# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009188for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009189do :
9190 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009191if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009193#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009195
Guido van Rossume97ee181999-12-20 21:27:22 +00009196fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009197done
Guido van Rossume97ee181999-12-20 21:27:22 +00009198
Michael W. Hudson54241132001-12-07 15:38:26 +00009199
Guido van Rossume97ee181999-12-20 21:27:22 +00009200# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9201# loading of modules.
9202
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9204$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009205if test -z "$DYNLOADFILE"
9206then
9207 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009208 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9209 if test "$ac_cv_func_dlopen" = yes
9210 then DYNLOADFILE="dynload_shlib.o"
9211 else DYNLOADFILE="dynload_aix.o"
9212 fi
9213 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009214 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009215 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9216 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009217 *)
9218 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9219 # out any dynamic loading
9220 if test "$ac_cv_func_dlopen" = yes
9221 then DYNLOADFILE="dynload_shlib.o"
9222 else DYNLOADFILE="dynload_stub.o"
9223 fi
9224 ;;
9225 esac
9226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9228$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009229if test "$DYNLOADFILE" != "dynload_stub.o"
9230then
Martin v. Löwis11437992002-04-12 09:54:03 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009233
9234fi
9235
Neil Schemenauer4e425612001-06-19 15:44:15 +00009236# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9237
Michael W. Hudson54241132001-12-07 15:38:26 +00009238
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9240$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009241if test -z "$MACHDEP_OBJS"
9242then
Jack Jansene578a632001-08-15 01:27:14 +00009243 MACHDEP_OBJS=$extra_machdep_objs
9244else
9245 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9248$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009249
Guido van Rossum627b2d71993-12-24 10:39:16 +00009250# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009251for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Antoine Pitrou8250e232011-02-25 23:41:16 +00009252 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009253 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
9254 futimens futimes \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009255 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009256 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009257 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mbrtowc mkdirat mkfifo \
Antoine Pitrouf65132d2011-02-25 23:25:17 +00009258 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009259 posix_fallocate posix_fadvise pread \
9260 pthread_init putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009261 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009262 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009263 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009264 sigaction siginterrupt sigrelse snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009265 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009266 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9267 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009268do :
9269 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9270ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009271if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009272 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009273#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009274_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009275
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009276fi
9277done
9278
Michael W. Hudson54241132001-12-07 15:38:26 +00009279
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009280# For some functions, having a definition is not sufficient, since
9281# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9283$as_echo_n "checking for chroot... " >&6; }
9284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009285/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009286#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009287int
9288main ()
9289{
9290void *x=chroot
9291 ;
9292 return 0;
9293}
9294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009295if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009296
Matthias Kloseb9621712010-04-24 17:59:49 +00009297$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009298
Matthias Kloseb159a552010-04-25 21:00:44 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009300$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009301else
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9303$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009304
9305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9308$as_echo_n "checking for link... " >&6; }
9309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009310/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009311#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009312int
9313main ()
9314{
9315void *x=link
9316 ;
9317 return 0;
9318}
9319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009321
Matthias Kloseb9621712010-04-24 17:59:49 +00009322$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009323
Matthias Kloseb159a552010-04-25 21:00:44 +00009324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009325$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009326else
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9328$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009329
9330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9333$as_echo_n "checking for symlink... " >&6; }
9334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009336#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009337int
9338main ()
9339{
9340void *x=symlink
9341 ;
9342 return 0;
9343}
9344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009346
Matthias Kloseb9621712010-04-24 17:59:49 +00009347$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009348
Matthias Kloseb159a552010-04-25 21:00:44 +00009349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009350$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009351else
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9353$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009354
9355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9358$as_echo_n "checking for fchdir... " >&6; }
9359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009360/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009361#include <unistd.h>
9362int
9363main ()
9364{
9365void *x=fchdir
9366 ;
9367 return 0;
9368}
9369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009371
Matthias Kloseb9621712010-04-24 17:59:49 +00009372$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009373
Matthias Kloseb159a552010-04-25 21:00:44 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009375$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009376else
Matthias Kloseb9621712010-04-24 17:59:49 +00009377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9378$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009379
9380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9383$as_echo_n "checking for fsync... " >&6; }
9384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009385/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009386#include <unistd.h>
9387int
9388main ()
9389{
9390void *x=fsync
9391 ;
9392 return 0;
9393}
9394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009396
Matthias Kloseb9621712010-04-24 17:59:49 +00009397$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009398
Matthias Kloseb159a552010-04-25 21:00:44 +00009399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009400$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009401else
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009404
9405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9408$as_echo_n "checking for fdatasync... " >&6; }
9409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009410/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009411#include <unistd.h>
9412int
9413main ()
9414{
9415void *x=fdatasync
9416 ;
9417 return 0;
9418}
9419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009421
Matthias Kloseb9621712010-04-24 17:59:49 +00009422$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009423
Matthias Kloseb159a552010-04-25 21:00:44 +00009424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009425$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009426else
Matthias Kloseb9621712010-04-24 17:59:49 +00009427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009429
9430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9433$as_echo_n "checking for epoll... " >&6; }
9434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009435/* end confdefs.h. */
9436#include <sys/epoll.h>
9437int
9438main ()
9439{
9440void *x=epoll_create
9441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009448
Matthias Kloseb159a552010-04-25 21:00:44 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009450$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009451else
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9453$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009454
9455fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9458$as_echo_n "checking for kqueue... " >&6; }
9459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009460/* end confdefs.h. */
9461
9462#include <sys/types.h>
9463#include <sys/event.h>
9464
9465int
9466main ()
9467{
9468int x=kqueue()
9469 ;
9470 return 0;
9471}
9472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009473if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009474
Matthias Kloseb9621712010-04-24 17:59:49 +00009475$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009476
Matthias Kloseb159a552010-04-25 21:00:44 +00009477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009478$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009479else
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009482
9483fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009485# On some systems (eg. FreeBSD 5), we would find a definition of the
9486# functions ctermid_r, setgroups in the library, but no prototype
9487# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9488# address to avoid compiler warnings and potential miscompilations
9489# because of the missing prototypes.
9490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9492$as_echo_n "checking for ctermid_r... " >&6; }
9493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009494/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009495
Martin v. Löwisd5843682002-11-21 20:41:28 +00009496#include <stdio.h>
9497
Martin v. Löwisd5843682002-11-21 20:41:28 +00009498int
9499main ()
9500{
9501void* p = ctermid_r
9502 ;
9503 return 0;
9504}
9505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009507
Matthias Kloseb9621712010-04-24 17:59:49 +00009508$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009509
Matthias Kloseb159a552010-04-25 21:00:44 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009511$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009512else
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9514$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009515
9516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9518
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9520$as_echo_n "checking for flock declaration... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009521if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009522 $as_echo_n "(cached) " >&6
9523else
9524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009525/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009526#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009527int
9528main ()
9529{
9530void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009531
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009532 ;
9533 return 0;
9534}
9535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009536if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009537 ac_cv_flock_decl=yes
9538else
9539 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009540
9541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +00009543
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009544fi
9545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9546$as_echo "$ac_cv_flock_decl" >&6; }
9547if test "x${ac_cv_flock_decl}" = xyes; then
9548 for ac_func in flock
9549do :
9550 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009551if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009552 cat >>confdefs.h <<_ACEOF
9553#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +00009554_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009555
Antoine Pitroua3000072010-09-07 14:52:42 +00009556else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +00009558$as_echo_n "checking for flock in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009559if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +00009560 $as_echo_n "(cached) " >&6
9561else
9562 ac_check_lib_save_LIBS=$LIBS
9563LIBS="-lbsd $LIBS"
9564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9565/* end confdefs.h. */
9566
9567/* Override any GCC internal prototype to avoid an error.
9568 Use char because int might match the return type of a GCC
9569 builtin and then its argument prototype would still apply. */
9570#ifdef __cplusplus
9571extern "C"
9572#endif
9573char flock ();
9574int
9575main ()
9576{
9577return flock ();
9578 ;
9579 return 0;
9580}
9581_ACEOF
9582if ac_fn_c_try_link "$LINENO"; then :
9583 ac_cv_lib_bsd_flock=yes
9584else
9585 ac_cv_lib_bsd_flock=no
9586fi
9587rm -f core conftest.err conftest.$ac_objext \
9588 conftest$ac_exeext conftest.$ac_ext
9589LIBS=$ac_check_lib_save_LIBS
9590fi
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9592$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009593if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009594 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +00009595
9596
9597$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9598
9599
9600fi
9601
9602
9603fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +00009604done
9605
Antoine Pitroua3000072010-09-07 14:52:42 +00009606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9609$as_echo_n "checking for getpagesize... " >&6; }
9610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009612
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009613#include <unistd.h>
9614
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009615int
9616main ()
9617{
9618void* p = getpagesize
9619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009626
Matthias Kloseb159a552010-04-25 21:00:44 +00009627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009628$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009632
9633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009635
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009636for ac_prog in true
9637do
9638 # Extract the first word of "$ac_prog", so it can be a program name with args.
9639set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009642if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009644else
9645 if test -n "$TRUE"; then
9646 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
9647else
9648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649for as_dir in $PATH
9650do
9651 IFS=$as_save_IFS
9652 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654 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 +00009655 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 $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 +00009657 break 2
9658 fi
9659done
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009662
9663fi
9664fi
9665TRUE=$ac_cv_prog_TRUE
9666if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
9668$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669else
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009672fi
9673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009674
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675 test -n "$TRUE" && break
9676done
9677test -n "$TRUE" || TRUE="/bin/true"
9678
9679
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
9681$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009682if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009684else
9685 ac_check_lib_save_LIBS=$LIBS
9686LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690/* Override any GCC internal prototype to avoid an error.
9691 Use char because int might match the return type of a GCC
9692 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009693#ifdef __cplusplus
9694extern "C"
9695#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009696char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009697int
9698main ()
9699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009701 ;
9702 return 0;
9703}
9704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009705if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009706 ac_cv_lib_c_inet_aton=yes
9707else
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009710rm -f core conftest.err conftest.$ac_objext \
9711 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009712LIBS=$ac_check_lib_save_LIBS
9713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
9715$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009716if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009718else
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
9720$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009721if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009723else
9724 ac_check_lib_save_LIBS=$LIBS
9725LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009727/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729/* Override any GCC internal prototype to avoid an error.
9730 Use char because int might match the return type of a GCC
9731 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009732#ifdef __cplusplus
9733extern "C"
9734#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009735char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009736int
9737main ()
9738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009740 ;
9741 return 0;
9742}
9743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009745 ac_cv_lib_resolv_inet_aton=yes
9746else
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009749rm -f core conftest.err conftest.$ac_objext \
9750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009751LIBS=$ac_check_lib_save_LIBS
9752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
9754$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009755if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009756 cat >>confdefs.h <<_ACEOF
9757#define HAVE_LIBRESOLV 1
9758_ACEOF
9759
9760 LIBS="-lresolv $LIBS"
9761
9762fi
9763
9764
9765fi
9766
9767
Christian Heimesd0764e22007-12-04 15:00:33 +00009768# On Tru64, chflags seems to be present, but calling it will
9769# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +00009770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
9771$as_echo_n "checking for chflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009772if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009776 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009777else
Matthias Kloseb9621712010-04-24 17:59:49 +00009778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009779/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009780[
Christian Heimesd0764e22007-12-04 15:00:33 +00009781#include <sys/stat.h>
9782#include <unistd.h>
9783int main(int argc, char*argv[])
9784{
9785 if(chflags(argv[0], 0) != 0)
9786 return 1;
9787 return 0;
9788}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009789]
Christian Heimesd0764e22007-12-04 15:00:33 +00009790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009791if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009792 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009793else
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009798fi
9799
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
9803$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009804if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009806if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009807 ac_cv_have_chflags="yes"
9808else
9809 ac_cv_have_chflags="no"
9810fi
9811
9812fi
9813if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009814
Matthias Kloseb9621712010-04-24 17:59:49 +00009815$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009816
9817fi
9818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
9820$as_echo_n "checking for lchflags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009821if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009823else
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009825 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +00009828/* end confdefs.h. */
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009829[
Christian Heimesd0764e22007-12-04 15:00:33 +00009830#include <sys/stat.h>
9831#include <unistd.h>
9832int main(int argc, char*argv[])
9833{
9834 if(lchflags(argv[0], 0) != 0)
9835 return 1;
9836 return 0;
9837}
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009838]
Christian Heimesd0764e22007-12-04 15:00:33 +00009839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009840if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009841 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009842else
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +00009844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +00009847fi
9848
9849
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
9852$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009853if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009855if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +00009856 ac_cv_have_lchflags="yes"
9857else
9858 ac_cv_have_lchflags="no"
9859fi
9860
9861fi
9862if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009863
Matthias Kloseb9621712010-04-24 17:59:49 +00009864$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009865
9866fi
9867
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009868case $ac_sys_system/$ac_sys_release in
9869Darwin/*)
9870 _CUR_CFLAGS="${CFLAGS}"
9871 _CUR_LDFLAGS="${LDFLAGS}"
9872 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
9873 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
9874 ;;
9875esac
9876
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
9878$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009879if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009881else
9882 ac_check_lib_save_LIBS=$LIBS
9883LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009885/* end confdefs.h. */
9886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887/* Override any GCC internal prototype to avoid an error.
9888 Use char because int might match the return type of a GCC
9889 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009890#ifdef __cplusplus
9891extern "C"
9892#endif
9893char inflateCopy ();
9894int
9895main ()
9896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009898 ;
9899 return 0;
9900}
9901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009902if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009903 ac_cv_lib_z_inflateCopy=yes
9904else
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009907rm -f core conftest.err conftest.$ac_objext \
9908 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009909LIBS=$ac_check_lib_save_LIBS
9910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
9912$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00009913if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009914
Matthias Kloseb9621712010-04-24 17:59:49 +00009915$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +00009916
9917fi
9918
9919
9920case $ac_sys_system/$ac_sys_release in
9921Darwin/*)
9922 CFLAGS="${_CUR_CFLAGS}"
9923 LDFLAGS="${_CUR_LDFLAGS}"
9924 ;;
9925esac
9926
Matthias Kloseb9621712010-04-24 17:59:49 +00009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
9928$as_echo_n "checking for hstrerror... " >&6; }
9929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009930/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009931
Martin v. Löwise9416172003-05-03 10:12:45 +00009932#include <netdb.h>
9933
Martin v. Löwise9416172003-05-03 10:12:45 +00009934int
9935main ()
9936{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009937void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009938 ;
9939 return 0;
9940}
9941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009942if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009943
Matthias Kloseb9621712010-04-24 17:59:49 +00009944$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009945
Matthias Kloseb159a552010-04-25 21:00:44 +00009946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009947$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009948else
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009951
9952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009953rm -f core conftest.err conftest.$ac_objext \
9954 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009955
Matthias Kloseb9621712010-04-24 17:59:49 +00009956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
9957$as_echo_n "checking for inet_aton... " >&6; }
9958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009960
Martin v. Löwis86d66262006-02-17 08:40:11 +00009961#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009962#include <sys/socket.h>
9963#include <netinet/in.h>
9964#include <arpa/inet.h>
9965
Martin v. Löwise9416172003-05-03 10:12:45 +00009966int
9967main ()
9968{
Martin v. Löwis95c419b2003-05-03 12:10:48 +00009969void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +00009970 ;
9971 return 0;
9972}
9973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009974if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +00009975
Matthias Kloseb9621712010-04-24 17:59:49 +00009976$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +00009977
Matthias Kloseb159a552010-04-25 21:00:44 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009979$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009980else
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +00009983
9984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
9989$as_echo_n "checking for inet_pton... " >&6; }
9990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009991/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +00009992
Martin v. Löwisf2e488d2003-05-05 22:00:11 +00009993#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +00009994#include <sys/socket.h>
9995#include <netinet/in.h>
9996#include <arpa/inet.h>
9997
Martin v. Löwise9416172003-05-03 10:12:45 +00009998int
9999main ()
10000{
10001void* p = inet_pton
10002 ;
10003 return 0;
10004}
10005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010009
Matthias Kloseb159a552010-04-25 21:00:44 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010011$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010012else
Matthias Kloseb9621712010-04-24 17:59:49 +000010013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010015
10016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010018
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010019# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10021$as_echo_n "checking for setgroups... " >&6; }
10022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010024
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010025#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010026#ifdef HAVE_GRP_H
10027#include <grp.h>
10028#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010029
Martin v. Löwisd5843682002-11-21 20:41:28 +000010030int
10031main ()
10032{
10033void* p = setgroups
10034 ;
10035 return 0;
10036}
10037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010038if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010039
Matthias Kloseb9621712010-04-24 17:59:49 +000010040$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010041
Matthias Kloseb159a552010-04-25 21:00:44 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010043$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010044else
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010047
10048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010051# check for openpty and forkpty
10052
10053for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010054do :
10055 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010056if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010057 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010058#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010059_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010060
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010061else
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10063$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010064if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010065 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010066else
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010068LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072/* Override any GCC internal prototype to avoid an error.
10073 Use char because int might match the return type of a GCC
10074 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010075#ifdef __cplusplus
10076extern "C"
10077#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010078char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010079int
10080main ()
10081{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010082return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010083 ;
10084 return 0;
10085}
10086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010089else
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092rm -f core conftest.err conftest.$ac_objext \
10093 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010094LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10097$as_echo "$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010098if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010100 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010101else
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10103$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010104if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010106else
10107 ac_check_lib_save_LIBS=$LIBS
10108LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010110/* end confdefs.h. */
10111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010112/* Override any GCC internal prototype to avoid an error.
10113 Use char because int might match the return type of a GCC
10114 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010115#ifdef __cplusplus
10116extern "C"
10117#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010118char openpty ();
10119int
10120main ()
10121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010123 ;
10124 return 0;
10125}
10126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010128 ac_cv_lib_bsd_openpty=yes
10129else
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010132rm -f core conftest.err conftest.$ac_objext \
10133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010134LIBS=$ac_check_lib_save_LIBS
10135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10137$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010138if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010140 LIBS="$LIBS -lbsd"
10141fi
10142
10143
10144fi
10145
Fred Drake8cef4cf2000-06-28 16:40:38 +000010146
10147fi
10148done
10149
10150for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010151do :
10152 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010153if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010154 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010155#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010156_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010157
Fred Drake8cef4cf2000-06-28 16:40:38 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10160$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010161if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010163else
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010165LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169/* Override any GCC internal prototype to avoid an error.
10170 Use char because int might match the return type of a GCC
10171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010172#ifdef __cplusplus
10173extern "C"
10174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010175char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010176int
10177main ()
10178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ;
10181 return 0;
10182}
10183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189rm -f core conftest.err conftest.$ac_objext \
10190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010191LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10194$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010195if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010197 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10200$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010201if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010203else
10204 ac_check_lib_save_LIBS=$LIBS
10205LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010207/* end confdefs.h. */
10208
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209/* Override any GCC internal prototype to avoid an error.
10210 Use char because int might match the return type of a GCC
10211 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010212#ifdef __cplusplus
10213extern "C"
10214#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010215char forkpty ();
10216int
10217main ()
10218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010220 ;
10221 return 0;
10222}
10223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010224if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010225 ac_cv_lib_bsd_forkpty=yes
10226else
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229rm -f core conftest.err conftest.$ac_objext \
10230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010231LIBS=$ac_check_lib_save_LIBS
10232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10234$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010235if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010237 LIBS="$LIBS -lbsd"
10238fi
10239
10240
10241fi
10242
Fred Drake8cef4cf2000-06-28 16:40:38 +000010243
10244fi
10245done
10246
Jack Jansendd19cf82001-12-06 22:36:17 +000010247
Christian Heimesb186d002008-03-18 15:15:01 +000010248# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010249for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010250do :
10251 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010252if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010254#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010255_ACEOF
10256
10257fi
10258done
10259
10260
Michael W. Hudson54241132001-12-07 15:38:26 +000010261# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010263do :
10264 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10265ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010266if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010268#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010269_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010270
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010271fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010272done
10273
Michael W. Hudson54241132001-12-07 15:38:26 +000010274
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010275ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
10276if test "x$ac_cv_func_dup2" = xyes; then :
10277 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010278
Martin v. Löwis1142de32002-03-29 16:28:31 +000010279else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010280 case " $LIBOBJS " in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010281 *" dup2.$ac_objext "* ) ;;
10282 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010284esac
10285
Martin v. Löwis1142de32002-03-29 16:28:31 +000010286fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010287
10288ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
10289if test "x$ac_cv_func_getcwd" = xyes; then :
10290 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10291
10292else
10293 case " $LIBOBJS " in
10294 *" getcwd.$ac_objext "* ) ;;
10295 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10296 ;;
10297esac
10298
10299fi
10300
10301ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
10302if test "x$ac_cv_func_strdup" = xyes; then :
10303 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10304
10305else
10306 case " $LIBOBJS " in
10307 *" strdup.$ac_objext "* ) ;;
10308 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10309 ;;
10310esac
10311
10312fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010313
10314
10315for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010316do :
10317 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010318if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010319 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010320#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010323/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010324#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010325int
10326main ()
10327{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010328getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ;
10330 return 0;
10331}
10332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010336
Guido van Rossum627b2d71993-12-24 10:39:16 +000010337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010339
Guido van Rossum627b2d71993-12-24 10:39:16 +000010340fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010341done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010342
Jack Jansen150753c2003-03-29 22:07:47 +000010343for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010344do :
10345 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010346if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010347 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010351/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010352#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010353int
10354main ()
10355{
10356setpgrp(0,0);
10357 ;
10358 return 0;
10359}
10360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
Matthias Kloseb9621712010-04-24 17:59:49 +000010363$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010364
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010367
10368fi
10369done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010370
Thomas Wouters3a584202000-08-05 23:28:51 +000010371for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010372do :
10373 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010374if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010376#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010380#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010381int
10382main ()
10383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010384gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010385 ;
10386 return 0;
10387}
10388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389if ac_fn_c_try_compile "$LINENO"; then :
10390
Guido van Rossum627b2d71993-12-24 10:39:16 +000010391else
Skip Montanaro6dead952003-09-25 14:50:04 +000010392
Matthias Kloseb9621712010-04-24 17:59:49 +000010393$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010394
Martin v. Löwis11437992002-04-12 09:54:03 +000010395
Guido van Rossum627b2d71993-12-24 10:39:16 +000010396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010398
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010399fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010400done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010401
Michael W. Hudson54241132001-12-07 15:38:26 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10404$as_echo_n "checking for major... " >&6; }
10405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010406/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010407
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010408#if defined(MAJOR_IN_MKDEV)
10409#include <sys/mkdev.h>
10410#elif defined(MAJOR_IN_SYSMACROS)
10411#include <sys/sysmacros.h>
10412#else
10413#include <sys/types.h>
10414#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010415
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010416int
10417main ()
10418{
10419
10420 makedev(major(0),minor(0));
10421
10422 ;
10423 return 0;
10424}
10425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010426if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010427
10428
Matthias Kloseb9621712010-04-24 17:59:49 +000010429$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010430
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10432$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010433
10434else
Skip Montanaro6dead952003-09-25 14:50:04 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10437$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010438
10439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010440rm -f core conftest.err conftest.$ac_objext \
10441 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010442
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010443# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010444# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000010445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10446$as_echo_n "checking for getaddrinfo... " >&6; }
10447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010449
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010450#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010451#include <sys/socket.h>
10452#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010453#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010454
Martin v. Löwis11437992002-04-12 09:54:03 +000010455int
10456main ()
10457{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010458getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010464 have_getaddrinfo=yes
10465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468rm -f core conftest.err conftest.$ac_objext \
10469 conftest$ac_exeext conftest.$ac_ext
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10471$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010472if test $have_getaddrinfo = yes
10473then
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10475$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010476 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010478else
Matthias Kloseb9621712010-04-24 17:59:49 +000010479 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010480 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010481else
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010483/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010484
10485#include <sys/types.h>
10486#include <netdb.h>
10487#include <string.h>
10488#include <sys/socket.h>
10489#include <netinet/in.h>
10490
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010491int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010492{
10493 int passive, gaierr, inet4 = 0, inet6 = 0;
10494 struct addrinfo hints, *ai, *aitop;
10495 char straddr[INET6_ADDRSTRLEN], strport[16];
10496
10497 for (passive = 0; passive <= 1; passive++) {
10498 memset(&hints, 0, sizeof(hints));
10499 hints.ai_family = AF_UNSPEC;
10500 hints.ai_flags = passive ? AI_PASSIVE : 0;
10501 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010502 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010503 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10504 (void)gai_strerror(gaierr);
10505 goto bad;
10506 }
10507 for (ai = aitop; ai; ai = ai->ai_next) {
10508 if (ai->ai_addr == NULL ||
10509 ai->ai_addrlen == 0 ||
10510 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10511 straddr, sizeof(straddr), strport, sizeof(strport),
10512 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10513 goto bad;
10514 }
10515 switch (ai->ai_family) {
10516 case AF_INET:
10517 if (strcmp(strport, "54321") != 0) {
10518 goto bad;
10519 }
10520 if (passive) {
10521 if (strcmp(straddr, "0.0.0.0") != 0) {
10522 goto bad;
10523 }
10524 } else {
10525 if (strcmp(straddr, "127.0.0.1") != 0) {
10526 goto bad;
10527 }
10528 }
10529 inet4++;
10530 break;
10531 case AF_INET6:
10532 if (strcmp(strport, "54321") != 0) {
10533 goto bad;
10534 }
10535 if (passive) {
10536 if (strcmp(straddr, "::") != 0) {
10537 goto bad;
10538 }
10539 } else {
10540 if (strcmp(straddr, "::1") != 0) {
10541 goto bad;
10542 }
10543 }
10544 inet6++;
10545 break;
10546 case AF_UNSPEC:
10547 goto bad;
10548 break;
10549 default:
10550 /* another family support? */
10551 break;
10552 }
10553 }
10554 }
10555
10556 if (!(inet4 == 0 || inet4 == 2))
10557 goto bad;
10558 if (!(inet6 == 0 || inet6 == 2))
10559 goto bad;
10560
10561 if (aitop)
10562 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010563 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010564
10565 bad:
10566 if (aitop)
10567 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010568 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010569}
10570
Martin v. Löwis11437992002-04-12 09:54:03 +000010571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010573 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010574else
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010581fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010582
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10586$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10587
Mark Dickinson2df5d282009-12-31 21:22:50 +000010588if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010589then
10590 if test $ipv6 = yes
10591 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010592 echo 'Fatal: You must get working getaddrinfo() function.'
10593 echo ' or you can specify "--disable-ipv6"'.
10594 exit 1
10595 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010596else
Martin v. Löwis11437992002-04-12 09:54:03 +000010597
Matthias Kloseb9621712010-04-24 17:59:49 +000010598$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010599
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010600fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000010601
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010602for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000010603do :
10604 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010605if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010607#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010608_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010609
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010610fi
10611done
10612
Michael W. Hudson54241132001-12-07 15:38:26 +000010613
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010614# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000010615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10616$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 +000010617if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010618 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010619else
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010622#include <sys/types.h>
10623#include <sys/time.h>
10624#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010625
Martin v. Löwis11437992002-04-12 09:54:03 +000010626int
10627main ()
10628{
10629if ((struct tm *) 0)
10630return 0;
10631 ;
10632 return 0;
10633}
10634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010636 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000010637else
Matthias Kloseb9621712010-04-24 17:59:49 +000010638 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10643$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010644if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010645
Matthias Kloseb9621712010-04-24 17:59:49 +000010646$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010647
10648fi
10649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10651$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 +000010652if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010654else
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010656/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010657#include <sys/types.h>
10658#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010659
Martin v. Löwis11437992002-04-12 09:54:03 +000010660int
10661main ()
10662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663struct tm tm;
10664 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 ;
10667 return 0;
10668}
10669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010670if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010671 ac_cv_struct_tm=time.h
10672else
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10678$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010679if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010682
10683fi
10684
Matthias Kloseb9621712010-04-24 17:59:49 +000010685ac_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 +000010686#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000010687
Matthias Kloseb9621712010-04-24 17:59:49 +000010688"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010689if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010690
10691cat >>confdefs.h <<_ACEOF
10692#define HAVE_STRUCT_TM_TM_ZONE 1
10693_ACEOF
10694
10695
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010696fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010697
Martin v. Löwis11437992002-04-12 09:54:03 +000010698if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
10699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010701
10702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
10704"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010705if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707else
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709fi
10710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010712#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010713_ACEOF
10714
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
10716$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010717if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010722#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723#if !HAVE_DECL_TZNAME
10724extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000010725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010726
Martin v. Löwis11437992002-04-12 09:54:03 +000010727int
10728main ()
10729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 ;
10732 return 0;
10733}
10734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010735if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010736 ac_cv_var_tzname=yes
10737else
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010740rm -f core conftest.err conftest.$ac_objext \
10741 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000010742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
10744$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000010745 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010746
Matthias Kloseb9621712010-04-24 17:59:49 +000010747$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010749 fi
10750fi
10751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752ac_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 +000010753if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010754
10755cat >>confdefs.h <<_ACEOF
10756#define HAVE_STRUCT_STAT_ST_RDEV 1
10757_ACEOF
10758
10759
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010760fi
10761
Matthias Kloseb9621712010-04-24 17:59:49 +000010762ac_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 +000010763if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010764
Martin v. Löwis11437992002-04-12 09:54:03 +000010765cat >>confdefs.h <<_ACEOF
10766#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
10767_ACEOF
10768
10769
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010770fi
10771
Matthias Kloseb9621712010-04-24 17:59:49 +000010772ac_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 +000010773if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000010774
10775cat >>confdefs.h <<_ACEOF
10776#define HAVE_STRUCT_STAT_ST_FLAGS 1
10777_ACEOF
10778
10779
10780fi
10781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782ac_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 +000010783if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010784
10785cat >>confdefs.h <<_ACEOF
10786#define HAVE_STRUCT_STAT_ST_GEN 1
10787_ACEOF
10788
10789
10790fi
10791
Matthias Kloseb9621712010-04-24 17:59:49 +000010792ac_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 +000010793if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000010794
10795cat >>confdefs.h <<_ACEOF
10796#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
10797_ACEOF
10798
10799
10800fi
10801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802ac_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 +000010803if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000010804
Martin v. Löwis11437992002-04-12 09:54:03 +000010805cat >>confdefs.h <<_ACEOF
10806#define HAVE_STRUCT_STAT_ST_BLOCKS 1
10807_ACEOF
10808
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010811
10812else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000010814 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010815 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
10816 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010817esac
10818
Guido van Rossum98bf58f2001-10-18 20:34:25 +000010819fi
10820
Michael W. Hudson54241132001-12-07 15:38:26 +000010821
Martin v. Löwis11437992002-04-12 09:54:03 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
10824$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010825if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010827else
Matthias Kloseb159a552010-04-25 21:00:44 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010831#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010832int
10833main ()
10834{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000010836 ;
10837 return 0;
10838}
10839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010840if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010841 ac_cv_header_time_altzone=yes
10842else
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000010844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000010846
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010847fi
10848
Matthias Kloseb9621712010-04-24 17:59:49 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
10850$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010851if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010852
Matthias Kloseb9621712010-04-24 17:59:49 +000010853$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854
10855fi
10856
Guido van Rossumda88dad1995-01-26 00:46:29 +000010857was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
10859$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
10860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000010862
10863#include <sys/types.h>
10864#include <sys/select.h>
10865#include <sys/time.h>
10866
Martin v. Löwis11437992002-04-12 09:54:03 +000010867int
10868main ()
10869{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010870;
Martin v. Löwis11437992002-04-12 09:54:03 +000010871 ;
10872 return 0;
10873}
10874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010875if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010876
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010879
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010880 was_it_defined=yes
10881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
10885$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
10888$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010889if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010893/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010894#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010895int
10896main ()
10897{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010898struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 ;
10900 return 0;
10901}
10902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010904 ac_cv_struct_addrinfo=yes
10905else
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10909fi
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
10912$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010913if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010914
Matthias Kloseb9621712010-04-24 17:59:49 +000010915$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010916
10917fi
10918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
10920$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010921if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010923else
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010925/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010926
10927# include <sys/types.h>
10928# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010929int
10930main ()
10931{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010932struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 ;
10934 return 0;
10935}
10936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010937if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010938 ac_cv_struct_sockaddr_storage=yes
10939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10943fi
10944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
10946$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950
10951fi
10952
Guido van Rossum627b2d71993-12-24 10:39:16 +000010953# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000010954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
10956$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010957if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000010959else
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010963int
10964main ()
10965{
10966static int test_array [1 - 2 * !(((char) -1) < 0)];
10967test_array [0] = 0
10968
10969 ;
10970 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000010971}
Martin v. Löwis11437992002-04-12 09:54:03 +000010972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010973if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000010974 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010975else
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
10981$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010982if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010984
10985fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10988$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000010989if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010993/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010994
Martin v. Löwis11437992002-04-12 09:54:03 +000010995int
10996main ()
10997{
10998/* FIXME: Include the comments suggested by Paul. */
10999#ifndef __cplusplus
11000 /* Ultrix mips cc rejects this. */
11001 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 char const *const *pcpcc;
11005 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011006 /* NEC SVR4.0.2 mips cc rejects this. */
11007 struct point {int x, y;};
11008 static struct point const zero = {0,0};
11009 /* AIX XL C 1.02.0.0 rejects this.
11010 It does not let you subtract one const X* pointer from another in
11011 an arm of an if-expression whose if-part is not a constant
11012 expression */
11013 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 ++pcpcc;
11017 ppc = (char**) pcpcc;
11018 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 { /* SCO 3.2v4 cc rejects this. */
11020 char *t;
11021 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011022
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011025 }
11026 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11027 int x[] = {25, 17};
11028 const int *foo = &x[0];
11029 ++foo;
11030 }
11031 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11032 typedef const int *iptr;
11033 iptr p = 0;
11034 ++p;
11035 }
11036 { /* AIX XL C 1.02.0.0 rejects this saying
11037 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11038 struct s { int j; const int *ap[3]; };
11039 struct s *b; b->j = 5;
11040 }
11041 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11042 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011046#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011047
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ;
11049 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011050}
Martin v. Löwis11437992002-04-12 09:54:03 +000011051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053 ac_cv_c_const=yes
11054else
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11060$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011062
Matthias Kloseb9621712010-04-24 17:59:49 +000011063$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011064
11065fi
11066
Michael W. Hudson54241132001-12-07 15:38:26 +000011067
Guido van Rossumda88dad1995-01-26 00:46:29 +000011068works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11070$as_echo_n "checking for working volatile... " >&6; }
11071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011073
Martin v. Löwis11437992002-04-12 09:54:03 +000011074int
11075main ()
11076{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011077volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011078 ;
11079 return 0;
11080}
11081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011083 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011084else
Skip Montanaro6dead952003-09-25 14:50:04 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011087
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011088
Guido van Rossum627b2d71993-12-24 10:39:16 +000011089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11092$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011093
Guido van Rossumda88dad1995-01-26 00:46:29 +000011094works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11096$as_echo_n "checking for working signed char... " >&6; }
11097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011098/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011099
Martin v. Löwis11437992002-04-12 09:54:03 +000011100int
11101main ()
11102{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011103signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 ;
11105 return 0;
11106}
11107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011108if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011109 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011110else
Skip Montanaro6dead952003-09-25 14:50:04 +000011111
Matthias Kloseb9621712010-04-24 17:59:49 +000011112$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011113
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011114
Guido van Rossum7f43da71994-08-01 12:15:30 +000011115fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11118$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011119
Guido van Rossumda88dad1995-01-26 00:46:29 +000011120have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11122$as_echo_n "checking for prototypes... " >&6; }
11123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011125int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011126int
11127main ()
11128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011130 ;
11131 return 0;
11132}
11133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
Matthias Kloseb9621712010-04-24 17:59:49 +000011136$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
Matthias Kloseb159a552010-04-25 21:00:44 +000011138 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11142$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011143
Guido van Rossumda88dad1995-01-26 00:46:29 +000011144works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11146$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011149
11150#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011151int foo(int x, ...) {
11152 va_list va;
11153 va_start(va, x);
11154 va_arg(va, int);
11155 va_arg(va, char *);
11156 va_arg(va, double);
11157 return 0;
11158}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011159
Martin v. Löwis11437992002-04-12 09:54:03 +000011160int
11161main ()
11162{
Guido van Rossum90eea071996-08-30 20:58:57 +000011163return foo(10, "", 3.14);
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 :
Martin v. Löwis11437992002-04-12 09:54:03 +000011169
11170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011172
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011173 works=yes
11174
Guido van Rossum627b2d71993-12-24 10:39:16 +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 Rossum76be6ed1995-01-02 18:33:54 +000011179
Martin v. Löwisd6320502004-08-12 13:45:08 +000011180# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11182$as_echo_n "checking for socketpair... " >&6; }
11183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011184/* end confdefs.h. */
11185
11186#include <sys/types.h>
11187#include <sys/socket.h>
11188
11189int
11190main ()
11191{
11192void *x=socketpair
11193 ;
11194 return 0;
11195}
11196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011198
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011200
Matthias Kloseb159a552010-04-25 21:00:44 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011202$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011203else
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11205$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011206
11207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011209
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011210# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11212$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011214/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011215#include <sys/types.h>
11216#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011217int
11218main ()
11219{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011220struct sockaddr x;
11221x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 ;
11223 return 0;
11224}
11225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011226if ac_fn_c_try_compile "$LINENO"; then :
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11228$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011231
11232else
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11234$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011235
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011238
Guido van Rossumda88dad1995-01-26 00:46:29 +000011239va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11241$as_echo_n "checking whether va_list is an array... " >&6; }
11242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011243/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011244
11245#ifdef HAVE_STDARG_PROTOTYPES
11246#include <stdarg.h>
11247#else
11248#include <varargs.h>
11249#endif
11250
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011254va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011259if ac_fn_c_try_compile "$LINENO"; then :
11260
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011261else
Skip Montanaro6dead952003-09-25 14:50:04 +000011262
Martin v. Löwis11437992002-04-12 09:54:03 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
Guido van Rossumda88dad1995-01-26 00:46:29 +000011266 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011267
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11271$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011272
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011273# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011274
11275
Matthias Kloseb9621712010-04-24 17:59:49 +000011276ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011277if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11282$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011283 OLD_CFLAGS=$CFLAGS
11284 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011287
11288# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011289
Martin v. Löwis11437992002-04-12 09:54:03 +000011290int
11291main ()
11292{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011293
11294 char *name;
11295 struct hostent *he, *res;
11296 char buffer[2048];
11297 int buflen = 2048;
11298 int h_errnop;
11299
11300 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011301
11302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011307
Matthias Kloseb9621712010-04-24 17:59:49 +000011308 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011309
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Matthias Kloseb9621712010-04-24 17:59:49 +000011311$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011312
Matthias Kloseb9621712010-04-24 17:59:49 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11314$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011316else
Skip Montanaro6dead952003-09-25 14:50:04 +000011317
Matthias Kloseb9621712010-04-24 17:59:49 +000011318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11319$as_echo "no" >&6; }
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11321$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011324
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011325# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
Martin v. Löwis11437992002-04-12 09:54:03 +000011327int
11328main ()
11329{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011330
11331 char *name;
11332 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011333 char buffer[2048];
11334 int buflen = 2048;
11335 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011338
11339 ;
11340 return 0;
11341}
11342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
Matthias Kloseb9621712010-04-24 17:59:49 +000011345 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011346
Martin v. Löwis11437992002-04-12 09:54:03 +000011347
Matthias Kloseb159a552010-04-25 21:00:44 +000011348$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011349
Matthias Kloseb9621712010-04-24 17:59:49 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011353else
Skip Montanaro6dead952003-09-25 14:50:04 +000011354
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11358$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11360/* end confdefs.h. */
11361
11362# include <netdb.h>
11363
11364int
11365main ()
11366{
11367
11368 char *name;
11369 struct hostent *he;
11370 struct hostent_data data;
11371
11372 (void) gethostbyname_r(name, he, &data);
11373
11374 ;
11375 return 0;
11376}
11377_ACEOF
11378if ac_fn_c_try_compile "$LINENO"; then :
11379
11380 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11381
11382
11383$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11384
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11386$as_echo "yes" >&6; }
11387
11388else
11389
11390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011398
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011401 CFLAGS=$OLD_CFLAGS
11402
11403else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 for ac_func in gethostbyname
11406do :
11407 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011408if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011410#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011411_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011414done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011415
Michael W. Hudson54241132001-12-07 15:38:26 +000011416
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011417fi
11418
Michael W. Hudson54241132001-12-07 15:38:26 +000011419
11420
11421
11422
11423
11424
Guido van Rossum627b2d71993-12-24 10:39:16 +000011425# checks for system services
11426# (none yet)
11427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011428# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000011429ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011430if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011431
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011432else
Matthias Kloseb9621712010-04-24 17:59:49 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11434$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011435if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011437else
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011439LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443/* Override any GCC internal prototype to avoid an error.
11444 Use char because int might match the return type of a GCC
11445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011446#ifdef __cplusplus
11447extern "C"
11448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011449char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011450int
11451main ()
11452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011459 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011460else
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011463rm -f core conftest.err conftest.$ac_objext \
11464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011465LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11468$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011469if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 cat >>confdefs.h <<_ACEOF
11471#define HAVE_LIBIEEE 1
11472_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011473
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011474 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011475
Guido van Rossum627b2d71993-12-24 10:39:16 +000011476fi
11477
Michael W. Hudson54241132001-12-07 15:38:26 +000011478
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011479fi
11480
Michael W. Hudson54241132001-12-07 15:38:26 +000011481
Guido van Rossum7f253911997-05-09 02:42:48 +000011482# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11484$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011485
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011486# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011487if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011489if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011490then
11491
Matthias Kloseb9621712010-04-24 17:59:49 +000011492$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011493
Matthias Kloseb9621712010-04-24 17:59:49 +000011494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11495$as_echo "yes" >&6; }
11496else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11497$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011498fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011499else
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011502fi
11503
Guido van Rossum7f253911997-05-09 02:42:48 +000011504
Guido van Rossum7f43da71994-08-01 12:15:30 +000011505# check for --with-libm=...
11506
Guido van Rossum563e7081996-09-10 18:20:48 +000011507case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011508Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011509*) LIBM=-lm
11510esac
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11512$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011515if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011516 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011517if test "$withval" = no
11518then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11520$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011521elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011522then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11524$as_echo "set LIBM=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011525else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011526fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11529$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011530fi
11531
Guido van Rossum7f43da71994-08-01 12:15:30 +000011532
11533# check for --with-libc=...
11534
Matthias Kloseb9621712010-04-24 17:59:49 +000011535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11536$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011538# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011539if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011540 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011541if test "$withval" = no
11542then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000011543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11544$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011545elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011546then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11548$as_echo "set LIBC=\"$withval\"" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011549else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011550fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11553$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011554fi
11555
Guido van Rossum7f43da71994-08-01 12:15:30 +000011556
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011557# **************************************************
11558# * Check for various properties of floating point *
11559# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11562$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011563if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011565else
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011568 ac_cv_little_endian_double=no
11569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011571/* end confdefs.h. */
11572
11573#include <string.h>
11574int main() {
11575 double x = 9006104071832581.0;
11576 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11577 return 0;
11578 else
11579 return 1;
11580}
11581
11582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011583if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011584 ac_cv_little_endian_double=yes
11585else
Matthias Kloseb9621712010-04-24 17:59:49 +000011586 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011590fi
11591
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011592fi
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11595$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011596if test "$ac_cv_little_endian_double" = yes
11597then
11598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011600
11601fi
11602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11604$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011605if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011607else
11608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011610 ac_cv_big_endian_double=no
11611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011613/* end confdefs.h. */
11614
11615#include <string.h>
11616int main() {
11617 double x = 9006104071832581.0;
11618 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11619 return 0;
11620 else
11621 return 1;
11622}
11623
11624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011625if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011626 ac_cv_big_endian_double=yes
11627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011632fi
11633
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011634fi
11635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
11637$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011638if test "$ac_cv_big_endian_double" = yes
11639then
11640
Matthias Kloseb9621712010-04-24 17:59:49 +000011641$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011642
11643fi
11644
11645# Some ARM platforms use a mixed-endian representation for doubles.
11646# While Python doesn't currently have full support for these platforms
11647# (see e.g., issue 1762561), we can at least make sure that float <-> string
11648# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000011649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
11650$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011651if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011653else
11654
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011656 ac_cv_mixed_endian_double=no
11657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011659/* end confdefs.h. */
11660
11661#include <string.h>
11662int main() {
11663 double x = 9006104071832581.0;
11664 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
11665 return 0;
11666 else
11667 return 1;
11668}
11669
11670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011672 ac_cv_mixed_endian_double=yes
11673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11677 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011678fi
11679
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011680fi
11681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
11683$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011684if test "$ac_cv_mixed_endian_double" = yes
11685then
11686
Matthias Kloseb9621712010-04-24 17:59:49 +000011687$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011688
11689fi
11690
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011691# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000011692# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000011693# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000011694# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011695# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000011696# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011697
11698# This inline assembler syntax may also work for suncc and icc,
11699# so we try it on all platforms.
11700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
11702$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
11703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011704/* end confdefs.h. */
11705
11706int
11707main ()
11708{
11709
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011710 unsigned short cw;
11711 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
11712 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011713
11714 ;
11715 return 0;
11716}
11717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011719 have_gcc_asm_for_x87=yes
11720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011722fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
11725$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000011726if test "$have_gcc_asm_for_x87" = yes
11727then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011730
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011731fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011732
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011733# Detect whether system arithmetic is subject to x87-style double
11734# rounding issues. The result of this test has little meaning on non
11735# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
11736# mode is round-to-nearest and double rounding issues are present, and
11737# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000011738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
11739$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011740# $BASECFLAGS may affect the result
11741ac_save_cc="$CC"
11742CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011744 ac_cv_x87_double_rounding=no
11745else
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011747/* end confdefs.h. */
11748
11749#include <stdlib.h>
11750#include <math.h>
11751int main() {
11752 volatile double x, y, z;
11753 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
11754 x = 0.99999999999999989; /* 1-2**-53 */
11755 y = 1./x;
11756 if (y != 1.)
11757 exit(0);
11758 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
11759 x = 1e16;
11760 y = 2.99999;
11761 z = x + y;
11762 if (z != 1e16+4.)
11763 exit(0);
11764 /* both tests show evidence of double rounding */
11765 exit(1);
11766}
11767
11768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011769if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011770 ac_cv_x87_double_rounding=no
11771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11775 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011776fi
11777
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011778CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
11780$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011781if test "$ac_cv_x87_double_rounding" = yes
11782then
11783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011785
11786fi
11787
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000011788# ************************************
11789# * Check for mathematical functions *
11790# ************************************
11791
11792LIBS_SAVE=$LIBS
11793LIBS="$LIBS $LIBM"
11794
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011795for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
11796do :
11797 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11798ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011799if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011800 cat >>confdefs.h <<_ACEOF
11801#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11802_ACEOF
11803
11804fi
11805done
11806
11807for ac_func in hypot lgamma log1p round tgamma
11808do :
11809 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11810ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011811if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011812 cat >>confdefs.h <<_ACEOF
11813#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11814_ACEOF
11815
11816fi
11817done
11818
11819ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
11820"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011821if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011822 ac_have_decl=1
11823else
11824 ac_have_decl=0
11825fi
11826
11827cat >>confdefs.h <<_ACEOF
11828#define HAVE_DECL_ISINF $ac_have_decl
11829_ACEOF
11830ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
11831"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011832if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011833 ac_have_decl=1
11834else
11835 ac_have_decl=0
11836fi
11837
11838cat >>confdefs.h <<_ACEOF
11839#define HAVE_DECL_ISNAN $ac_have_decl
11840_ACEOF
11841ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
11842"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011843if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011844 ac_have_decl=1
11845else
11846 ac_have_decl=0
11847fi
11848
11849cat >>confdefs.h <<_ACEOF
11850#define HAVE_DECL_ISFINITE $ac_have_decl
11851_ACEOF
11852
11853
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011854# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
11855# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
11857$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011858if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011860else
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011863 ac_cv_tanh_preserves_zero_sign=no
11864else
Matthias Kloseb9621712010-04-24 17:59:49 +000011865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011866/* end confdefs.h. */
11867
11868#include <math.h>
11869#include <stdlib.h>
11870int main() {
11871 /* return 0 if either negative zeros don't exist
11872 on this platform or if negative zeros exist
11873 and tanh(-0.) == -0. */
11874 if (atan2(0., -1.) == atan2(-0., -1.) ||
11875 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
11876 else exit(1);
11877}
11878
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011881 ac_cv_tanh_preserves_zero_sign=yes
11882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011887fi
11888
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011889fi
11890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
11892$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011893if test "$ac_cv_tanh_preserves_zero_sign" = yes
11894then
11895
Matthias Kloseb9621712010-04-24 17:59:49 +000011896$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000011897
11898fi
11899
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011900if test "$ac_cv_func_log1p" = yes
11901then
11902 # On some versions of AIX, log1p(-0.) returns 0. instead of
11903 # -0. See issue #9920.
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
11905$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011906 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011907 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011908else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011909
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011910 if test "$cross_compiling" = yes; then :
11911 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011912else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011915
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011916 #include <math.h>
11917 #include <stdlib.h>
11918 int main() {
11919 /* Fail if the signs of log1p(-0.) and -0. can be
11920 distinguished. */
11921 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
11922 return 0;
11923 else
11924 return 1;
11925 }
11926
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011927_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011928if ac_fn_c_try_run "$LINENO"; then :
11929 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011930else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011931 ac_cv_log1p_drops_zero_sign=yes
11932fi
11933rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11934 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011935fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011936
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011937fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011938
Mark Dickinsonec0d3552010-11-20 10:29:12 +000011939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
11940$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
11941fi
11942if test "$ac_cv_log1p_drops_zero_sign" = yes
11943then
11944
11945$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
11946
11947fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000011948
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000011949LIBS=$LIBS_SAVE
11950
Mark Dickinsona614f042009-11-28 12:48:43 +000011951# For multiprocessing module, check that sem_open
11952# actually works. For FreeBSD versions <= 7.2,
11953# the kernel module that provides POSIX semaphores
11954# isn't loaded by default, so an attempt to call
11955# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
11957$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000011958if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000011960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011962 ac_cv_posix_semaphores_enabled=yes
11963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011965/* end confdefs.h. */
11966
11967#include <unistd.h>
11968#include <fcntl.h>
11969#include <stdio.h>
11970#include <semaphore.h>
11971#include <sys/stat.h>
11972
11973int main(void) {
11974 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
11975 if (a == SEM_FAILED) {
11976 perror("sem_open");
11977 return 1;
11978 }
11979 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000011980 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000011981 return 0;
11982}
11983
11984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011985if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000011986 ac_cv_posix_semaphores_enabled=yes
11987else
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000011989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011990rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11991 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000011992fi
11993
11994
Mark Dickinsona614f042009-11-28 12:48:43 +000011995fi
11996
Matthias Kloseb9621712010-04-24 17:59:49 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
11998$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000011999if test $ac_cv_posix_semaphores_enabled = no
12000then
12001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012003
12004fi
12005
Mark Dickinson10683072009-04-18 21:18:19 +000012006# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12008$as_echo_n "checking for broken sem_getvalue... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012009if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012011else
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012013 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012014else
Matthias Kloseb9621712010-04-24 17:59:49 +000012015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012016/* end confdefs.h. */
12017
12018#include <unistd.h>
12019#include <fcntl.h>
12020#include <stdio.h>
12021#include <semaphore.h>
12022#include <sys/stat.h>
12023
12024int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012025 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012026 int count;
12027 int res;
12028 if(a==SEM_FAILED){
12029 perror("sem_open");
12030 return 1;
12031
12032 }
12033 res = sem_getvalue(a, &count);
12034 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012035 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012036 return res==-1 ? 1 : 0;
12037}
12038
Mark Dickinson10683072009-04-18 21:18:19 +000012039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012040if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012041 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012042else
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012047fi
12048
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012049
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012050fi
12051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12053$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012054if test $ac_cv_broken_sem_getvalue = yes
12055then
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012058
12059fi
12060
Mark Dickinsonbd792642009-03-18 20:06:12 +000012061# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12063$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012064# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012065if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012066 enableval=$enable_big_digits; case $enable_big_digits in
12067yes)
12068 enable_big_digits=30 ;;
12069no)
12070 enable_big_digits=15 ;;
1207115|30)
12072 ;;
12073*)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012074 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 +000012075esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12077$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012078
12079cat >>confdefs.h <<_ACEOF
12080#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12081_ACEOF
12082
12083
12084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12086$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012087fi
12088
12089
Guido van Rossumef2255b2000-03-10 22:30:29 +000012090# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012091ac_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 +000012092if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
12094
Matthias Kloseb9621712010-04-24 17:59:49 +000012095$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012096
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012097 wchar_h="yes"
12098
Guido van Rossumef2255b2000-03-10 22:30:29 +000012099else
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012101
12102fi
12103
Michael W. Hudson54241132001-12-07 15:38:26 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012106# determine wchar_t size
12107if test "$wchar_h" = yes
12108then
Matthias Kloseb9621712010-04-24 17:59:49 +000012109 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012110# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12111# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12112# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12114$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012115if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012117else
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12119"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121else
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 if test "$ac_cv_type_wchar_t" = yes; then
12123 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012125as_fn_error 77 "cannot compute sizeof (wchar_t)
12126See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127 else
12128 ac_cv_sizeof_wchar_t=0
12129 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012131
Martin v. Löwis11437992002-04-12 09:54:03 +000012132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12134$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135
12136
12137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012139#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012140_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012141
Michael W. Hudson54241132001-12-07 15:38:26 +000012142
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012143fi
12144
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12146$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012147have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012150
12151#include <tcl.h>
12152#if TCL_UTF_MAX != 6
12153# error "NOT UCS4_TCL"
12154#endif
12155int
12156main ()
12157{
12158
12159 ;
12160 return 0;
12161}
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012164
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012167
12168 have_ucs4_tcl=yes
12169
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12173$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012174
Skip Montanaro6dead952003-09-25 14:50:04 +000012175# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012176if test "$wchar_h" = yes
12177then
12178 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12180$as_echo_n "checking whether wchar_t is signed... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012181 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012183else
12184
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012186 ac_cv_wchar_t_signed=yes
12187else
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012189/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012190
12191 #include <wchar.h>
12192 int main()
12193 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012194 /* Success: exit code 0 */
12195 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012196 }
12197
12198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012200 ac_cv_wchar_t_signed=yes
12201else
Matthias Kloseb9621712010-04-24 17:59:49 +000012202 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012206fi
12207
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012208fi
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12211$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212fi
12213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for str" >&5
12215$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000012216
12217# Check whether --with-wide-unicode was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012218if test "${with_wide_unicode+set}" = set; then :
Georg Brandl52d168a2008-01-07 18:10:24 +000012219 withval=$with_wide_unicode;
12220if test "$withval" != no
12221then unicode_size="4"
12222else unicode_size="2"
12223fi
12224
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226
Georg Brandl52d168a2008-01-07 18:10:24 +000012227case "$have_ucs4_tcl" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012228 yes) unicode_size="4";;
Georg Brandl52d168a2008-01-07 18:10:24 +000012229 *) unicode_size="2" ;;
12230esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012231
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012232fi
12233
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012234
12235
Georg Brandl52d168a2008-01-07 18:10:24 +000012236case "$unicode_size" in
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012237 4)
12238 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
12239
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012240 ABIFLAGS="${ABIFLAGS}u"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012241 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 *) $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Georg Brandl52d168a2008-01-07 18:10:24 +000012243 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012244esac
12245
Michael W. Hudson54241132001-12-07 15:38:26 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247
Georg Brandl52d168a2008-01-07 18:10:24 +000012248# wchar_t is only usable if it maps to an unsigned type
12249if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012250 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012251then
12252 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012257
Georg Brandl52d168a2008-01-07 18:10:24 +000012258elif test "$ac_cv_sizeof_short" = "$unicode_size"
12259then
12260 PY_UNICODE_TYPE="unsigned short"
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012262
Georg Brandl52d168a2008-01-07 18:10:24 +000012263elif test "$ac_cv_sizeof_long" = "$unicode_size"
12264then
12265 PY_UNICODE_TYPE="unsigned long"
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012267
Georg Brandl52d168a2008-01-07 18:10:24 +000012268else
12269 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12272$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012273
12274# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12276$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012277if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012279else
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 ac_cv_c_bigendian=unknown
12281 # See if we're dealing with a universal compiler.
12282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12283/* end confdefs.h. */
12284#ifndef __APPLE_CC__
12285 not a universal capable compiler
12286 #endif
12287 typedef int dummy;
12288
Skip Montanaro6dead952003-09-25 14:50:04 +000012289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012290if ac_fn_c_try_compile "$LINENO"; then :
12291
12292 # Check for potential -arch flags. It is not universal unless
12293 # there are at least two -arch flags with different values.
12294 ac_arch=
12295 ac_prev=
12296 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12297 if test -n "$ac_prev"; then
12298 case $ac_word in
12299 i?86 | x86_64 | ppc | ppc64)
12300 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12301 ac_arch=$ac_word
12302 else
12303 ac_cv_c_bigendian=universal
12304 break
12305 fi
12306 ;;
12307 esac
12308 ac_prev=
12309 elif test "x$ac_word" = "x-arch"; then
12310 ac_prev=arch
12311 fi
12312 done
12313fi
12314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12315 if test $ac_cv_c_bigendian = unknown; then
12316 # See if sys/param.h defines the BYTE_ORDER macro.
12317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012319#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012321
Martin v. Löwis11437992002-04-12 09:54:03 +000012322int
12323main ()
12324{
Matthias Kloseb9621712010-04-24 17:59:49 +000012325#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12326 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12327 && LITTLE_ENDIAN)
12328 bogus endian macros
12329 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
12331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012336 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012338/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012339#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012341
Martin v. Löwis11437992002-04-12 09:54:03 +000012342int
12343main ()
12344{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012345#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 not big endian
12347 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
12349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012354 ac_cv_c_bigendian=yes
12355else
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012359fi
12360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12361 fi
12362 if test $ac_cv_c_bigendian = unknown; then
12363 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000012366#include <limits.h>
12367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368int
12369main ()
12370{
Matthias Kloseb9621712010-04-24 17:59:49 +000012371#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12372 bogus endian macros
12373 #endif
12374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375 ;
12376 return 0;
12377}
12378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012379if ac_fn_c_try_compile "$LINENO"; then :
12380 # It does; now see whether it defined to _BIG_ENDIAN or not.
12381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12382/* end confdefs.h. */
12383#include <limits.h>
12384
12385int
12386main ()
12387{
12388#ifndef _BIG_ENDIAN
12389 not big endian
12390 #endif
12391
12392 ;
12393 return 0;
12394}
12395_ACEOF
12396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12402fi
12403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12404 fi
12405 if test $ac_cv_c_bigendian = unknown; then
12406 # Compile a test program.
12407 if test "$cross_compiling" = yes; then :
12408 # Try to guess by grepping values from an object file.
12409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12410/* end confdefs.h. */
12411short int ascii_mm[] =
12412 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12413 short int ascii_ii[] =
12414 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12415 int use_ascii (int i) {
12416 return ascii_mm[i] + ascii_ii[i];
12417 }
12418 short int ebcdic_ii[] =
12419 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12420 short int ebcdic_mm[] =
12421 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12422 int use_ebcdic (int i) {
12423 return ebcdic_mm[i] + ebcdic_ii[i];
12424 }
12425 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427int
12428main ()
12429{
12430return use_ascii (foo) == use_ebcdic (foo);
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435if ac_fn_c_try_compile "$LINENO"; then :
12436 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12437 ac_cv_c_bigendian=yes
12438 fi
12439 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12440 if test "$ac_cv_c_bigendian" = unknown; then
12441 ac_cv_c_bigendian=no
12442 else
12443 # finding both strings is unlikely to happen, but who knows?
12444 ac_cv_c_bigendian=unknown
12445 fi
12446 fi
12447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012449else
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012451/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012453int
12454main ()
12455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 /* Are we little or big endian? From Harbison&Steele. */
12458 union
12459 {
12460 long int l;
12461 char c[sizeof (long int)];
12462 } u;
12463 u.l = 1;
12464 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465
12466 ;
12467 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012468}
Martin v. Löwis11437992002-04-12 09:54:03 +000012469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012471 ac_cv_c_bigendian=no
12472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12476 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12482$as_echo "$ac_cv_c_bigendian" >&6; }
12483 case $ac_cv_c_bigendian in #(
12484 yes)
12485 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12486;; #(
12487 no)
12488 ;; #(
12489 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 ;; #(
12494 *)
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012495 as_fn_error $? "unknown endianness
Antoine Pitrouc2244582011-01-02 19:34:03 +000012496 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000012497 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012500# ABI version string for Python extension modules. This appears between the
12501# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
12502# from the following attributes which affect the ABI of this Python build (in
12503# this order):
12504#
12505# * The Python implementation (always 'cpython-' for us)
12506# * The major and minor version numbers
12507# * --with-pydebug (adds a 'd')
12508# * --with-pymalloc (adds a 'm')
12509# * --with-wide-unicode (adds a 'u')
12510#
12511# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012512# would get a shared library ABI version tag of 'cpython-32dmu' and shared
12513# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012514
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
12516$as_echo_n "checking ABIFLAGS... " >&6; }
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
12518$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
12520$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012521SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
12523$as_echo "$SOABI" >&6; }
12524
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000012525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
12526$as_echo_n "checking LDVERSION... " >&6; }
12527LDVERSION='$(VERSION)$(ABIFLAGS)'
12528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
12529$as_echo "$LDVERSION" >&6; }
12530
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012531# SO is the extension of shared libraries `(including the dot!)
12532# -- usually .so, .sl on HP-UX, .dll on Cygwin
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12534$as_echo_n "checking SO... " >&6; }
12535if test -z "$SO"
12536then
12537 case $ac_sys_system in
12538 hp*|HP*)
12539 case `uname -m` in
12540 ia64) SO=.so;;
12541 *) SO=.sl;;
12542 esac
12543 ;;
12544 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000012545 Linux*|GNU*)
12546 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012547 *) SO=.so;;
12548 esac
12549else
12550 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012551 echo
12552 echo '====================================================================='
12553 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012554 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000012555 echo '+ Do you really mean to change the extension for shared libraries? +'
12556 echo '+ Continuing in 10 seconds to let you to ponder. +'
12557 echo '+ +'
12558 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000012559 sleep 10
12560fi
12561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12562$as_echo "$SO" >&6; }
12563
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012564# Check whether right shifting a negative integer extends the sign bit
12565# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12567$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012568if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012570else
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012573 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012574else
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012577
12578int main()
12579{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012580 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012581}
12582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012584if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012585 ac_cv_rshift_extends_sign=yes
12586else
Matthias Kloseb9621712010-04-24 17:59:49 +000012587 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012588fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12590 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012591fi
12592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593fi
12594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12596$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012597if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012598then
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012601
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012602fi
12603
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012604# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000012605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12606$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012607if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012609else
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012612/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012613#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012614int
12615main ()
12616{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012617
12618 FILE *f = fopen("/dev/null", "r");
12619 flockfile(f);
12620 getc_unlocked(f);
12621 funlockfile(f);
12622
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 ;
12624 return 0;
12625}
12626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012628 ac_cv_have_getc_unlocked=yes
12629else
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 ac_cv_have_getc_unlocked=no
12631fi
12632rm -f core conftest.err conftest.$ac_objext \
12633 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635
Matthias Kloseb9621712010-04-24 17:59:49 +000012636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12637$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012638if test "$ac_cv_have_getc_unlocked" = yes
12639then
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012642
12643fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012644
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012645# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012646# save the value of LIBS so we don't actually link Python with readline
12647LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012648
Gregory P. Smith18820942008-09-07 06:24:49 +000012649# On some systems we need to link readline to a termcap compatible
12650# library. NOTE: Keep the precedence of listed libraries synchronised
12651# with setup.py.
12652py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12654$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012655for py_libtermcap in "" ncursesw ncurses curses termcap; do
12656 if test -z "$py_libtermcap"; then
12657 READLINE_LIBS="-lreadline"
12658 else
12659 READLINE_LIBS="-lreadline -l$py_libtermcap"
12660 fi
12661 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000012662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012663/* end confdefs.h. */
12664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665/* Override any GCC internal prototype to avoid an error.
12666 Use char because int might match the return type of a GCC
12667 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012668#ifdef __cplusplus
12669extern "C"
12670#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012671char readline ();
12672int
12673main ()
12674{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012676 ;
12677 return 0;
12678}
12679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000012681 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000012685 if test $py_cv_lib_readline = yes; then
12686 break
12687 fi
12688done
12689# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12690#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000012691if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12693$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12696$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012699
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012700fi
12701
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012702# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000012703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12704$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012705if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012707else
12708 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012709LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012711/* end confdefs.h. */
12712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713/* Override any GCC internal prototype to avoid an error.
12714 Use char because int might match the return type of a GCC
12715 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012716#ifdef __cplusplus
12717extern "C"
12718#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012719char rl_callback_handler_install ();
12720int
12721main ()
12722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012729 ac_cv_lib_readline_rl_callback_handler_install=yes
12730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012733rm -f core conftest.err conftest.$ac_objext \
12734 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012735LIBS=$ac_check_lib_save_LIBS
12736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
12738$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012739if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012742
12743fi
12744
12745
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012746# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012749#include <readline/readline.h>
12750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012751if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012752 have_readline=yes
12753else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012754 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012755
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012756fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012757rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012758if test $have_readline = yes
12759then
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012762#include <readline/readline.h>
12763
12764_ACEOF
12765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012769
12770fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012771rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000012774/* end confdefs.h. */
12775#include <readline/readline.h>
12776
12777_ACEOF
12778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000012780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000012782
12783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012784rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000012785
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000012786fi
12787
Martin v. Löwis0daad592001-09-30 21:09:59 +000012788# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
12790$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012791if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000012793else
Martin v. Löwis11437992002-04-12 09:54:03 +000012794 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012795LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799/* Override any GCC internal prototype to avoid an error.
12800 Use char because int might match the return type of a GCC
12801 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012802#ifdef __cplusplus
12803extern "C"
12804#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012805char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012806int
12807main ()
12808{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012809return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ;
12811 return 0;
12812}
12813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012814if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000012816else
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000012818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012819rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012821LIBS=$ac_check_lib_save_LIBS
12822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
12824$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012825if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000012828
Martin v. Löwis0daad592001-09-30 21:09:59 +000012829fi
12830
Michael W. Hudson54241132001-12-07 15:38:26 +000012831
Thomas Wouters89d996e2007-09-08 17:39:28 +000012832# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000012833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
12834$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012835if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012836 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000012837else
12838 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012839LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012841/* end confdefs.h. */
12842
12843/* Override any GCC internal prototype to avoid an error.
12844 Use char because int might match the return type of a GCC
12845 builtin and then its argument prototype would still apply. */
12846#ifdef __cplusplus
12847extern "C"
12848#endif
12849char rl_completion_display_matches_hook ();
12850int
12851main ()
12852{
12853return rl_completion_display_matches_hook ();
12854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012859 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
12860else
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000012862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012863rm -f core conftest.err conftest.$ac_objext \
12864 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000012865LIBS=$ac_check_lib_save_LIBS
12866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
12868$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012869if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000012870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000012872
12873fi
12874
12875
Martin v. Löwis0daad592001-09-30 21:09:59 +000012876# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
12878$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012879if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000012881else
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000012883LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887/* Override any GCC internal prototype to avoid an error.
12888 Use char because int might match the return type of a GCC
12889 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012890#ifdef __cplusplus
12891extern "C"
12892#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012893char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012894int
12895main ()
12896{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012897return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 ;
12899 return 0;
12900}
12901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012902if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000012904else
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000012906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012907rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012909LIBS=$ac_check_lib_save_LIBS
12910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
12912$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012913if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000012916
Guido van Rossum353ae582001-07-10 16:45:32 +000012917fi
12918
Jack Jansendd19cf82001-12-06 22:36:17 +000012919
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012920# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000012921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012922/* end confdefs.h. */
12923#include <readline/readline.h>
12924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012925if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012926 have_readline=yes
12927else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012928 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000012929
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012930fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012931rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012932if test $have_readline = yes
12933then
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012935/* end confdefs.h. */
12936#include <readline/readline.h>
12937
12938_ACEOF
12939if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012943
12944fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000012945rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012946
12947fi
12948
Martin v. Löwis82bca632006-02-10 20:49:30 +000012949# End of readline checks: restore LIBS
12950LIBS=$LIBS_no_readline
12951
Matthias Kloseb9621712010-04-24 17:59:49 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
12953$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012954if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000012956else
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012959 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012962/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012963
12964int main()
12965{
12966 int val1 = nice(1);
12967 if (val1 != -1 && val1 == nice(2))
12968 exit(0);
12969 exit(1);
12970}
12971
Martin v. Löwis11437992002-04-12 09:54:03 +000012972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012974 ac_cv_broken_nice=yes
12975else
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012980fi
12981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982fi
12983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
12985$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012986if test "$ac_cv_broken_nice" = yes
12987then
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000012990
12991fi
12992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
12994$as_echo_n "checking for broken poll()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000012995if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000012999 ac_cv_broken_poll=no
13000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013002/* end confdefs.h. */
13003
13004#include <poll.h>
13005
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013006int main()
13007{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013008 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013009 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013010
13011 close (42);
13012
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013013 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013014 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013015 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013016 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013017 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013018 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013019 return 1;
13020}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013021
13022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013024 ac_cv_broken_poll=yes
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13029 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013032fi
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13035$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013036if test "$ac_cv_broken_poll" = yes
13037then
13038
Matthias Kloseb9621712010-04-24 17:59:49 +000013039$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013040
13041fi
13042
Brett Cannon43802422005-02-10 20:48:03 +000013043# 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 +000013044# (which is not required by ISO C or UNIX spec) and/or if we support
13045# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013046ac_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 +000013047#include <$ac_cv_struct_tm>
13048
Matthias Kloseb9621712010-04-24 17:59:49 +000013049"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013050if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013051
13052cat >>confdefs.h <<_ACEOF
13053#define HAVE_STRUCT_TM_TM_ZONE 1
13054_ACEOF
13055
13056
13057fi
13058
13059if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013062
13063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13065"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013066if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070fi
13071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013072cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013073#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074_ACEOF
13075
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13077$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013078if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013082/* end confdefs.h. */
13083#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084#if !HAVE_DECL_TZNAME
13085extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013086#endif
13087
13088int
13089main ()
13090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013092 ;
13093 return 0;
13094}
13095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013096if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013097 ac_cv_var_tzname=yes
13098else
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013101rm -f core conftest.err conftest.$ac_objext \
13102 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13105$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013106 if test $ac_cv_var_tzname = yes; then
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013109
13110 fi
13111fi
13112
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013113
Martin v. Löwis1d459062005-03-14 21:23:33 +000013114# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13116$as_echo_n "checking for working tzset()... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013117if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013118 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013119else
13120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013122 ac_cv_working_tzset=no
13123else
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013125/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013126
13127#include <stdlib.h>
13128#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013129#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013130
13131#if HAVE_TZNAME
13132extern char *tzname[];
13133#endif
13134
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013135int main()
13136{
Brett Cannon18367812003-09-19 00:59:16 +000013137 /* Note that we need to ensure that not only does tzset(3)
13138 do 'something' with localtime, but it works as documented
13139 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013140 This includes making sure that tzname is set properly if
13141 tm->tm_zone does not exist since it is the alternative way
13142 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013143
13144 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013145 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013146 */
13147
Martin v. Löwis1d459062005-03-14 21:23:33 +000013148 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013149 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13150
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013151 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013152 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013153 if (localtime(&groundhogday)->tm_hour != 0)
13154 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013155#if HAVE_TZNAME
13156 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13157 if (strcmp(tzname[0], "UTC") ||
13158 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13159 exit(1);
13160#endif
Brett Cannon18367812003-09-19 00:59:16 +000013161
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013162 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013163 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013164 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013165 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013166#if HAVE_TZNAME
13167 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13168 exit(1);
13169#endif
Brett Cannon18367812003-09-19 00:59:16 +000013170
13171 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13172 tzset();
13173 if (localtime(&groundhogday)->tm_hour != 11)
13174 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013175#if HAVE_TZNAME
13176 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13177 exit(1);
13178#endif
13179
13180#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013181 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13182 exit(1);
13183 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13184 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013185#endif
Brett Cannon18367812003-09-19 00:59:16 +000013186
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013187 exit(0);
13188}
13189
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013192 ac_cv_working_tzset=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013198fi
13199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200fi
13201
Matthias Kloseb9621712010-04-24 17:59:49 +000013202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13203$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013204if test "$ac_cv_working_tzset" = yes
13205then
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013208
13209fi
13210
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013211# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13213$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013214if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013219#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013220int
13221main ()
13222{
13223
13224struct stat st;
13225st.st_mtim.tv_nsec = 1;
13226
13227 ;
13228 return 0;
13229}
13230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013232 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013233else
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237fi
13238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13240$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013241if test "$ac_cv_stat_tv_nsec" = yes
13242then
13243
Matthias Kloseb9621712010-04-24 17:59:49 +000013244$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013245
13246fi
13247
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013248# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13250$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013251if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013255/* end confdefs.h. */
13256#include <sys/stat.h>
13257int
13258main ()
13259{
13260
13261struct stat st;
13262st.st_mtimespec.tv_nsec = 1;
13263
13264 ;
13265 return 0;
13266}
13267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013269 ac_cv_stat_tv_nsec2=yes
13270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13274fi
13275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13277$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013278if test "$ac_cv_stat_tv_nsec2" = yes
13279then
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013282
13283fi
13284
Jack Jansen666b1e72001-10-31 12:11:48 +000013285# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13287$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013288if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013292/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013293#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013294int
13295main ()
13296{
Jack Jansen666b1e72001-10-31 12:11:48 +000013297
13298 int rtn;
13299 rtn = mvwdelch(0,0,0);
13300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ;
13302 return 0;
13303}
13304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013305if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013306 ac_cv_mvwdelch_is_expression=yes
13307else
Matthias Kloseb9621712010-04-24 17:59:49 +000013308 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13311fi
13312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13314$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013315
13316if test "$ac_cv_mvwdelch_is_expression" = yes
13317then
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013320
13321fi
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13324$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013325if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013329/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013330#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013331int
13332main ()
13333{
Jack Jansen666b1e72001-10-31 12:11:48 +000013334
13335 WINDOW *w;
13336 w->_flags = 0;
13337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 ;
13339 return 0;
13340}
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013343 ac_cv_window_has_flags=yes
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13348fi
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13351$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013352
Jack Jansen666b1e72001-10-31 12:11:48 +000013353
13354if test "$ac_cv_window_has_flags" = yes
13355then
Martin v. Löwis11437992002-04-12 09:54:03 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013358
13359fi
13360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13362$as_echo_n "checking for is_term_resized... " >&6; }
13363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013364/* end confdefs.h. */
13365#include <curses.h>
13366int
13367main ()
13368{
13369void *x=is_term_resized
13370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013377
Matthias Kloseb159a552010-04-25 21:00:44 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013379$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013380else
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13382$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013383
13384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13388$as_echo_n "checking for resize_term... " >&6; }
13389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013390/* end confdefs.h. */
13391#include <curses.h>
13392int
13393main ()
13394{
13395void *x=resize_term
13396 ;
13397 return 0;
13398}
13399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013400if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013403
Matthias Kloseb159a552010-04-25 21:00:44 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013405$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013406else
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13408$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013409
13410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13414$as_echo_n "checking for resizeterm... " >&6; }
13415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013416/* end confdefs.h. */
13417#include <curses.h>
13418int
13419main ()
13420{
13421void *x=resizeterm
13422 ;
13423 return 0;
13424}
13425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013426if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013429
Matthias Kloseb159a552010-04-25 21:00:44 +000013430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013432else
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13434$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000013435
13436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13440$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013441
13442if test -r /dev/ptmx
13443then
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13445$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013446
Matthias Kloseb9621712010-04-24 17:59:49 +000013447$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013448
Thomas Wouters89f507f2006-12-13 04:49:30 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13451$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13455$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000013456
13457if test -r /dev/ptc
13458then
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13460$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013463
Thomas Wouters89f507f2006-12-13 04:49:30 +000013464else
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13466$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013467fi
13468
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013469if test "$have_long_long" = yes
13470then
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13472$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013473 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 if test "$cross_compiling" = yes; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013477 ac_cv_have_long_long_format=no
13478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013480/* end confdefs.h. */
13481
13482 #include <stdio.h>
13483 #include <stddef.h>
13484 #include <string.h>
13485
13486 #ifdef HAVE_SYS_TYPES_H
13487 #include <sys/types.h>
13488 #endif
13489
13490 int main()
13491 {
13492 char buffer[256];
13493
13494 if (sprintf(buffer, "%lld", (long long)123) < 0)
13495 return 1;
13496 if (strcmp(buffer, "123"))
13497 return 1;
13498
13499 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13500 return 1;
13501 if (strcmp(buffer, "-123"))
13502 return 1;
13503
13504 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13505 return 1;
13506 if (strcmp(buffer, "123"))
13507 return 1;
13508
13509 return 0;
13510 }
13511
13512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013513if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013514 ac_cv_have_long_long_format=yes
13515else
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013520fi
13521
13522
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013523fi
13524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13526$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013527fi
13528
Mark Dickinson89d7d412009-12-31 20:50:59 +000013529if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013530then
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013533
13534fi
13535
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000013536if test $ac_sys_system = Darwin
13537then
13538 LIBS="$LIBS -framework CoreFoundation"
13539fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13542$as_echo_n "checking for %zd printf() format support... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013543if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013547 ac_cv_have_size_t_format="cross -- assuming yes"
13548
Thomas Wouters477c8d52006-05-27 19:21:47 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000013551/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013552
Thomas Wouters477c8d52006-05-27 19:21:47 +000013553#include <stdio.h>
13554#include <stddef.h>
13555#include <string.h>
13556
Christian Heimes2c181612007-12-17 20:04:13 +000013557#ifdef HAVE_SYS_TYPES_H
13558#include <sys/types.h>
13559#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000013560
13561#ifdef HAVE_SSIZE_T
13562typedef ssize_t Py_ssize_t;
13563#elif SIZEOF_VOID_P == SIZEOF_LONG
13564typedef long Py_ssize_t;
13565#else
13566typedef int Py_ssize_t;
13567#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000013568
Christian Heimes2c181612007-12-17 20:04:13 +000013569int main()
13570{
13571 char buffer[256];
13572
Thomas Wouters477c8d52006-05-27 19:21:47 +000013573 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13574 return 1;
13575
Thomas Wouters89f507f2006-12-13 04:49:30 +000013576 if (strcmp(buffer, "123"))
13577 return 1;
13578
13579 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13580 return 1;
13581
13582 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000013583 return 1;
13584
13585 return 0;
13586}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013587
Thomas Wouters477c8d52006-05-27 19:21:47 +000013588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013590 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013593fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13595 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013596fi
13597
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13600$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000013601if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013604
13605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013608#ifdef HAVE_SYS_TYPES_H
13609#include <sys/types.h>
13610#endif
13611#ifdef HAVE_SYS_SOCKET_H
13612#include <sys/socket.h>
13613#endif
13614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013616if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013617
Martin v. Löwis11437992002-04-12 09:54:03 +000013618else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013621
13622fi
13623
Michael W. Hudson54241132001-12-07 15:38:26 +000013624
Matthias Kloseb9621712010-04-24 17:59:49 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
13626$as_echo_n "checking for broken mbstowcs... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013627if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013629else
Matthias Kloseb9621712010-04-24 17:59:49 +000013630 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013631 ac_cv_broken_mbstowcs=no
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013634/* end confdefs.h. */
13635
13636#include<stdlib.h>
13637int main() {
13638 size_t len = -1;
13639 const char *str = "text";
13640 len = mbstowcs(NULL, str, 0);
13641 return (len != 4);
13642}
13643
13644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013645if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000013646 ac_cv_broken_mbstowcs=no
13647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000013649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000013652fi
13653
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013654fi
13655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
13657$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000013658if test "$ac_cv_broken_mbstowcs" = yes
13659then
13660
Matthias Kloseb9621712010-04-24 17:59:49 +000013661$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000013662
13663fi
13664
Antoine Pitrou042b1282010-08-13 21:15:58 +000013665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
13666$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013667if ${ac_cv_computed_gotos+:} false; then :
Antoine Pitrou042b1282010-08-13 21:15:58 +000013668 $as_echo_n "(cached) " >&6
13669else
13670 if test "$cross_compiling" = yes; then :
13671 ac_cv_computed_gotos=no
13672else
13673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13674/* end confdefs.h. */
13675
13676int main(int argc, char **argv)
13677{
13678 static void *targets[1] = { &&LABEL1 };
13679 goto LABEL2;
13680LABEL1:
13681 return 0;
13682LABEL2:
13683 goto *targets[0];
13684 return 1;
13685}
13686
13687_ACEOF
13688if ac_fn_c_try_run "$LINENO"; then :
13689 ac_cv_computed_gotos=yes
13690else
13691 ac_cv_computed_gotos=no
13692fi
13693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13694 conftest.$ac_objext conftest.beam conftest.$ac_ext
13695fi
13696
13697fi
13698
13699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
13700$as_echo "$ac_cv_computed_gotos" >&6; }
13701if test "$ac_cv_computed_gotos" = yes
13702then
13703
13704$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
13705
13706fi
13707
Antoine Pitroub52ec782009-01-25 16:34:23 +000013708# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
13710$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013711
13712# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000013714 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000013715if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716then
13717
Matthias Kloseb9621712010-04-24 17:59:49 +000013718$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000013719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13721$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013722fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000013723if test "$withval" = no
13724then
13725
13726$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000013730fi
13731
Antoine Pitrou042b1282010-08-13 21:15:58 +000013732else
13733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13734$as_echo "no value specified" >&6; }
13735fi
13736
Antoine Pitroub52ec782009-01-25 16:34:23 +000013737
Benjamin Petersond8d835b2010-10-15 23:14:46 +000013738case $ac_sys_system in
13739AIX*)
13740
13741$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13742 ;;
13743esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013744
Michael W. Hudson54241132001-12-07 15:38:26 +000013745
Gregory P. Smith138fa432010-12-13 08:00:52 +000013746ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013747if test "x$ac_cv_func_pipe2" = xyes; then :
Gregory P. Smith138fa432010-12-13 08:00:52 +000013748
13749$as_echo "#define HAVE_PIPE2 1" >>confdefs.h
13750
13751fi
Jesus Cea6a792292010-05-03 21:18:48 +000013752
13753
Mark Dickinsonb2153e92010-05-05 22:31:36 +000013754
13755
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013756for h in `(cd $srcdir;echo Python/thread_*.h)`
13757do
13758 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13759done
13760
Michael W. Hudson54241132001-12-07 15:38:26 +000013761
Neal Norwitzd24499d2005-12-18 21:36:39 +000013762SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13764$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013765for dir in $SRCDIRS; do
13766 if test ! -d $dir; then
13767 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013768 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013769done
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13771$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013772
Guido van Rossum627b2d71993-12-24 10:39:16 +000013773# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000013774ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013775
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000013776ac_config_files="$ac_config_files Modules/ld_so_aix"
13777
Martin v. Löwis11437992002-04-12 09:54:03 +000013778cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779# This file is a shell script that caches the results of configure
13780# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013781# scripts and configure runs, see configure's option --config-cache.
13782# It is not useful on other systems. If it contains results you don't
13783# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784#
Martin v. Löwis11437992002-04-12 09:54:03 +000013785# config.status only pays attention to the cache file if you give it
13786# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787#
Skip Montanaro6dead952003-09-25 14:50:04 +000013788# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013789# loading this file, other *unset* `ac_cv_foo' will be assigned the
13790# following values.
13791
13792_ACEOF
13793
Guido van Rossumf78abae1997-01-21 22:02:36 +000013794# The following way of writing the cache mishandles newlines in values,
13795# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013797# Ultrix sh set writes to stderr and can't be redirected directly,
13798# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013799(
13800 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13801 eval ac_val=\$$ac_var
13802 case $ac_val in #(
13803 *${as_nl}*)
13804 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13806$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013807 esac
13808 case $ac_var in #(
13809 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13811 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812 esac ;;
13813 esac
13814 done
13815
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13818 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000013819 # `set' does not quote correctly, so add quotes: double-quote
13820 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013822 "s/'/'\\\\''/g;
13823 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 *)
13826 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013827 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829 esac |
13830 sort
13831) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13837 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13839 :end' >>confcache
13840if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13841 if test -w "$cache_file"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013842 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13844$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013845 if test ! -f "$cache_file" || test -h "$cache_file"; then
13846 cat confcache >"$cache_file"
13847 else
13848 case $cache_file in #(
13849 */* | ?:*)
13850 mv -f confcache "$cache_file"$$ &&
13851 mv -f "$cache_file"$$ "$cache_file" ;; #(
13852 *)
13853 mv -f confcache "$cache_file" ;;
13854 esac
13855 fi
13856 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013857 else
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
13859$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013860 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013862rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000013863
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013864test "x$prefix" = xNONE && prefix=$ac_default_prefix
13865# Let make expand exec_prefix.
13866test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000013867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868DEFS=-DHAVE_CONFIG_H
13869
Skip Montanaro6dead952003-09-25 14:50:04 +000013870ac_libobjs=
13871ac_ltlibobjs=
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013872U=
Skip Montanaro6dead952003-09-25 14:50:04 +000013873for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13874 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013875 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000013876 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13878 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13880 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000013881done
13882LIBOBJS=$ac_libobjs
13883
13884LTLIBOBJS=$ac_ltlibobjs
13885
13886
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013889: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000013890ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000013891ac_clean_files_save=$ac_clean_files
13892ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
13894$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
13895as_write_fail=0
13896cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000013897#! $SHELL
13898# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013899# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000013901# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000013902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000013904ac_cs_recheck=false
13905ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000013906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907SHELL=\${CONFIG_SHELL-$SHELL}
13908export SHELL
13909_ASEOF
13910cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13911## -------------------- ##
13912## M4sh Initialization. ##
13913## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000013914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915# Be more Bourne compatible
13916DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000013917if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 emulate sh
13919 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000013921 # is contrary to our usage. Disable this feature.
13922 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013924else
Matthias Kloseb9621712010-04-24 17:59:49 +000013925 case `(set -o) 2>/dev/null` in #(
13926 *posix*) :
13927 set -o posix ;; #(
13928 *) :
13929 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930esac
Michael W. Hudson54241132001-12-07 15:38:26 +000013931fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000013932
13933
Matthias Kloseb9621712010-04-24 17:59:49 +000013934as_nl='
13935'
13936export as_nl
13937# Printing a long string crashes Solaris 7 /usr/bin/printf.
13938as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13939as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13940as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
13941# Prefer a ksh shell builtin over an external printf program on Solaris,
13942# but without wasting forks for bash or zsh.
13943if test -z "$BASH_VERSION$ZSH_VERSION" \
13944 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13945 as_echo='print -r --'
13946 as_echo_n='print -rn --'
13947elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
13948 as_echo='printf %s\n'
13949 as_echo_n='printf %s'
13950else
13951 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13952 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13953 as_echo_n='/usr/ucb/echo -n'
13954 else
13955 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13956 as_echo_n_body='eval
13957 arg=$1;
13958 case $arg in #(
13959 *"$as_nl"*)
13960 expr "X$arg" : "X\\(.*\\)$as_nl";
13961 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13962 esac;
13963 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13964 '
13965 export as_echo_n_body
13966 as_echo_n='sh -c $as_echo_n_body as_echo'
13967 fi
13968 export as_echo_body
13969 as_echo='sh -c $as_echo_body as_echo'
13970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
13972# The user is always right.
13973if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 PATH_SEPARATOR=:
13975 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13976 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13977 PATH_SEPARATOR=';'
13978 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981
13982# IFS
13983# We need space, tab and new line, in precisely that order. Quoting is
13984# there to prevent editors from complaining about space-tab.
13985# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13986# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987IFS=" "" $as_nl"
13988
13989# Find who we are. Look in the path if we contain no directory separator.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000013990as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000013991case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013992 *[\\/]* ) as_myself=$0 ;;
13993 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000013994for as_dir in $PATH
13995do
13996 IFS=$as_save_IFS
13997 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13999 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014000IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014002 ;;
14003esac
14004# We did not find ourselves, most probably we were run as `sh COMMAND'
14005# in which case we are not to be found in the path.
14006if test "x$as_myself" = x; then
14007 as_myself=$0
14008fi
14009if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014010 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14011 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012fi
14013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014# Unset variables that we do not need and which cause bugs (e.g. in
14015# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14016# suppresses any "Segmentation fault" message there. '((' could
14017# trigger a bug in pdksh 5.2.14.
14018for as_var in BASH_ENV ENV MAIL MAILPATH
14019do eval test x\${$as_var+set} = xset \
14020 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014021done
14022PS1='$ '
14023PS2='> '
14024PS4='+ '
14025
14026# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014027LC_ALL=C
14028export LC_ALL
14029LANGUAGE=C
14030export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032# CDPATH.
14033(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14034
14035
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014036# as_fn_error STATUS ERROR [LINENO LOG_FD]
14037# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014038# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14039# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014040# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014041as_fn_error ()
14042{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014043 as_status=$1; test $as_status -eq 0 && as_status=1
14044 if test "$4"; then
14045 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14046 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 fi
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014048 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 as_fn_exit $as_status
14050} # as_fn_error
14051
14052
14053# as_fn_set_status STATUS
14054# -----------------------
14055# Set $? to STATUS, without forking.
14056as_fn_set_status ()
14057{
14058 return $1
14059} # as_fn_set_status
14060
14061# as_fn_exit STATUS
14062# -----------------
14063# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14064as_fn_exit ()
14065{
14066 set +e
14067 as_fn_set_status $1
14068 exit $1
14069} # as_fn_exit
14070
14071# as_fn_unset VAR
14072# ---------------
14073# Portably unset VAR.
14074as_fn_unset ()
14075{
14076 { eval $1=; unset $1;}
14077}
14078as_unset=as_fn_unset
14079# as_fn_append VAR VALUE
14080# ----------------------
14081# Append the text in VALUE to the end of the definition contained in VAR. Take
14082# advantage of any shell optimizations that allow amortized linear growth over
14083# repeated appends, instead of the typical quadratic growth present in naive
14084# implementations.
14085if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14086 eval 'as_fn_append ()
14087 {
14088 eval $1+=\$2
14089 }'
14090else
14091 as_fn_append ()
14092 {
14093 eval $1=\$$1\$2
14094 }
14095fi # as_fn_append
14096
14097# as_fn_arith ARG...
14098# ------------------
14099# Perform arithmetic evaluation on the ARGs, and store the result in the
14100# global $as_val. Take advantage of shells that can avoid forks. The arguments
14101# must be portable across $(()) and expr.
14102if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14103 eval 'as_fn_arith ()
14104 {
14105 as_val=$(( $* ))
14106 }'
14107else
14108 as_fn_arith ()
14109 {
14110 as_val=`expr "$@" || test $? -eq 1`
14111 }
14112fi # as_fn_arith
14113
14114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115if expr a : '\(a\)' >/dev/null 2>&1 &&
14116 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14117 as_expr=expr
14118else
14119 as_expr=false
14120fi
14121
14122if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14123 as_basename=basename
14124else
14125 as_basename=false
14126fi
14127
Matthias Kloseb9621712010-04-24 17:59:49 +000014128if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14129 as_dirname=dirname
14130else
14131 as_dirname=false
14132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134as_me=`$as_basename -- "$0" ||
14135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14136 X"$0" : 'X\(//\)$' \| \
14137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014138$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139 sed '/^.*\/\([^/][^/]*\)\/*$/{
14140 s//\1/
14141 q
14142 }
14143 /^X\/\(\/\/\)$/{
14144 s//\1/
14145 q
14146 }
14147 /^X\/\(\/\).*/{
14148 s//\1/
14149 q
14150 }
14151 s/.*/./; q'`
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153# Avoid depending upon Character Ranges.
14154as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14155as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14156as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14157as_cr_digits='0123456789'
14158as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159
14160ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014161case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 xy) ECHO_C='\c';;
14166 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14167 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014168 esac;;
14169*)
14170 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014171esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014172
Martin v. Löwis11437992002-04-12 09:54:03 +000014173rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014174if test -d conf$$.dir; then
14175 rm -f conf$$.dir/conf$$.file
14176else
14177 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014180if (echo >conf$$.file) 2>/dev/null; then
14181 if ln -s conf$$.file conf$$ 2>/dev/null; then
14182 as_ln_s='ln -s'
14183 # ... but there are two gotchas:
14184 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14185 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14186 # In both cases, we have to default to `cp -p'.
14187 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14188 as_ln_s='cp -p'
14189 elif ln conf$$.file conf$$ 2>/dev/null; then
14190 as_ln_s=ln
14191 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014194else
14195 as_ln_s='cp -p'
14196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14198rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
Matthias Kloseb9621712010-04-24 17:59:49 +000014200
14201# as_fn_mkdir_p
14202# -------------
14203# Create "$as_dir" as a directory, including parents if necessary.
14204as_fn_mkdir_p ()
14205{
14206
14207 case $as_dir in #(
14208 -*) as_dir=./$as_dir;;
14209 esac
14210 test -d "$as_dir" || eval $as_mkdir_p || {
14211 as_dirs=
14212 while :; do
14213 case $as_dir in #(
14214 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14215 *) as_qdir=$as_dir;;
14216 esac
14217 as_dirs="'$as_qdir' $as_dirs"
14218 as_dir=`$as_dirname -- "$as_dir" ||
14219$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14220 X"$as_dir" : 'X\(//\)[^/]' \| \
14221 X"$as_dir" : 'X\(//\)$' \| \
14222 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14223$as_echo X"$as_dir" |
14224 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14225 s//\1/
14226 q
14227 }
14228 /^X\(\/\/\)[^/].*/{
14229 s//\1/
14230 q
14231 }
14232 /^X\(\/\/\)$/{
14233 s//\1/
14234 q
14235 }
14236 /^X\(\/\).*/{
14237 s//\1/
14238 q
14239 }
14240 s/.*/./; q'`
14241 test -d "$as_dir" && break
14242 done
14243 test -z "$as_dirs" || eval "mkdir $as_dirs"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014244 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000014245
14246
14247} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014248if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014250else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014251 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014252 as_mkdir_p=false
14253fi
14254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255if test -x / >/dev/null 2>&1; then
14256 as_test_x='test -x'
14257else
14258 if ls -dL / >/dev/null 2>&1; then
14259 as_ls_L_option=L
14260 else
14261 as_ls_L_option=
14262 fi
14263 as_test_x='
14264 eval sh -c '\''
14265 if test -d "$1"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 case $1 in #(
14269 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014270 esac;
Matthias Kloseb9621712010-04-24 17:59:49 +000014271 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 ???[sx]*):;;*)false;;esac;fi
14273 '\'' sh
14274 '
14275fi
14276as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014277
14278# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014279as_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 +000014280
14281# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014282as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
14284
Martin v. Löwis11437992002-04-12 09:54:03 +000014285exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000014286## ----------------------------------- ##
14287## Main body of $CONFIG_STATUS script. ##
14288## ----------------------------------- ##
14289_ASEOF
14290test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14293# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014294# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295# values after options handling.
14296ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014297This file was extended by python $as_me 3.3, which was
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014298generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014299
14300 CONFIG_FILES = $CONFIG_FILES
14301 CONFIG_HEADERS = $CONFIG_HEADERS
14302 CONFIG_LINKS = $CONFIG_LINKS
14303 CONFIG_COMMANDS = $CONFIG_COMMANDS
14304 $ $0 $@
14305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014306on `(hostname || uname -n) 2>/dev/null | sed 1q`
14307"
14308
Martin v. Löwis11437992002-04-12 09:54:03 +000014309_ACEOF
14310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311case $ac_config_files in *"
14312"*) set x $ac_config_files; shift; ac_config_files=$*;;
14313esac
14314
14315case $ac_config_headers in *"
14316"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14317esac
14318
14319
14320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014321# Files that config.status was made for.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014322config_files="$ac_config_files"
14323config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014328ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000014329\`$as_me' instantiates files and other configuration actions
14330from templates according to the current configuration. Unless the files
14331and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
14335 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014336 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 --config print configuration, then exit
14338 -q, --quiet, --silent
14339 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014340 -d, --debug don't remove temporary files
14341 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 --file=FILE[:TEMPLATE]
14343 instantiate the configuration file FILE
14344 --header=FILE[:TEMPLATE]
14345 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014346
14347Configuration files:
14348$config_files
14349
14350Configuration headers:
14351$config_headers
14352
Matthias Kloseb9621712010-04-24 17:59:49 +000014353Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014356cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14357ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014358ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000014359python config.status 3.3
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014360configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014363Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014364This config.status script is free software; the Free Software Foundation
14365gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366
14367ac_pwd='$ac_pwd'
14368srcdir='$srcdir'
14369INSTALL='$INSTALL'
Matthias Kloseb9621712010-04-24 17:59:49 +000014370test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014371_ACEOF
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14374# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014375ac_need_defaults=:
14376while test $# != 0
14377do
14378 case $1 in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014379 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014380 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14381 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014382 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014384 --*=)
14385 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14386 ac_optarg=
14387 ac_shift=:
14388 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014389 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014390 ac_option=$1
14391 ac_optarg=$2
14392 ac_shift=shift
14393 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 esac
14395
Skip Montanaro6dead952003-09-25 14:50:04 +000014396 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014397 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014398 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14399 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 $as_echo "$ac_cs_version"; exit ;;
14402 --config | --confi | --conf | --con | --co | --c )
14403 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 debug=: ;;
14406 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 case $ac_optarg in
14409 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014410 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 esac
14412 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014413 ac_need_defaults=false;;
14414 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014415 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 case $ac_optarg in
14417 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14418 esac
14419 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 --he | --h)
14422 # Conflict between --help and --header
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014423 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014424Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000014426 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014427 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14428 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14429 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014430
14431 # This is an error.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014432 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000014433Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438 esac
14439 shift
14440done
14441
Skip Montanaro6dead952003-09-25 14:50:04 +000014442ac_configure_extra_args=
14443
14444if $ac_cs_silent; then
14445 exec 6>/dev/null
14446 ac_configure_extra_args="$ac_configure_extra_args --silent"
14447fi
14448
14449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014451if \$ac_cs_recheck; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14453 shift
14454 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14455 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014458fi
14459
Martin v. Löwis11437992002-04-12 09:54:03 +000014460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462exec 5>>config.log
14463{
14464 echo
14465 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14466## Running $as_me. ##
14467_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476
14477# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014478for ac_config_target in $ac_config_targets
14479do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480 case $ac_config_target in
14481 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14482 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14483 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014484 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14485 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14487 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000014488 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014489 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014491 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 esac
14493done
14494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495
Martin v. Löwis11437992002-04-12 09:54:03 +000014496# If the user did not use the arguments to specify the items to instantiate,
14497# then the envvar interface is used. Set only those that are not.
14498# We use the long form for the default assignment because of an extremely
14499# bizarre bug on SunOS 4.1.3.
14500if $ac_need_defaults; then
14501 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14502 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14503fi
14504
Skip Montanaro6dead952003-09-25 14:50:04 +000014505# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014507# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508# Hook for its removal unless debugging.
14509# Note that there is a small window in which the directory will not be cleaned:
14510# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014511$debug ||
14512{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014513 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014514 trap 'exit_status=$?
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014515 : "${ac_tmp:=$tmp}"
14516 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014517' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014519}
Martin v. Löwis11437992002-04-12 09:54:03 +000014520# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014521
Martin v. Löwis11437992002-04-12 09:54:03 +000014522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014524 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014525} ||
14526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014527 tmp=./conf$$-$RANDOM
14528 (umask 077 && mkdir "$tmp")
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014529} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14530ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532# Set up the scripts for CONFIG_FILES section.
14533# No need to generate them if there are no CONFIG_FILES.
14534# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537
14538ac_cr=`echo X | tr X '\015'`
14539# On cygwin, bash can eat \r inside `` if the user requested igncr.
14540# But we know of no other shell where ac_cr would be empty at this
14541# point, so we can use a bashism as a fallback.
14542if test "x$ac_cr" = x; then
14543 eval ac_cr=\$\'\\r\'
14544fi
14545ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14546if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014547 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000014548else
14549 ac_cs_awk_cr=$ac_cr
14550fi
14551
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014552echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014553_ACEOF
14554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{
14557 echo "cat >conf$$subs.awk <<_ACEOF" &&
14558 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14559 echo "_ACEOF"
14560} >conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014561 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14562ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563ac_delim='%!_!# '
14564for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000014565 . ./conf$$subs.sh ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014566 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14569 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570 break
14571 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014572 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573 else
14574 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576done
Matthias Kloseb9621712010-04-24 17:59:49 +000014577rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014580cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014582sed -n '
14583h
14584s/^/S["/; s/!.*/"]=/
14585p
14586g
14587s/^[^!]*!//
14588:repl
14589t repl
14590s/'"$ac_delim"'$//
14591t delim
14592:nl
14593h
14594s/\(.\{148\}\)..*/\1/
14595t more1
14596s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14597p
14598n
14599b repl
14600:more1
14601s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14602p
14603g
14604s/.\{148\}//
14605t nl
14606:delim
14607h
14608s/\(.\{148\}\)..*/\1/
14609t more2
14610s/["\\]/\\&/g; s/^/"/; s/$/"/
14611p
14612b
14613:more2
14614s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14615p
14616g
14617s/.\{148\}//
14618t delim
14619' <conf$$subs.awk | sed '
14620/^[^""]/{
14621 N
14622 s/\n//
14623}
14624' >>$CONFIG_STATUS || ac_write_fail=1
14625rm -f conf$$subs.awk
14626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14627_ACAWK
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014628cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 for (key in S) S_is_set[key] = 1
14630 FS = ""
14631
14632}
14633{
14634 line = $ 0
14635 nfields = split(line, field, "@")
14636 substed = 0
14637 len = length(field[1])
14638 for (i = 2; i < nfields; i++) {
14639 key = field[i]
14640 keylen = length(key)
14641 if (S_is_set[key]) {
14642 value = S[key]
14643 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14644 len += length(value) + length(field[++i])
14645 substed = 1
14646 } else
14647 len += 1 + keylen
14648 }
14649
14650 print line
14651}
14652
14653_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14656if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14657 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14658else
14659 cat
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014660fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14661 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014662_ACEOF
14663
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014664# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14665# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666# trailing colons and then remove the whole line if VPATH becomes empty
14667# (actually we leave an empty line to preserve line numbers).
14668if test "x$srcdir" = x.; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014669 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14670h
14671s///
14672s/^/:/
14673s/[ ]*$/:/
14674s/:\$(srcdir):/:/g
14675s/:\${srcdir}:/:/g
14676s/:@srcdir@:/:/g
14677s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678s/:*$//
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014679x
14680s/\(=[ ]*\).*/\1/
14681G
14682s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014683s/^[^=]*=[ ]*$//
14684}'
14685fi
14686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014688fi # test -n "$CONFIG_FILES"
14689
Matthias Kloseb9621712010-04-24 17:59:49 +000014690# Set up the scripts for CONFIG_HEADERS section.
14691# No need to generate them if there are no CONFIG_HEADERS.
14692# This happens for instance with `./config.status Makefile'.
14693if test -n "$CONFIG_HEADERS"; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014694cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014695BEGIN {
14696_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014697
Matthias Kloseb9621712010-04-24 17:59:49 +000014698# Transform confdefs.h into an awk script `defines.awk', embedded as
14699# here-document in config.status, that substitutes the proper values into
14700# config.h.in to produce config.h.
14701
14702# Create a delimiter string that does not exist in confdefs.h, to ease
14703# handling of long lines.
14704ac_delim='%!_!# '
14705for ac_last_try in false false :; do
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014706 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14707 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 break
14709 elif $ac_last_try; then
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014710 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 else
14712 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14713 fi
14714done
14715
14716# For the awk script, D is an array of macro values keyed by name,
14717# likewise P contains macro parameters if any. Preserve backslash
14718# newline sequences.
14719
14720ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14721sed -n '
14722s/.\{148\}/&'"$ac_delim"'/g
14723t rset
14724:rset
14725s/^[ ]*#[ ]*define[ ][ ]*/ /
14726t def
14727d
14728:def
14729s/\\$//
14730t bsnl
14731s/["\\]/\\&/g
14732s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14733D["\1"]=" \3"/p
14734s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14735d
14736:bsnl
14737s/["\\]/\\&/g
14738s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14739D["\1"]=" \3\\\\\\n"\\/p
14740t cont
14741s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14742t cont
14743d
14744:cont
14745n
14746s/.\{148\}/&'"$ac_delim"'/g
14747t clear
14748:clear
14749s/\\$//
14750t bsnlc
14751s/["\\]/\\&/g; s/^/"/; s/$/"/p
14752d
14753:bsnlc
14754s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14755b cont
14756' <confdefs.h | sed '
14757s/'"$ac_delim"'/"\\\
14758"/g' >>$CONFIG_STATUS || ac_write_fail=1
14759
14760cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14761 for (key in D) D_is_set[key] = 1
14762 FS = ""
14763}
14764/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14765 line = \$ 0
14766 split(line, arg, " ")
14767 if (arg[1] == "#") {
14768 defundef = arg[2]
14769 mac1 = arg[3]
14770 } else {
14771 defundef = substr(arg[1], 2)
14772 mac1 = arg[2]
14773 }
14774 split(mac1, mac2, "(") #)
14775 macro = mac2[1]
14776 prefix = substr(line, 1, index(line, defundef) - 1)
14777 if (D_is_set[macro]) {
14778 # Preserve the white space surrounding the "#".
14779 print prefix "define", macro P[macro] D[macro]
14780 next
14781 } else {
14782 # Replace #undef with comments. This is necessary, for example,
14783 # in the case of _POSIX_SOURCE, which is predefined and required
14784 # on some systems where configure will not decide to define it.
14785 if (defundef == "undef") {
14786 print "/*", prefix defundef, macro, "*/"
14787 next
14788 }
14789 }
14790}
14791{ print }
14792_ACAWK
14793_ACEOF
14794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014795 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000014796fi # test -n "$CONFIG_HEADERS"
14797
14798
14799eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14800shift
14801for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802do
14803 case $ac_tag in
14804 :[FHLC]) ac_mode=$ac_tag; continue;;
14805 esac
14806 case $ac_mode$ac_tag in
14807 :[FHL]*:*);;
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014808 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809 :[FH]-) ac_tag=-:-;;
14810 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14811 esac
14812 ac_save_IFS=$IFS
14813 IFS=:
14814 set x $ac_tag
14815 IFS=$ac_save_IFS
14816 shift
14817 ac_file=$1
14818 shift
14819
14820 case $ac_mode in
14821 :L) ac_source=$1;;
14822 :[FH])
14823 ac_file_inputs=
14824 for ac_f
14825 do
14826 case $ac_f in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014827 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828 *) # Look for the file first in the build tree, then in the source tree
14829 # (if the path is not absolute). The absolute path cannot be DOS-style,
14830 # because $ac_f cannot contain `:'.
14831 test -f "$ac_f" ||
14832 case $ac_f in
14833 [\\/$]*) false;;
14834 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14835 esac ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014836 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14839 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014840 done
14841
14842 # Let's still pretend it is `configure' which instantiates (i.e., don't
14843 # use $as_me), people would be surprised to read:
14844 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 configure_input='Generated from '`
14846 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14847 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848 if test x"$ac_file" != x-; then
14849 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
14851$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014852 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014853 # Neutralize special characters interpreted by sed in replacement strings.
14854 case $configure_input in #(
14855 *\&* | *\|* | *\\* )
14856 ac_sed_conf_input=`$as_echo "$configure_input" |
14857 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14858 *) ac_sed_conf_input=$configure_input;;
14859 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860
14861 case $ac_tag in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014862 *:-:* | *:-) cat >"$ac_tmp/stdin" \
14863 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864 esac
14865 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 esac
14867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000014869$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014870 X"$ac_file" : 'X\(//\)[^/]' \| \
14871 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014873$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014874 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14875 s//\1/
14876 q
14877 }
14878 /^X\(\/\/\)[^/].*/{
14879 s//\1/
14880 q
14881 }
14882 /^X\(\/\/\)$/{
14883 s//\1/
14884 q
14885 }
14886 /^X\(\/\).*/{
14887 s//\1/
14888 q
14889 }
14890 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000014892 ac_builddir=.
14893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894case "$ac_dir" in
14895.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14896*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000014899 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900 case $ac_top_builddir_sub in
14901 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14902 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14903 esac ;;
14904esac
14905ac_abs_top_builddir=$ac_pwd
14906ac_abs_builddir=$ac_pwd$ac_dir_suffix
14907# for backward compatibility:
14908ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000014909
14910case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014913 ac_top_srcdir=$ac_top_builddir_sub
14914 ac_abs_top_srcdir=$ac_pwd ;;
14915 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014917 ac_top_srcdir=$srcdir
14918 ac_abs_top_srcdir=$srcdir ;;
14919 *) # Relative name.
14920 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14921 ac_top_srcdir=$ac_top_build_prefix$srcdir
14922 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014923esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000014925
Martin v. Löwis11437992002-04-12 09:54:03 +000014926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927 case $ac_mode in
14928 :F)
14929 #
14930 # CONFIG_FILE
14931 #
Martin v. Löwis11437992002-04-12 09:54:03 +000014932
14933 case $INSTALL in
14934 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014935 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000014937_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938
Matthias Kloseb9621712010-04-24 17:59:49 +000014939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940# If the template does not know about datarootdir, expand it.
14941# FIXME: This hack should be removed a few years after 2.60.
14942ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000014943ac_sed_dataroot='
14944/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014945 p
14946 q
14947}
14948/@datadir@/p
14949/@docdir@/p
14950/@infodir@/p
14951/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000014952/@mandir@/p'
14953case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954*datarootdir*) ac_datarootdir_seen=yes;;
14955*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
14957$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960 ac_datarootdir_hack='
14961 s&@datadir@&$datadir&g
14962 s&@docdir@&$docdir&g
14963 s&@infodir@&$infodir&g
14964 s&@localedir@&$localedir&g
14965 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000014966 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967esac
14968_ACEOF
14969
14970# Neutralize VPATH when `$srcdir' = `.'.
14971# Shell code in configure.ac might set extrasub.
14972# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000014973cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14974ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000014975$extrasub
14976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014977cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014978:t
14979/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000014980s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000014982s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983s&@srcdir@&$ac_srcdir&;t t
14984s&@abs_srcdir@&$ac_abs_srcdir&;t t
14985s&@top_srcdir@&$ac_top_srcdir&;t t
14986s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14987s&@builddir@&$ac_builddir&;t t
14988s&@abs_builddir@&$ac_abs_builddir&;t t
14989s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14990s&@INSTALL@&$ac_INSTALL&;t t
14991$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000014992"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014993eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
14994 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014996test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000014997 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
14998 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
14999 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015000 { $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 +000015001which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015002$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015003which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015004
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015005 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 case $ac_file in
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015007 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15008 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 esac \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015010 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015011 ;;
15012 :H)
15013 #
15014 # CONFIG_HEADER
15015 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 {
15018 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015019 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15020 } >"$ac_tmp/config.h" \
15021 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15022 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15024$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 rm -f "$ac_file"
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015027 mv "$ac_tmp/config.h" "$ac_file" \
15028 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 fi
15030 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015031 $as_echo "/* $configure_input */" \
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015032 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15033 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015034 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015035 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
15038 esac
15039
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015040
15041 case $ac_file$ac_mode in
15042 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15043
15044 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045done # for ac_tag
15046
Guido van Rossum627b2d71993-12-24 10:39:16 +000015047
Matthias Kloseb9621712010-04-24 17:59:49 +000015048as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015049_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015050ac_clean_files=$ac_clean_files_save
15051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052test $ac_write_fail = 0 ||
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015053 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015054
Martin v. Löwis11437992002-04-12 09:54:03 +000015055
15056# configure is writing to config.log, and then calls config.status.
15057# config.status does its own redirection, appending to config.log.
15058# Unfortunately, on DOS this fails, as config.log is still kept open
15059# by configure, so config.status won't be able to write to it; its
15060# output is simply discarded. So we exec the FD to /dev/null,
15061# effectively closing config.log, so it can be properly (re)opened and
15062# appended to by config.status. When coming back to configure, we
15063# need to make the FD available again.
15064if test "$no_create" != yes; then
15065 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015066 ac_config_status_args=
15067 test "$silent" = yes &&
15068 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015070 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015071 exec 5>>config.log
15072 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15073 # would make configure fail if this is the last instruction.
Martin v. Löwis9b142aa2011-02-05 20:26:52 +000015074 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015075fi
15076if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15078$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015079fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015080
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015081
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015082echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015083if test ! -f Modules/Setup
15084then
15085 cp $srcdir/Modules/Setup.dist Modules/Setup
15086fi
15087
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015088echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015089if test ! -f Modules/Setup.local
15090then
15091 echo "# Edit this file for local setup changes" >Modules/Setup.local
15092fi
15093
15094echo "creating Makefile"
15095$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15096 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015097 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015098mv config.c Modules