blob: bced44196c30756c8853bad6c477e39f2342eb4d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004# Generated by GNU Autoconf 2.68 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Martin v. Löwiseba40652007-08-30 20:10:57 +00009# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012#
13#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014# This configure script is free software; the Free Software Foundation
15# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016## -------------------- ##
17## M4sh Initialization. ##
18## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000019
Martin v. Löwiseba40652007-08-30 20:10:57 +000020# Be more Bourne compatible
21DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000022if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000023 emulate sh
24 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000025 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000030 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000035esac
Martin v. Löwis11437992002-04-12 09:54:03 +000036fi
37
Skip Montanaro6dead952003-09-25 14:50:04 +000038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000039as_nl='
40'
41export as_nl
42# Printing a long string crashes Solaris 7 /usr/bin/printf.
43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46# Prefer a ksh shell builtin over an external printf program on Solaris,
47# but without wasting forks for bash or zsh.
48if test -z "$BASH_VERSION$ZSH_VERSION" \
49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='print -r --'
51 as_echo_n='print -rn --'
52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='printf %s\n'
54 as_echo_n='printf %s'
55else
56 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58 as_echo_n='/usr/ucb/echo -n'
59 else
60 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61 as_echo_n_body='eval
62 arg=$1;
63 case $arg in #(
64 *"$as_nl"*)
65 expr "X$arg" : "X\\(.*\\)$as_nl";
66 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 esac;
68 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69 '
70 export as_echo_n_body
71 as_echo_n='sh -c $as_echo_n_body as_echo'
72 fi
73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
75fi
Martin v. Löwis11437992002-04-12 09:54:03 +000076
77# The user is always right.
78if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000079 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000085
Martin v. Löwiseba40652007-08-30 20:10:57 +000086
87# IFS
88# We need space, tab and new line, in precisely that order. Quoting is
89# there to prevent editors from complaining about space-tab.
90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
91# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000092IFS=" "" $as_nl"
93
94# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010095as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000096case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000097 *[\\/]* ) as_myself=$0 ;;
98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000099for as_dir in $PATH
100do
101 IFS=$as_save_IFS
102 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000106
Martin v. Löwiseba40652007-08-30 20:10:57 +0000107 ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112 as_myself=$0
113fi
114if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117fi
118
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000136
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142 emulate sh
143 NULLCMD=:
144 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145 # is contrary to our usage. Disable this feature.
146 alias -g '\${1+\"\$@\"}'='\"\$@\"'
147 setopt NO_GLOB_SUBST
148else
149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
155fi
156"
157 as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171 exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179 if (eval "$as_required") 2>/dev/null; then :
180 as_have_required=yes
181else
182 as_have_required=no
183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191 IFS=$as_save_IFS
192 test -z "$as_dir" && as_dir=.
193 as_found=:
194 case $as_dir in #(
195 /*)
196 for as_base in sh bash ksh sh5; do
197 # Try only shells that exist, to save several forks.
198 as_shell=$as_dir/$as_base
199 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 CONFIG_SHELL=$as_shell as_have_required=yes
202 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203 break 2
204fi
205fi
206 done;;
207 esac
208 as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212 CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217 if test "x$CONFIG_SHELL" != x; then :
218 # We cannot yet assume a decent shell, so we have to provide a
219 # neutralization value for shells without unset; and this also
220 # works around shells that cannot unset nonexistent variables.
Matthias Klose3cef2a92012-03-14 23:39:33 +0100221 # Preserve -v and -x to the replacement shell.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000222 BASH_ENV=/dev/null
223 ENV=/dev/null
224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225 export CONFIG_SHELL
Matthias Klose3cef2a92012-03-14 23:39:33 +0100226 case $- in # ((((
227 *v*x* | *x*v* ) as_opts=-vx ;;
228 *v* ) as_opts=-v ;;
229 *x* ) as_opts=-x ;;
230 * ) as_opts= ;;
231 esac
232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000233fi
234
235 if test x$as_have_required = xno; then :
236 $as_echo "$0: This script requires a shell more modern than all"
237 $as_echo "$0: the shells that I found on your system."
238 if test x${ZSH_VERSION+set} = xset ; then
239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 else
242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
243$0: http://bugs.python.org/ about your system, including
244$0: any error possibly output before this message. Then
245$0: install a modern shell, or manually run the script
246$0: under such a shell if you do have one."
247 fi
248 exit 1
249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
257
258## --------------------- ##
259## M4sh Shell Functions. ##
260## --------------------- ##
261# as_fn_unset VAR
262# ---------------
263# Portably unset VAR.
264as_fn_unset ()
265{
266 { eval $1=; unset $1;}
267}
268as_unset=as_fn_unset
269
270# as_fn_set_status STATUS
271# -----------------------
272# Set $? to STATUS, without forking.
273as_fn_set_status ()
274{
275 return $1
276} # as_fn_set_status
277
278# as_fn_exit STATUS
279# -----------------
280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281as_fn_exit ()
282{
283 set +e
284 as_fn_set_status $1
285 exit $1
286} # as_fn_exit
287
288# as_fn_mkdir_p
289# -------------
290# Create "$as_dir" as a directory, including parents if necessary.
291as_fn_mkdir_p ()
292{
293
294 case $as_dir in #(
295 -*) as_dir=./$as_dir;;
296 esac
297 test -d "$as_dir" || eval $as_mkdir_p || {
298 as_dirs=
299 while :; do
300 case $as_dir in #(
301 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302 *) as_qdir=$as_dir;;
303 esac
304 as_dirs="'$as_qdir' $as_dirs"
305 as_dir=`$as_dirname -- "$as_dir" ||
306$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307 X"$as_dir" : 'X\(//\)[^/]' \| \
308 X"$as_dir" : 'X\(//\)$' \| \
309 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310$as_echo X"$as_dir" |
311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312 s//\1/
313 q
314 }
315 /^X\(\/\/\)[^/].*/{
316 s//\1/
317 q
318 }
319 /^X\(\/\/\)$/{
320 s//\1/
321 q
322 }
323 /^X\(\/\).*/{
324 s//\1/
325 q
326 }
327 s/.*/./; q'`
328 test -d "$as_dir" && break
329 done
330 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000331 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000332
333
334} # as_fn_mkdir_p
335# as_fn_append VAR VALUE
336# ----------------------
337# Append the text in VALUE to the end of the definition contained in VAR. Take
338# advantage of any shell optimizations that allow amortized linear growth over
339# repeated appends, instead of the typical quadratic growth present in naive
340# implementations.
341if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342 eval 'as_fn_append ()
343 {
344 eval $1+=\$2
345 }'
346else
347 as_fn_append ()
348 {
349 eval $1=\$$1\$2
350 }
351fi # as_fn_append
352
353# as_fn_arith ARG...
354# ------------------
355# Perform arithmetic evaluation on the ARGs, and store the result in the
356# global $as_val. Take advantage of shells that can avoid forks. The arguments
357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
363else
364 as_fn_arith ()
365 {
366 as_val=`expr "$@" || test $? -eq 1`
367 }
368fi # as_fn_arith
369
370
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000371# as_fn_error STATUS ERROR [LINENO LOG_FD]
372# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000375# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000376as_fn_error ()
377{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000378 as_status=$1; test $as_status -eq 0 && as_status=1
379 if test "$4"; then
380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000382 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000383 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000384 as_fn_exit $as_status
385} # as_fn_error
386
Martin v. Löwiseba40652007-08-30 20:10:57 +0000387if expr a : '\(a\)' >/dev/null 2>&1 &&
388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
389 as_expr=expr
390else
391 as_expr=false
392fi
393
394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395 as_basename=basename
396else
397 as_basename=false
398fi
399
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401 as_dirname=dirname
402else
403 as_dirname=false
404fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000405
Martin v. Löwiseba40652007-08-30 20:10:57 +0000406as_me=`$as_basename -- "$0" ||
407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408 X"$0" : 'X\(//\)$' \| \
409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000410$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000411 sed '/^.*\/\([^/][^/]*\)\/*$/{
412 s//\1/
413 q
414 }
415 /^X\/\(\/\/\)$/{
416 s//\1/
417 q
418 }
419 /^X\/\(\/\).*/{
420 s//\1/
421 q
422 }
423 s/.*/./; q'`
424
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000431
432
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000442 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000453 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000460 # Exit status is that of the last command.
461 exit
462}
463
Martin v. Löwiseba40652007-08-30 20:10:57 +0000464ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000465case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000466-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000467 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000472 esac;;
473*)
474 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000475esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000476
Martin v. Löwis11437992002-04-12 09:54:03 +0000477rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000478if test -d conf$$.dir; then
479 rm -f conf$$.dir/conf$$.file
480else
481 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000482 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000484if (echo >conf$$.file) 2>/dev/null; then
485 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 as_ln_s='ln -s'
487 # ... but there are two gotchas:
488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490 # In both cases, we have to default to `cp -p'.
491 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 as_ln_s='cp -p'
493 elif ln conf$$.file conf$$ 2>/dev/null; then
494 as_ln_s=ln
495 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000498else
499 as_ln_s='cp -p'
500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000503
Skip Montanaro6dead952003-09-25 14:50:04 +0000504if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000506else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000507 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000508 as_mkdir_p=false
509fi
510
Martin v. Löwiseba40652007-08-30 20:10:57 +0000511if test -x / >/dev/null 2>&1; then
512 as_test_x='test -x'
513else
514 if ls -dL / >/dev/null 2>&1; then
515 as_ls_L_option=L
516 else
517 as_ls_L_option=
518 fi
519 as_test_x='
520 eval sh -c '\''
521 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524 case $1 in #(
525 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000526 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000528 ???[sx]*):;;*)false;;esac;fi
529 '\'' sh
530 '
531fi
532as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000533
534# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000535as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000536
537# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000539
540
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000541test -n "$DJDIR" || exec 7<&0 </dev/null
542exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
544# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000546# so uname gets run too.
547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
Martin v. Löwis11437992002-04-12 09:54:03 +0000549#
550# Initializations.
551#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000553ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000554ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000556cross_compiling=no
557subdirs=
558MFLAGS=
559MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000560
Martin v. Löwis11437992002-04-12 09:54:03 +0000561# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000562PACKAGE_NAME='python'
563PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000564PACKAGE_VERSION='2.7'
565PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000566PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000567PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569ac_unique_file="Include/object.h"
570# Factoring default headers for most tests.
571ac_includes_default="\
572#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000574# include <sys/types.h>
575#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000576#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000577# include <sys/stat.h>
578#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000579#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# include <stdlib.h>
581# include <stddef.h>
582#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000583# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000584# include <stdlib.h>
585# endif
586#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000587#ifdef HAVE_STRING_H
588# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000589# include <memory.h>
590# endif
591# include <string.h>
592#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <strings.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef HAVE_STDINT_H
600# include <stdint.h>
601#endif
602#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <unistd.h>
604#endif"
605
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000606ac_subst_vars='LTLIBOBJS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000607SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000608THREADHEADERS
609UNICODE_OBJS
610LIBC
611LIBM
612HAVE_GETHOSTBYNAME
613HAVE_GETHOSTBYNAME_R
614HAVE_GETHOSTBYNAME_R_3_ARG
615HAVE_GETHOSTBYNAME_R_5_ARG
616HAVE_GETHOSTBYNAME_R_6_ARG
617LIBOBJS
618TRUE
619MACHDEP_OBJS
620DYNLOADFILE
621DLINCLDIR
622THREADOBJ
623LDLAST
624USE_THREAD_MODULE
625SIGNAL_OBJS
626USE_SIGNAL_MODULE
627LIBFFI_INCLUDEDIR
628PKG_CONFIG
629SHLIBS
630CFLAGSFORSHARED
631LINKFORSHARED
632CCSHARED
633BLDSHARED
634LDCXXSHARED
635LDSHARED
636SO
637LIBTOOL_CRUFT
638OTHER_LIBTOOL_OPT
639UNIVERSAL_ARCH_FLAGS
640BASECFLAGS
641OPT
642LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000643MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100647HAS_HG
648HGBRANCH
649HGTAG
650HGVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000651SVNVERSION
652ARFLAGS
653AR
654RANLIB
655GNULD
656LINKCC
657RUNSHARED
658INSTSONAME
659LDLIBRARYDIR
660BLDLIBRARY
661DLLLIBRARY
662LDLIBRARY
663LIBRARY
664BUILDEXEEXT
665EGREP
666GREP
667CPP
668MAINCC
669CXX
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677EXPORT_MACOSX_DEPLOYMENT_TARGET
678CONFIGURE_MACOSX_DEPLOYMENT_TARGET
679EXTRAMACHDEPPATH
680EXTRAPLATDIR
681SGI_ABI
682MACHDEP
683FRAMEWORKINSTALLAPPSPREFIX
684FRAMEWORKUNIXTOOLSPREFIX
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 Klosea0bea5d2010-05-08 10:00:28 +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
751enable_toolbox_glue
752with_libs
753with_system_expat
754with_system_ffi
755with_dbmliborder
756with_signal_module
757with_dec_threads
758with_threads
759with_thread
760with_pth
761enable_ipv6
762with_doc_strings
763with_tsc
764with_pymalloc
765with_valgrind
766with_wctype_functions
767with_fpectl
768with_libm
769with_libc
770enable_big_digits
771enable_unicode
772'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000773 ac_precious_vars='build_alias
774host_alias
775target_alias
776CC
777CFLAGS
778LDFLAGS
779LIBS
780CPPFLAGS
781CPP'
782
Guido van Rossum627b2d71993-12-24 10:39:16 +0000783
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785ac_init_help=
786ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000787ac_unrecognized_opts=
788ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000789# The variables have the same names as the options, with
790# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000791cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803x_includes=NONE
804x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820includedir='${prefix}/include'
821oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000822docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
823infodir='${datarootdir}/info'
824htmldir='${docdir}'
825dvidir='${docdir}'
826pdfdir='${docdir}'
827psdir='${docdir}'
828libdir='${exec_prefix}/lib'
829localedir='${datarootdir}/locale'
830mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000835do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836 # If the previous option needs an argument, assign it.
837 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839 ac_prev=
840 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000844 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
845 *=) ac_optarg= ;;
846 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000847 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Accept the important Cygnus configure options, so we can diagnose typos.
850
Martin v. Löwiseba40652007-08-30 20:10:57 +0000851 case $ac_dashdash$ac_option in
852 --)
853 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855 -bindir | --bindir | --bindi | --bind | --bin | --bi)
856 ac_prev=bindir ;;
857 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000858 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859
860 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000861 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 -cache-file | --cache-file | --cache-fil | --cache-fi \
866 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
867 ac_prev=cache_file ;;
868 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
869 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 cache_file=$ac_optarg ;;
871
872 --config-cache | -C)
873 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
Martin v. Löwiseba40652007-08-30 20:10:57 +0000880 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
881 | --dataroo | --dataro | --datar)
882 ac_prev=datarootdir ;;
883 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
884 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
885 datarootdir=$ac_optarg ;;
886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000888 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000890 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000891 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000892 ac_useropt_orig=$ac_useropt
893 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
894 case $ac_user_opts in
895 *"
896"enable_$ac_useropt"
897"*) ;;
898 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
899 ac_unrecognized_sep=', ';;
900 esac
901 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902
903 -docdir | --docdir | --docdi | --doc | --do)
904 ac_prev=docdir ;;
905 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
906 docdir=$ac_optarg ;;
907
908 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
909 ac_prev=dvidir ;;
910 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
911 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
913 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000914 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000916 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000917 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000918 ac_useropt_orig=$ac_useropt
919 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
920 case $ac_user_opts in
921 *"
922"enable_$ac_useropt"
923"*) ;;
924 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
925 ac_unrecognized_sep=', ';;
926 esac
927 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
930 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
931 | --exec | --exe | --ex)
932 ac_prev=exec_prefix ;;
933 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
934 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
935 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
938 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Obsolete; use --with-gas.
940 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 -help | --help | --hel | --he | -h)
943 ac_init_help=long ;;
944 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
945 ac_init_help=recursive ;;
946 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
947 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
Martin v. Löwiseba40652007-08-30 20:10:57 +0000954 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
955 ac_prev=htmldir ;;
956 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
957 | --ht=*)
958 htmldir=$ac_optarg ;;
959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -includedir | --includedir | --includedi | --included | --include \
961 | --includ | --inclu | --incl | --inc)
962 ac_prev=includedir ;;
963 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
964 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
967 -infodir | --infodir | --infodi | --infod | --info | --inf)
968 ac_prev=infodir ;;
969 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971
972 -libdir | --libdir | --libdi | --libd)
973 ac_prev=libdir ;;
974 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976
977 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
978 | --libexe | --libex | --libe)
979 ac_prev=libexecdir ;;
980 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
981 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
Martin v. Löwiseba40652007-08-30 20:10:57 +0000984 -localedir | --localedir | --localedi | --localed | --locale)
985 ac_prev=localedir ;;
986 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
987 localedir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000990 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 ac_prev=localstatedir ;;
992 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000993 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
997 ac_prev=mandir ;;
998 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --without-fp.
1003 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 no_create=yes ;;
1008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1010 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1011 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1014 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1015 | --oldin | --oldi | --old | --ol | --o)
1016 ac_prev=oldincludedir ;;
1017 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1018 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1019 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1023 ac_prev=prefix ;;
1024 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1028 | --program-pre | --program-pr | --program-p)
1029 ac_prev=program_prefix ;;
1030 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1031 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1035 | --program-suf | --program-su | --program-s)
1036 ac_prev=program_suffix ;;
1037 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1038 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -program-transform-name | --program-transform-name \
1042 | --program-transform-nam | --program-transform-na \
1043 | --program-transform-n | --program-transform- \
1044 | --program-transform | --program-transfor \
1045 | --program-transfo | --program-transf \
1046 | --program-trans | --program-tran \
1047 | --progr-tra | --program-tr | --program-t)
1048 ac_prev=program_transform_name ;;
1049 -program-transform-name=* | --program-transform-name=* \
1050 | --program-transform-nam=* | --program-transform-na=* \
1051 | --program-transform-n=* | --program-transform-=* \
1052 | --program-transform=* | --program-transfor=* \
1053 | --program-transfo=* | --program-transf=* \
1054 | --program-trans=* | --program-tran=* \
1055 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Martin v. Löwiseba40652007-08-30 20:10:57 +00001058 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1059 ac_prev=pdfdir ;;
1060 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1061 pdfdir=$ac_optarg ;;
1062
1063 -psdir | --psdir | --psdi | --psd | --ps)
1064 ac_prev=psdir ;;
1065 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1066 psdir=$ac_optarg ;;
1067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1069 | -silent | --silent | --silen | --sile | --sil)
1070 silent=yes ;;
1071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1073 ac_prev=sbindir ;;
1074 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1075 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
1078 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1079 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1080 | --sharedst | --shareds | --shared | --share | --shar \
1081 | --sha | --sh)
1082 ac_prev=sharedstatedir ;;
1083 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1084 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1085 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1086 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -site | --site | --sit)
1090 ac_prev=site ;;
1091 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1095 ac_prev=srcdir ;;
1096 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1100 | --syscon | --sysco | --sysc | --sys | --sy)
1101 ac_prev=sysconfdir ;;
1102 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1103 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1112 verbose=yes ;;
1113
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 -version | --version | --versio | --versi | --vers | -V)
1115 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001118 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001121 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149 --x)
1150 # Obsolete; use --with-x.
1151 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1154 | --x-incl | --x-inc | --x-in | --x-i)
1155 ac_prev=x_includes ;;
1156 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1157 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1161 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1162 ac_prev=x_libraries ;;
1163 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1164 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001167 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1168Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 ;;
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 *=*)
1172 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1173 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001174 case $ac_envvar in #(
1175 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001176 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001177 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 export $ac_envvar ;;
1180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001185 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001186 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 ;;
1188
1189 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001190done
1191
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001194 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195fi
1196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001197if test -n "$ac_unrecognized_opts"; then
1198 case $enable_option_checking in
1199 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001200 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001201 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1202 esac
1203fi
1204
1205# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001206for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1207 datadir sysconfdir sharedstatedir localstatedir includedir \
1208 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1209 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001211 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 # Remove trailing slashes.
1213 case $ac_val in
1214 */ )
1215 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1216 eval $ac_var=\$ac_val;;
1217 esac
1218 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001220 [\\/$]* | ?:[\\/]* ) continue;;
1221 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001223 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001224done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226# There might be people who depend on the old broken behavior: `$host'
1227# used to hold the argument of --host etc.
1228# FIXME: To remove some day.
1229build=$build_alias
1230host=$host_alias
1231target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001232
Martin v. Löwis11437992002-04-12 09:54:03 +00001233# FIXME: To remove some day.
1234if test "x$host_alias" != x; then
1235 if test "x$build_alias" = x; then
1236 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001237 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1238 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 elif test "x$build_alias" != "x$host_alias"; then
1240 cross_compiling=yes
1241 fi
1242fi
1243
1244ac_tool_prefix=
1245test -n "$host_alias" && ac_tool_prefix=$host_alias-
1246
1247test "$silent" = yes && exec 6>/dev/null
1248
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Martin v. Löwiseba40652007-08-30 20:10:57 +00001250ac_pwd=`pwd` && test -n "$ac_pwd" &&
1251ac_ls_di=`ls -di .` &&
1252ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001253 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001254test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001255 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001256
1257
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258# Find the source files, if location was not specified.
1259if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001261 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001262 ac_confdir=`$as_dirname -- "$as_myself" ||
1263$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1264 X"$as_myself" : 'X\(//\)[^/]' \| \
1265 X"$as_myself" : 'X\(//\)$' \| \
1266 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1267$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001268 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1269 s//\1/
1270 q
1271 }
1272 /^X\(\/\/\)[^/].*/{
1273 s//\1/
1274 q
1275 }
1276 /^X\(\/\/\)$/{
1277 s//\1/
1278 q
1279 }
1280 /^X\(\/\).*/{
1281 s//\1/
1282 q
1283 }
1284 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 srcdir=..
1288 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289else
1290 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001292if test ! -r "$srcdir/$ac_unique_file"; then
1293 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001294 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001296ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1297ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001298 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001299 pwd)`
1300# When building in place, set srcdir=.
1301if test "$ac_abs_confdir" = "$ac_pwd"; then
1302 srcdir=.
1303fi
1304# Remove unnecessary trailing slashes from srcdir.
1305# Double slashes in file names in object file debugging info
1306# mess up M-x gdb in Emacs.
1307case $srcdir in
1308*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1309esac
1310for ac_var in $ac_precious_vars; do
1311 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1312 eval ac_env_${ac_var}_value=\$${ac_var}
1313 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1315done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317#
1318# Report the --help message.
1319#
1320if test "$ac_init_help" = "long"; then
1321 # Omit some internal or obsolete options to make the list less imposing.
1322 # This message is too long to be a string in the A/UX 3.1 sh.
1323 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001324\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001325
1326Usage: $0 [OPTION]... [VAR=VALUE]...
1327
1328To assign environment variables (e.g., CC, CFLAGS...), specify them as
1329VAR=VALUE. See below for descriptions of some of the useful variables.
1330
1331Defaults for the options are specified in brackets.
1332
1333Configuration:
1334 -h, --help display this help and exit
1335 --help=short display options specific to this package
1336 --help=recursive display the short help of all the included packages
1337 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001338 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001339 --cache-file=FILE cache test results in FILE [disabled]
1340 -C, --config-cache alias for \`--cache-file=config.cache'
1341 -n, --no-create do not create output files
1342 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344Installation directories:
1345 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001346 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001347 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001348 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349
1350By default, \`make install' will install all the files in
1351\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1352an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1353for instance \`--prefix=\$HOME'.
1354
1355For better control, use the options below.
1356
1357Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001358 --bindir=DIR user executables [EPREFIX/bin]
1359 --sbindir=DIR system admin executables [EPREFIX/sbin]
1360 --libexecdir=DIR program executables [EPREFIX/libexec]
1361 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1362 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1363 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1364 --libdir=DIR object code libraries [EPREFIX/lib]
1365 --includedir=DIR C header files [PREFIX/include]
1366 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1367 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1368 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1369 --infodir=DIR info documentation [DATAROOTDIR/info]
1370 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1371 --mandir=DIR man documentation [DATAROOTDIR/man]
1372 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1373 --htmldir=DIR html documentation [DOCDIR]
1374 --dvidir=DIR dvi documentation [DOCDIR]
1375 --pdfdir=DIR pdf documentation [DOCDIR]
1376 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377_ACEOF
1378
1379 cat <<\_ACEOF
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001384 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001385 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 cat <<\_ACEOF
1388
1389Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001390 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001393 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001394 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395 --enable-framework[=INSTALLDIR]
1396 Build (MacOSX|Darwin) framework
1397 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001398 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001399 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1400 --enable-ipv6 Enable ipv6 (with ipv4) support
1401 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001402 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001403 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001404 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001405 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Optional Packages:
1408 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1409 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001410 --with-universal-archs=ARCH
1411 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001412 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001413 --with-framework-name=FRAMEWORK
1414 specify an alternate name of the framework built
1415 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001417 --with-cxx-main=<compiler>
1418 compile main() and link python executable with C++
1419 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --with-suffix=.exe set executable suffix
1421 --with-pydebug build with Py_DEBUG defined
1422 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001423 --with-system-expat build pyexpat module using an installed expat
1424 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001425 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001426 --with-dbmliborder=db1:db2:...
1427 order to check db backends for dbm. Valid value is a
1428 colon separated string with the backend names
1429 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --with-signal-module disable/enable signal module
1431 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1432 --with(out)-threads[=DIRECTORY]
1433 disable/enable thread support
1434 --with(out)-thread[=DIRECTORY]
1435 deprecated; use --with(out)-threads
1436 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001437 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001438 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001440 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with-fpectl enable SIGFPE catching
1443 --with-libm=STRING math library
1444 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Some influential environment variables:
1447 CC C compiler command
1448 CFLAGS C compiler flags
1449 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1450 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001452 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 CPP C preprocessor
1455
1456Use these variables to override the choices made by `configure' or to help
1457it to find libraries and programs with nonstandard names/locations.
1458
Georg Brandl464432d2009-05-20 18:24:08 +00001459Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001461ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001462fi
1463
1464if test "$ac_init_help" = "recursive"; then
1465 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001467 test -d "$ac_dir" ||
1468 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1469 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 ac_builddir=.
1471
Martin v. Löwiseba40652007-08-30 20:10:57 +00001472case "$ac_dir" in
1473.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1474*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001475 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001476 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001477 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001478 case $ac_top_builddir_sub in
1479 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1481 esac ;;
1482esac
1483ac_abs_top_builddir=$ac_pwd
1484ac_abs_builddir=$ac_pwd$ac_dir_suffix
1485# for backward compatibility:
1486ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491 ac_top_srcdir=$ac_top_builddir_sub
1492 ac_abs_top_srcdir=$ac_pwd ;;
1493 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001495 ac_top_srcdir=$srcdir
1496 ac_abs_top_srcdir=$srcdir ;;
1497 *) # Relative name.
1498 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1499 ac_top_srcdir=$ac_top_build_prefix$srcdir
1500 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001501esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001502ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001503
Martin v. Löwiseba40652007-08-30 20:10:57 +00001504 cd "$ac_dir" || { ac_status=$?; continue; }
1505 # Check for guested configure.
1506 if test -f "$ac_srcdir/configure.gnu"; then
1507 echo &&
1508 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1509 elif test -f "$ac_srcdir/configure"; then
1510 echo &&
1511 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001513 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001514 fi || ac_status=$?
1515 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 done
1517fi
1518
Martin v. Löwiseba40652007-08-30 20:10:57 +00001519test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001520if $ac_init_version; then
1521 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001522python configure 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +01001523generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001524
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001525Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526This configure script is free software; the Free Software Foundation
1527gives unlimited permission to copy, distribute and modify it.
1528_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001531
1532## ------------------------ ##
1533## Autoconf initialization. ##
1534## ------------------------ ##
1535
1536# ac_fn_c_try_compile LINENO
1537# --------------------------
1538# Try to compile conftest.$ac_ext, and return whether this succeeded.
1539ac_fn_c_try_compile ()
1540{
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext
1543 if { { ac_try="$ac_compile"
1544case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547esac
1548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549$as_echo "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_c_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext; then :
1562 ac_retval=0
1563else
1564 $as_echo "$as_me: failed program was:" >&5
1565sed 's/^/| /' conftest.$ac_ext >&5
1566
1567 ac_retval=1
1568fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001570 as_fn_set_status $ac_retval
1571
1572} # ac_fn_c_try_compile
1573
1574# ac_fn_c_try_cpp LINENO
1575# ----------------------
1576# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1577ac_fn_c_try_cpp ()
1578{
1579 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580 if { { ac_try="$ac_cpp conftest.$ac_ext"
1581case "(($ac_try" in
1582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583 *) ac_try_echo=$ac_try;;
1584esac
1585eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586$as_echo "$ac_try_echo"; } >&5
1587 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1588 ac_status=$?
1589 if test -s conftest.err; then
1590 grep -v '^ *+' conftest.err >conftest.er1
1591 cat conftest.er1 >&5
1592 mv -f conftest.er1 conftest.err
1593 fi
1594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001595 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1597 test ! -s conftest.err
1598 }; then :
1599 ac_retval=0
1600else
1601 $as_echo "$as_me: failed program was:" >&5
1602sed 's/^/| /' conftest.$ac_ext >&5
1603
1604 ac_retval=1
1605fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001606 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001607 as_fn_set_status $ac_retval
1608
1609} # ac_fn_c_try_cpp
1610
1611# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1612# -------------------------------------------------------
1613# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1614# the include files in INCLUDES and setting the cache variable VAR
1615# accordingly.
1616ac_fn_c_check_header_mongrel ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001619 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1621$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001622if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001623 $as_echo_n "(cached) " >&6
1624fi
1625eval ac_res=\$$3
1626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1627$as_echo "$ac_res" >&6; }
1628else
1629 # Is the header compilable?
1630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1631$as_echo_n "checking $2 usability... " >&6; }
1632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1633/* end confdefs.h. */
1634$4
1635#include <$2>
1636_ACEOF
1637if ac_fn_c_try_compile "$LINENO"; then :
1638 ac_header_compiler=yes
1639else
1640 ac_header_compiler=no
1641fi
1642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1644$as_echo "$ac_header_compiler" >&6; }
1645
1646# Is the header present?
1647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1648$as_echo_n "checking $2 presence... " >&6; }
1649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1650/* end confdefs.h. */
1651#include <$2>
1652_ACEOF
1653if ac_fn_c_try_cpp "$LINENO"; then :
1654 ac_header_preproc=yes
1655else
1656 ac_header_preproc=no
1657fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001658rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1660$as_echo "$ac_header_preproc" >&6; }
1661
1662# So? What about this header?
1663case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1664 yes:no: )
1665 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1666$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1668$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1669 ;;
1670 no:yes:* )
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1672$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1674$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1676$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1678$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1680$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001681( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001682## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001683## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001684 ) | sed "s/^/$as_me: WARNING: /" >&2
1685 ;;
1686esac
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1688$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001689if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001690 $as_echo_n "(cached) " >&6
1691else
1692 eval "$3=\$ac_header_compiler"
1693fi
1694eval ac_res=\$$3
1695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1696$as_echo "$ac_res" >&6; }
1697fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001698 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001699
1700} # ac_fn_c_check_header_mongrel
1701
1702# ac_fn_c_try_run LINENO
1703# ----------------------
1704# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1705# that executables *can* be run.
1706ac_fn_c_try_run ()
1707{
1708 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1709 if { { ac_try="$ac_link"
1710case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_link") 2>&5
1717 ac_status=$?
1718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1719 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1720 { { case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_try") 2>&5
1727 ac_status=$?
1728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; }; }; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: program exited with status $ac_status" >&5
1733 $as_echo "$as_me: failed program was:" >&5
1734sed 's/^/| /' conftest.$ac_ext >&5
1735
1736 ac_retval=$ac_status
1737fi
1738 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001739 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001740 as_fn_set_status $ac_retval
1741
1742} # ac_fn_c_try_run
1743
1744# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1745# -------------------------------------------------------
1746# Tests whether HEADER exists and can be compiled using the include files in
1747# INCLUDES, setting the cache variable VAR accordingly.
1748ac_fn_c_check_header_compile ()
1749{
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1752$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001753if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001754 $as_echo_n "(cached) " >&6
1755else
1756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758$4
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_compile "$LINENO"; then :
1762 eval "$3=yes"
1763else
1764 eval "$3=no"
1765fi
1766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1767fi
1768eval ac_res=\$$3
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1770$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001771 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001772
1773} # ac_fn_c_check_header_compile
1774
1775# ac_fn_c_try_link LINENO
1776# -----------------------
1777# Try to link conftest.$ac_ext, and return whether this succeeded.
1778ac_fn_c_try_link ()
1779{
1780 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1781 rm -f conftest.$ac_objext conftest$ac_exeext
1782 if { { ac_try="$ac_link"
1783case "(($ac_try" in
1784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1785 *) ac_try_echo=$ac_try;;
1786esac
1787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1788$as_echo "$ac_try_echo"; } >&5
1789 (eval "$ac_link") 2>conftest.err
1790 ac_status=$?
1791 if test -s conftest.err; then
1792 grep -v '^ *+' conftest.err >conftest.er1
1793 cat conftest.er1 >&5
1794 mv -f conftest.er1 conftest.err
1795 fi
1796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1797 test $ac_status = 0; } && {
1798 test -z "$ac_c_werror_flag" ||
1799 test ! -s conftest.err
1800 } && test -s conftest$ac_exeext && {
1801 test "$cross_compiling" = yes ||
1802 $as_test_x conftest$ac_exeext
1803 }; then :
1804 ac_retval=0
1805else
1806 $as_echo "$as_me: failed program was:" >&5
1807sed 's/^/| /' conftest.$ac_ext >&5
1808
1809 ac_retval=1
1810fi
1811 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1812 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1813 # interfere with the next link command; also delete a directory that is
1814 # left behind by Apple's compiler. We do this before executing the actions.
1815 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001816 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001817 as_fn_set_status $ac_retval
1818
1819} # ac_fn_c_try_link
1820
1821# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1822# -------------------------------------------
1823# Tests whether TYPE exists after having included INCLUDES, setting cache
1824# variable VAR accordingly.
1825ac_fn_c_check_type ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001830if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=no"
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837int
1838main ()
1839{
1840if (sizeof ($2))
1841 return 0;
1842 ;
1843 return 0;
1844}
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h. */
1849$4
1850int
1851main ()
1852{
1853if (sizeof (($2)))
1854 return 0;
1855 ;
1856 return 0;
1857}
1858_ACEOF
1859if ac_fn_c_try_compile "$LINENO"; then :
1860
1861else
1862 eval "$3=yes"
1863fi
1864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001872
1873} # ac_fn_c_check_type
1874
1875# ac_fn_c_find_uintX_t LINENO BITS VAR
1876# ------------------------------------
1877# Finds an unsigned integer type with width BITS, setting cache variable VAR
1878# accordingly.
1879ac_fn_c_find_uintX_t ()
1880{
1881 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1883$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001884if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001885 $as_echo_n "(cached) " >&6
1886else
1887 eval "$3=no"
1888 # Order is important - never check a type that is potentially smaller
1889 # than half of the expected target width.
1890 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1891 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$ac_includes_default
1895int
1896main ()
1897{
1898static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1899test_array [0] = 0
1900
1901 ;
1902 return 0;
1903}
1904_ACEOF
1905if ac_fn_c_try_compile "$LINENO"; then :
1906 case $ac_type in #(
1907 uint$2_t) :
1908 eval "$3=yes" ;; #(
1909 *) :
1910 eval "$3=\$ac_type" ;;
1911esac
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001914 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001915
1916else
1917 break
1918fi
1919 done
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001925
1926} # ac_fn_c_find_uintX_t
1927
1928# ac_fn_c_find_intX_t LINENO BITS VAR
1929# -----------------------------------
1930# Finds a signed integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_intX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1936$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001937if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in int$2_t 'int' 'long int' \
1944 'long long int' 'short int' 'signed char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001948 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001949int
1950main ()
1951{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001952static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001953test_array [0] = 0
1954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001963 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001964int
1965main ()
1966{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001967static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001968 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1969test_array [0] = 0
1970
1971 ;
1972 return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_compile "$LINENO"; then :
1976
1977else
1978 case $ac_type in #(
1979 int$2_t) :
1980 eval "$3=yes" ;; #(
1981 *) :
1982 eval "$3=\$ac_type" ;;
1983esac
1984fi
1985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001999
2000} # ac_fn_c_find_intX_t
2001
2002# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2003# --------------------------------------------
2004# Tries to find the compile-time value of EXPR in a program that includes
2005# INCLUDES, setting VAR accordingly. Returns whether the value could be
2006# computed
2007ac_fn_c_compute_int ()
2008{
2009 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010 if test "$cross_compiling" = yes; then
2011 # Depending upon the size, compute the lo and hi bounds.
2012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) >= 0)];
2019test_array [0] = 0
2020
2021 ;
2022 return 0;
2023}
2024_ACEOF
2025if ac_fn_c_try_compile "$LINENO"; then :
2026 ac_lo=0 ac_mid=0
2027 while :; do
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029/* end confdefs.h. */
2030$4
2031int
2032main ()
2033{
2034static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2035test_array [0] = 0
2036
2037 ;
2038 return 0;
2039}
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"; then :
2042 ac_hi=$ac_mid; break
2043else
2044 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2045 if test $ac_lo -le $ac_mid; then
2046 ac_lo= ac_hi=
2047 break
2048 fi
2049 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 done
2053else
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) < 0)];
2061test_array [0] = 0
2062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_hi=-1 ac_mid=-1
2069 while :; do
2070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2071/* end confdefs.h. */
2072$4
2073int
2074main ()
2075{
2076static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2077test_array [0] = 0
2078
2079 ;
2080 return 0;
2081}
2082_ACEOF
2083if ac_fn_c_try_compile "$LINENO"; then :
2084 ac_lo=$ac_mid; break
2085else
2086 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2087 if test $ac_mid -le $ac_hi; then
2088 ac_lo= ac_hi=
2089 break
2090 fi
2091 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094 done
2095else
2096 ac_lo= ac_hi=
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101# Binary search between lo and hi bounds.
2102while test "x$ac_lo" != "x$ac_hi"; do
2103 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2111test_array [0] = 0
2112
2113 ;
2114 return 0;
2115}
2116_ACEOF
2117if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_hi=$ac_mid
2119else
2120 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123done
2124case $ac_lo in #((
2125?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2126'') ac_retval=1 ;;
2127esac
2128 else
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132static long int longval () { return $2; }
2133static unsigned long int ulongval () { return $2; }
2134#include <stdio.h>
2135#include <stdlib.h>
2136int
2137main ()
2138{
2139
2140 FILE *f = fopen ("conftest.val", "w");
2141 if (! f)
2142 return 1;
2143 if (($2) < 0)
2144 {
2145 long int i = longval ();
2146 if (i != ($2))
2147 return 1;
2148 fprintf (f, "%ld", i);
2149 }
2150 else
2151 {
2152 unsigned long int i = ulongval ();
2153 if (i != ($2))
2154 return 1;
2155 fprintf (f, "%lu", i);
2156 }
2157 /* Do not output a trailing newline, as this causes \r\n confusion
2158 on some platforms. */
2159 return ferror (f) || fclose (f) != 0;
2160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_run "$LINENO"; then :
2166 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2167else
2168 ac_retval=1
2169fi
2170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2171 conftest.$ac_objext conftest.beam conftest.$ac_ext
2172rm -f conftest.val
2173
2174 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002176 as_fn_set_status $ac_retval
2177
2178} # ac_fn_c_compute_int
2179
2180# ac_fn_c_check_func LINENO FUNC VAR
2181# ----------------------------------
2182# Tests whether FUNC exists, setting the cache variable VAR accordingly
2183ac_fn_c_check_func ()
2184{
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2187$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002188if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002189 $as_echo_n "(cached) " >&6
2190else
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192/* end confdefs.h. */
2193/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2194 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2195#define $2 innocuous_$2
2196
2197/* System header to define __stub macros and hopefully few prototypes,
2198 which can conflict with char $2 (); below.
2199 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2200 <limits.h> exists even on freestanding compilers. */
2201
2202#ifdef __STDC__
2203# include <limits.h>
2204#else
2205# include <assert.h>
2206#endif
2207
2208#undef $2
2209
2210/* Override any GCC internal prototype to avoid an error.
2211 Use char because int might match the return type of a GCC
2212 builtin and then its argument prototype would still apply. */
2213#ifdef __cplusplus
2214extern "C"
2215#endif
2216char $2 ();
2217/* The GNU C library defines this for functions which it implements
2218 to always fail with ENOSYS. Some functions are actually named
2219 something starting with __ and the normal name is an alias. */
2220#if defined __stub_$2 || defined __stub___$2
2221choke me
2222#endif
2223
2224int
2225main ()
2226{
2227return $2 ();
2228 ;
2229 return 0;
2230}
2231_ACEOF
2232if ac_fn_c_try_link "$LINENO"; then :
2233 eval "$3=yes"
2234else
2235 eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext \
2238 conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002243 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2248# ----------------------------------------------------
2249# Tries to find if the field MEMBER exists in type AGGR, after including
2250# INCLUDES, setting cache variable VAR accordingly.
2251ac_fn_c_check_member ()
2252{
2253 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2255$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002256if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$5
2262int
2263main ()
2264{
2265static $2 ac_aggr;
2266if (ac_aggr.$3)
2267return 0;
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"; then :
2273 eval "$4=yes"
2274else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h. */
2277$5
2278int
2279main ()
2280{
2281static $2 ac_aggr;
2282if (sizeof ac_aggr.$3)
2283return 0;
2284 ;
2285 return 0;
2286}
2287_ACEOF
2288if ac_fn_c_try_compile "$LINENO"; then :
2289 eval "$4=yes"
2290else
2291 eval "$4=no"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297eval ac_res=\$$4
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002300 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002301
2302} # ac_fn_c_check_member
2303
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002304# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2305# ---------------------------------------------
2306# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2307# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002308ac_fn_c_check_decl ()
2309{
2310 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002311 as_decl_name=`echo $2|sed 's/ *(.*//'`
2312 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2314$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002315if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002316 $as_echo_n "(cached) " >&6
2317else
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h. */
2320$4
2321int
2322main ()
2323{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002324#ifndef $as_decl_name
2325#ifdef __cplusplus
2326 (void) $as_decl_use;
2327#else
2328 (void) $as_decl_name;
2329#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002330#endif
2331
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$3=yes"
2338else
2339 eval "$3=no"
2340fi
2341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342fi
2343eval ac_res=\$$3
2344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2345$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002346 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002347
2348} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002350This file contains any messages produced by compilers while
2351running configure, to aid debugging if configure makes a mistake.
2352
Martin v. Löwis174440b2008-10-03 08:59:41 +00002353It was created by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +01002354generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002355
2356 $ $0 $@
2357
2358_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002359exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002360{
2361cat <<_ASUNAME
2362## --------- ##
2363## Platform. ##
2364## --------- ##
2365
2366hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2367uname -m = `(uname -m) 2>/dev/null || echo unknown`
2368uname -r = `(uname -r) 2>/dev/null || echo unknown`
2369uname -s = `(uname -s) 2>/dev/null || echo unknown`
2370uname -v = `(uname -v) 2>/dev/null || echo unknown`
2371
2372/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2373/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2374
2375/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2376/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2377/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002378/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002379/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2380/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2381/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2382
2383_ASUNAME
2384
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002390 $as_echo "PATH: $as_dir"
2391 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002392IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002393
2394} >&5
2395
2396cat >&5 <<_ACEOF
2397
2398
2399## ----------- ##
2400## Core tests. ##
2401## ----------- ##
2402
2403_ACEOF
2404
2405
2406# Keep a trace of the command line.
2407# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_configure_args0=
2413ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_must_keep_next=false
2415for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002416do
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 for ac_arg
2418 do
2419 case $ac_arg in
2420 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2421 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2422 | -silent | --silent | --silen | --sile | --sil)
2423 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002424 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002425 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002426 esac
2427 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002428 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002430 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 case $ac_arg in
2435 *=* | --config-cache | -C | -disable-* | --disable-* \
2436 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2437 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2438 | -with-* | --with-* | -without-* | --without-* | --x)
2439 case "$ac_configure_args0 " in
2440 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 esac
2442 ;;
2443 -* ) ac_must_keep_next=true ;;
2444 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002446 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 ;;
2448 esac
2449 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002450done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002451{ ac_configure_args0=; unset ac_configure_args0;}
2452{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454# When interrupted or exit'd, cleanup temporary files, and complete
2455# config.log. We remove comments because anyway the quotes in there
2456# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002457# WARNING: Use '\'' to represent an apostrophe within the trap.
2458# 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 +00002459trap 'exit_status=$?
2460 # Save into config.log some information that might help in debugging.
2461 {
2462 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002463
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002464 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002465## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002466## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 echo
2468 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002469(
2470 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2471 eval ac_val=\$$ac_var
2472 case $ac_val in #(
2473 *${as_nl}*)
2474 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002475 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2476$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 esac
2478 case $ac_var in #(
2479 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002480 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2481 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002482 esac ;;
2483 esac
2484 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2487 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489 "s/'\''/'\''\\\\'\'''\''/g;
2490 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002492 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002494 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002495 esac |
2496 sort
2497)
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002499
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002500 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002501## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002502## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_vars
2505 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002509 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513
2514 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002515 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002517## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 echo
2519 for ac_var in $ac_subst_files
2520 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 eval ac_val=\$$ac_var
2522 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002523 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002524 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002525 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 done | sort
2527 echo
2528 fi
2529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002531 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002532## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002533## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002535 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 fi
2538 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002539 $as_echo "$as_me: caught signal $ac_signal"
2540 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002541 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002542 rm -f core *.core core.conftest.* &&
2543 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002546for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002547 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
2549ac_signal=0
2550
2551# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002554$as_echo "/* confdefs.h */" > confdefs.h
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556# Predefined preprocessor variables.
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_NAME "$PACKAGE_NAME"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_VERSION "$PACKAGE_VERSION"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_STRING "$PACKAGE_STRING"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574cat >>confdefs.h <<_ACEOF
2575#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576_ACEOF
2577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_URL "$PACKAGE_URL"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582
2583# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002584# Prefer an explicitly selected file to automatically selected ones.
2585ac_site_file1=NONE
2586ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002588 # We do not want a PATH search for config.site.
2589 case $CONFIG_SITE in #((
2590 -*) ac_site_file1=./$CONFIG_SITE;;
2591 */*) ac_site_file1=$CONFIG_SITE;;
2592 *) ac_site_file1=./$CONFIG_SITE;;
2593 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002595 ac_site_file1=$prefix/share/config.site
2596 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002598 ac_site_file1=$ac_default_prefix/share/config.site
2599 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002601for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002603 test "x$ac_site_file" = xNONE && continue
2604 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2606$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002608 . "$ac_site_file" \
2609 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2610$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2611as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002612See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 fi
2614done
2615
2616if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 # Some versions of bash will fail to source /dev/null (special files
2618 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2619 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2621$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2624 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 esac
2626 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2629$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 >$cache_file
2631fi
2632
2633# Check that the precious variables saved in the cache have kept the same
2634# value.
2635ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2638 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2640 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 case $ac_old_set,$ac_new_set in
2642 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2644$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 +00002645 ac_cache_corrupted=: ;;
2646 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2648$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 ac_cache_corrupted=: ;;
2650 ,);;
2651 *)
2652 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002653 # differences in whitespace do not lead to failure.
2654 ac_old_val_w=`echo x $ac_old_val`
2655 ac_new_val_w=`echo x $ac_new_val`
2656 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2658$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2659 ac_cache_corrupted=:
2660 else
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2662$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2663 eval $ac_var=\$ac_old_val
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2666$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2668$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 fi;;
2670 esac
2671 # Pass precious variables to config.status.
2672 if test "$ac_new_set" = set; then
2673 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002674 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 *) ac_arg=$ac_var=$ac_new_val ;;
2676 esac
2677 case " $ac_configure_args " in
2678 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 esac
2681 fi
2682done
2683if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2687$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002688 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002690## -------------------- ##
2691## Main body of script. ##
2692## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002693
Guido van Rossum7f43da71994-08-01 12:15:30 +00002694ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2698ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699
Guido van Rossum627b2d71993-12-24 10:39:16 +00002700
Michael W. Hudson54241132001-12-07 15:38:26 +00002701
Martin v. Löwiseba40652007-08-30 20:10:57 +00002702ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002703
2704
Martin v. Löwis11437992002-04-12 09:54:03 +00002705
Georg Brandlbcd64a32009-03-31 21:45:18 +00002706if test "$prefix" != "/"; then
2707 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2708fi
2709
2710
Martin v. Löwis11437992002-04-12 09:54:03 +00002711
2712
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002713# We don't use PACKAGE_ variables, and they cause conflicts
2714# with other autoconf-based packages that include Python.h
2715grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2716rm confdefs.h
2717mv confdefs.h.new confdefs.h
2718
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002719
Martin v. Löwis174440b2008-10-03 08:59:41 +00002720VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002721
Martin v. Löwis1142de32002-03-29 16:28:31 +00002722
2723SOVERSION=1.0
2724
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002725# The later defininition of _XOPEN_SOURCE disables certain features
2726# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2727
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002728$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002729
2730
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002731# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2732# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2733# them.
2734
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002735$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002736
2737
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002738# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2739# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2740# them.
2741
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002743
2744
Martin v. Löwisd6320502004-08-12 13:45:08 +00002745# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2746# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002748$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002749
2750
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002751# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2752# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2753# them.
2754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002755$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002756
2757
2758
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002759define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002760
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002761# Arguments passed to configure.
2762
2763CONFIG_ARGS="$ac_configure_args"
2764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2766$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002767# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002768if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002770 case $enableval in
2771 yes)
2772 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002773 if test ! -d "${enableval}"
2774 then
2775 enableval=/
2776 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002777 ;;
2778 esac
2779 case $enableval in
2780 no)
2781 UNIVERSALSDK=
2782 enable_universalsdk=
2783 ;;
2784 *)
2785 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002786 if test ! -d "${UNIVERSALSDK}"
2787 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002788 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002789 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002790 ;;
2791 esac
2792
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002793
Ronald Oussoren988117f2006-04-29 11:31:35 +00002794else
2795
2796 UNIVERSALSDK=
2797 enable_universalsdk=
2798
Martin v. Löwiseba40652007-08-30 20:10:57 +00002799fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002800
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002801if test -n "${UNIVERSALSDK}"
2802then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2804$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2807$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002808fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002809
Martin v. Löwiseba40652007-08-30 20:10:57 +00002810
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002811
2812
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002813UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2816$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002817
2818# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002819if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002820 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2822$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002823 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002824 if test "${enable_universalsdk}" ; then
2825 :
2826 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002827 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002828 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002829
2830else
2831
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2833$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002834
2835fi
2836
2837
2838
2839
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002840
2841# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002842if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002843 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002844 if test "${enable_framework}"; then
2845 :
2846 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002847 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002848 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002849 PYTHONFRAMEWORK=${withval}
2850 PYTHONFRAMEWORKDIR=${withval}.framework
2851 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2852
2853else
2854
2855 PYTHONFRAMEWORK=Python
2856 PYTHONFRAMEWORKDIR=Python.framework
2857 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2858
2859fi
2860
Martin v. Löwiseba40652007-08-30 20:10:57 +00002861# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002862if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002863 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002864 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002865 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002866 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002867 esac
2868 case $enableval in
2869 no)
2870 PYTHONFRAMEWORK=
2871 PYTHONFRAMEWORKDIR=no-framework
2872 PYTHONFRAMEWORKPREFIX=
2873 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002874 FRAMEWORKINSTALLFIRST=
2875 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002876 FRAMEWORKALTINSTALLFIRST=
2877 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002878 if test "x${prefix}" = "xNONE"; then
2879 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2880 else
2881 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2882 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002883 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002884 ;;
2885 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002886 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002887 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002888 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002889 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002890 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2891 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002892 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002893
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002894 if test "x${prefix}" = "xNONE" ; then
2895 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002896
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002897 else
2898 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2899 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002900
2901 case "${enableval}" in
2902 /System*)
2903 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2904 if test "${prefix}" = "NONE" ; then
2905 # See below
2906 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2907 fi
2908 ;;
2909
2910 /Library*)
2911 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2912 ;;
2913
2914 */Library/Frameworks)
2915 MDIR="`dirname "${enableval}"`"
2916 MDIR="`dirname "${MDIR}"`"
2917 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2918
2919 if test "${prefix}" = "NONE"; then
2920 # User hasn't specified the
2921 # --prefix option, but wants to install
2922 # the framework in a non-default location,
2923 # ensure that the compatibility links get
2924 # installed relative to that prefix as well
2925 # instead of in /usr/local.
2926 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2927 fi
2928 ;;
2929
2930 *)
2931 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2932 ;;
2933 esac
2934
Jack Jansen127e56e2001-09-11 14:41:54 +00002935 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002936
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002937 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002938 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002939 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002940
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002942
Martin v. Löwiseba40652007-08-30 20:10:57 +00002943 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002944
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002945 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2946
2947 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2948
Jack Jansene578a632001-08-15 01:27:14 +00002949 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
Guido van Rossum563e7081996-09-10 18:20:48 +00002951else
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
Jack Jansene578a632001-08-15 01:27:14 +00002953 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002954 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002955 PYTHONFRAMEWORKPREFIX=
2956 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002957 FRAMEWORKINSTALLFIRST=
2958 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002959 FRAMEWORKALTINSTALLFIRST=
2960 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002961 if test "x${prefix}" = "xNONE" ; then
2962 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2963 else
2964 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2965 fi
Jack Jansene578a632001-08-15 01:27:14 +00002966 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002967
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002968
Martin v. Löwiseba40652007-08-30 20:10:57 +00002969fi
2970
Michael W. Hudson54241132001-12-07 15:38:26 +00002971
2972
2973
2974
Jack Jansene578a632001-08-15 01:27:14 +00002975
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002976
2977
Ronald Oussoren5b787322006-06-06 19:50:24 +00002978
2979
2980
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002981
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002982
Jack Jansene578a632001-08-15 01:27:14 +00002983##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002984## AS_HELP_STRING([--with-dyld],
2985## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002986##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002987# Set name for machine-dependent library files
2988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2990$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002991if test -z "$MACHDEP"
2992then
Guido van Rossum563e7081996-09-10 18:20:48 +00002993 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002994 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002995 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002996 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002997 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002998 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002999 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003000 ac_md_system=`echo $ac_sys_system |
3001 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3002 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003003 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003004 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003005
Guido van Rossum07397971997-04-29 21:49:50 +00003006 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003007 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003008 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003009 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003010 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003011 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003012 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003013 esac
3014fi
Guido van Rossum91922671997-10-09 20:24:13 +00003015
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003016# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3017# disable features if it is defined, without any means to access these
3018# features as extensions. For these systems, we skip the definition of
3019# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3020# some feature, make sure there is no alternative way to access this
3021# feature. Also, when using wildcards, make sure you have verified the
3022# need for not defining _XOPEN_SOURCE on all systems matching the
3023# wildcard, and that the wildcard does not include future systems
3024# (which may remove their limitations).
3025case $ac_sys_system/$ac_sys_release in
3026 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3027 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003028 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003029 # In addition, Stefan Krah confirms that issue #1244610 exists through
3030 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003031 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003032 define_xopen_source=no
3033 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3034 # also defined. This can be overridden by defining _BSD_SOURCE
3035 # As this has a different meaning on Linux, only define it on OpenBSD
3036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003037$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003038
3039 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003040 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003041 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3042 # also defined. This can be overridden by defining _BSD_SOURCE
3043 # As this has a different meaning on Linux, only define it on OpenBSD
3044
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003045$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003046
3047 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003048 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3049 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3050 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003051 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003052 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003053 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3054 # request to enable features supported by the standard as a request
3055 # to disable features not supported by the standard. The best way
3056 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3057 # entirely and define __EXTENSIONS__ instead.
3058 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003059 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003060 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3061 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003062 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003063 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003064 define_xopen_source=no;;
3065 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003066 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003067 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003068 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003069 # On FreeBSD 4, the math functions C89 does not cover are never defined
3070 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3071 FreeBSD/4.*)
3072 define_xopen_source=no;;
3073 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3074 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3075 # identifies itself as Darwin/7.*
3076 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3077 # disables platform specific features beyond repair.
3078 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3079 # has no effect, don't bother defining them
3080 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003081 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003082 Darwin/1[0-9].*)
3083 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003084 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3085 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3086 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003087 AIX/4)
3088 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003089 AIX/5)
3090 if test `uname -r` -eq 1; then
3091 define_xopen_source=no
3092 fi
3093 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003094 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3095 # defining NI_NUMERICHOST.
3096 QNX/6.3.2)
3097 define_xopen_source=no
3098 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003099
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003100esac
3101
3102if test $define_xopen_source = yes
3103then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003105$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003106
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003107
3108 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3109 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3110 # several APIs are not declared. Since this is also needed in some
3111 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003112
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003113$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003114
3115
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003116
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003117$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003118
3119
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003120fi
3121
Guido van Rossum91922671997-10-09 20:24:13 +00003122#
3123# SGI compilers allow the specification of the both the ABI and the
3124# ISA on the command line. Depending on the values of these switches,
3125# different and often incompatable code will be generated.
3126#
3127# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3128# thus supply support for various ABI/ISA combinations. The MACHDEP
3129# variable is also adjusted.
3130#
3131
3132if test ! -z "$SGI_ABI"
3133then
3134 CC="cc $SGI_ABI"
3135 LDFLAGS="$SGI_ABI $LDFLAGS"
3136 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3139$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003140
Jack Jansen83f898c2002-12-30 22:23:40 +00003141# And add extra plat-mac for darwin
3142
Jack Jansen7b59b422003-03-17 15:44:10 +00003143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3145$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003146if test -z "$EXTRAPLATDIR"
3147then
3148 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003149 darwin)
3150 EXTRAPLATDIR="\$(PLATMACDIRS)"
3151 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3152 ;;
3153 *)
3154 EXTRAPLATDIR=""
3155 EXTRAMACHDEPPATH=""
3156 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003157 esac
3158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3160$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003161
Jack Jansen6b08a402004-06-03 12:41:45 +00003162# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3163# it may influence the way we can build extensions, so distutils
3164# needs to check it
3165
Ronald Oussoren988117f2006-04-29 11:31:35 +00003166
Jack Jansen6b08a402004-06-03 12:41:45 +00003167CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003168EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003169
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3171$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003172ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3174$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003175
Guido van Rossum627b2d71993-12-24 10:39:16 +00003176# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003177
3178# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3179# for debug/optimization stuff. BASECFLAGS is for flags that are required
3180# just to get things to compile and link. Users are free to override OPT
3181# when running configure or make. The build should not break if they do.
3182# BASECFLAGS should generally not be messed with, however.
3183
3184# XXX shouldn't some/most/all of this code be merged with the stuff later
3185# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3187$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003188
Martin v. Löwiseba40652007-08-30 20:10:57 +00003189# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003190if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003191 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003192 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003193 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003194 without_gcc=yes;;
3195 yes) CC=gcc
3196 without_gcc=no;;
3197 *) CC=$withval
3198 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003199 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003203 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003204 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003205 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003206 case $BE_HOST_CPU in
3207 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003208 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003209 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003210 BASECFLAGS="$BASECFLAGS -export pragma"
3211 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003212 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003213 ;;
3214 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003215 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003216 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003217 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003218 ;;
3219 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003220 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003221 ;;
3222 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003223 AR="\$(srcdir)/Modules/ar_beos"
3224 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003225 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003226 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003227 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228fi
3229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3231$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003232
Guido van Rossum8b131c51995-03-09 14:10:13 +00003233# If the user switches compilers, we can't believe the cache
3234if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3235then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003236 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003237(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003238fi
3239
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003240# If the user set CFLAGS, use this instead of the automatically
3241# determined setting
3242preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003243ac_ext=c
3244ac_cpp='$CPP $CPPFLAGS'
3245ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3246ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3247ac_compiler_gnu=$ac_cv_c_compiler_gnu
3248if test -n "$ac_tool_prefix"; then
3249 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3250set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3252$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003253if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003254 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003255else
3256 if test -n "$CC"; then
3257 ac_cv_prog_CC="$CC" # Let the user override the test.
3258else
Martin v. Löwis11437992002-04-12 09:54:03 +00003259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3260for as_dir in $PATH
3261do
3262 IFS=$as_save_IFS
3263 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003264 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265 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 +00003266 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003267 $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 +00003268 break 2
3269 fi
3270done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003271 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003272IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003273
Jack Jansendd19cf82001-12-06 22:36:17 +00003274fi
3275fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003276CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003277if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3279$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3282$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003283fi
3284
Martin v. Löwiseba40652007-08-30 20:10:57 +00003285
Martin v. Löwis11437992002-04-12 09:54:03 +00003286fi
3287if test -z "$ac_cv_prog_CC"; then
3288 ac_ct_CC=$CC
3289 # Extract the first word of "gcc", so it can be a program name with args.
3290set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3292$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003293if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003294 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003295else
3296 if test -n "$ac_ct_CC"; then
3297 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3298else
3299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3300for as_dir in $PATH
3301do
3302 IFS=$as_save_IFS
3303 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003304 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003305 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003306 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003308 break 2
3309 fi
3310done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003311 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003312IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003313
3314fi
3315fi
3316ac_ct_CC=$ac_cv_prog_ac_ct_CC
3317if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3319$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3322$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003323fi
3324
Martin v. Löwiseba40652007-08-30 20:10:57 +00003325 if test "x$ac_ct_CC" = x; then
3326 CC=""
3327 else
3328 case $cross_compiling:$ac_tool_warned in
3329yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003330{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3331$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003332ac_tool_warned=yes ;;
3333esac
3334 CC=$ac_ct_CC
3335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003336else
3337 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003338fi
3339
Jack Jansendd19cf82001-12-06 22:36:17 +00003340if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003341 if test -n "$ac_tool_prefix"; then
3342 # 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 +00003343set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3345$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003346if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003347 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003348else
3349 if test -n "$CC"; then
3350 ac_cv_prog_CC="$CC" # Let the user override the test.
3351else
Martin v. Löwis11437992002-04-12 09:54:03 +00003352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3353for as_dir in $PATH
3354do
3355 IFS=$as_save_IFS
3356 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003357 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003358 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 +00003359 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003360 $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 +00003361 break 2
3362 fi
3363done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003364 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003365IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003366
3367fi
3368fi
3369CC=$ac_cv_prog_CC
3370if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3372$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3375$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003376fi
3377
Martin v. Löwiseba40652007-08-30 20:10:57 +00003378
Martin v. Löwis11437992002-04-12 09:54:03 +00003379 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003380fi
3381if test -z "$CC"; then
3382 # Extract the first word of "cc", so it can be a program name with args.
3383set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3385$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003386if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003387 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003388else
3389 if test -n "$CC"; then
3390 ac_cv_prog_CC="$CC" # Let the user override the test.
3391else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003392 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3394for as_dir in $PATH
3395do
3396 IFS=$as_save_IFS
3397 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003398 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399 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 +00003400 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3401 ac_prog_rejected=yes
3402 continue
3403 fi
3404 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
3407 fi
3408done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003409 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003410IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003411
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003412if test $ac_prog_rejected = yes; then
3413 # We found a bogon in the path, so make sure we never use it.
3414 set dummy $ac_cv_prog_CC
3415 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003417 # We chose a different compiler from the bogus one.
3418 # However, it has the same basename, so the bogon will be chosen
3419 # first if we set CC to just the basename; use the full file name.
3420 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003421 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003422 fi
3423fi
3424fi
3425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003426CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003427if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3429$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3432$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003433fi
3434
Martin v. Löwiseba40652007-08-30 20:10:57 +00003435
Martin v. Löwis11437992002-04-12 09:54:03 +00003436fi
3437if test -z "$CC"; then
3438 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003439 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 do
3441 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3442set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3444$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003445if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003446 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003447else
3448 if test -n "$CC"; then
3449 ac_cv_prog_CC="$CC" # Let the user override the test.
3450else
Martin v. Löwis11437992002-04-12 09:54:03 +00003451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3452for as_dir in $PATH
3453do
3454 IFS=$as_save_IFS
3455 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003456 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003457 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 +00003458 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003459 $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 +00003460 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003462done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003463 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003465
3466fi
3467fi
3468CC=$ac_cv_prog_CC
3469if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3471$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3474$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003475fi
3476
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477
Martin v. Löwis11437992002-04-12 09:54:03 +00003478 test -n "$CC" && break
3479 done
3480fi
3481if test -z "$CC"; then
3482 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003483 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003484do
3485 # Extract the first word of "$ac_prog", so it can be a program name with args.
3486set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003489if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003491else
3492 if test -n "$ac_ct_CC"; then
3493 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3494else
3495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496for as_dir in $PATH
3497do
3498 IFS=$as_save_IFS
3499 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003500 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501 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 +00003502 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003503 $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 +00003504 break 2
3505 fi
3506done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003507 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003508IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510fi
3511fi
3512ac_ct_CC=$ac_cv_prog_ac_ct_CC
3513if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3515$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3518$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003519fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003520
Martin v. Löwiseba40652007-08-30 20:10:57 +00003521
Martin v. Löwis11437992002-04-12 09:54:03 +00003522 test -n "$ac_ct_CC" && break
3523done
Michael W. Hudson54241132001-12-07 15:38:26 +00003524
Martin v. Löwiseba40652007-08-30 20:10:57 +00003525 if test "x$ac_ct_CC" = x; then
3526 CC=""
3527 else
3528 case $cross_compiling:$ac_tool_warned in
3529yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003532ac_tool_warned=yes ;;
3533esac
3534 CC=$ac_ct_CC
3535 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003536fi
3537
3538fi
3539
3540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003543as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003544See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003545
3546# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003547$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3548set X $ac_compile
3549ac_compiler=$2
3550for ac_option in --version -v -V -qversion; do
3551 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003552case "(($ac_try" in
3553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3554 *) ac_try_echo=$ac_try;;
3555esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003556eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3557$as_echo "$ac_try_echo"; } >&5
3558 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003560 if test -s conftest.err; then
3561 sed '10a\
3562... rest of stderr output deleted ...
3563 10q' conftest.err >conftest.er1
3564 cat conftest.er1 >&5
3565 fi
3566 rm -f conftest.er1 conftest.err
3567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3568 test $ac_status = 0; }
3569done
Martin v. Löwis11437992002-04-12 09:54:03 +00003570
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003572/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003573
Martin v. Löwis11437992002-04-12 09:54:03 +00003574int
3575main ()
3576{
3577
3578 ;
3579 return 0;
3580}
3581_ACEOF
3582ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003583ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003584# Try to create an executable without -o first, disregard a.out.
3585# It will help us diagnose broken compilers, and finding out an intuition
3586# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3588$as_echo_n "checking whether the C compiler works... " >&6; }
3589ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3590
3591# The possible output files:
3592ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3593
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594ac_rmfiles=
3595for ac_file in $ac_files
3596do
3597 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003599 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3600 esac
3601done
3602rm -f $ac_rmfiles
3603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605case "(($ac_try" in
3606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3607 *) ac_try_echo=$ac_try;;
3608esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003609eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3610$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3614 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3616# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3617# in a Makefile. We should not override ac_cv_exeext if it was cached,
3618# so that the user can short-circuit this test for compilers unknown to
3619# Autoconf.
3620for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003621do
3622 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003624 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003625 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003626 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003627 # We found the default executable, but exeext='' is most
3628 # certainly right.
3629 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003630 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003632 then :; else
3633 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3634 fi
3635 # We set ac_cv_exeext here because the later test for it is not
3636 # safe: cross compilers may not add the suffix if given an `-o'
3637 # argument, so we may need to know it at that point already.
3638 # Even if this section looks crufty: it has the advantage of
3639 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003640 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003641 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003642 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 esac
3644done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003645test "$ac_cv_exeext" = no && ac_cv_exeext=
3646
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003647else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003648 ac_file=''
3649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650if test -z "$ac_file"; then :
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
3653$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003654sed 's/^/| /' conftest.$ac_ext >&5
3655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003658as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003659See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660else
3661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3662$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3665$as_echo_n "checking for C compiler default output file name... " >&6; }
3666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3667$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003668ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003669
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003671ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3673$as_echo_n "checking for suffix of executables... " >&6; }
3674if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675case "(($ac_try" in
3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3677 *) ac_try_echo=$ac_try;;
3678esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3680$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3684 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3686# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3687# work properly (i.e., refer to `conftest.exe'), while it won't with
3688# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003689for ac_file in conftest.exe conftest conftest.*; do
3690 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003692 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003694 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 * ) break;;
3696 esac
3697done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003701as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003702See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003703fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704rm -f conftest conftest$ac_cv_exeext
3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3706$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708rm -f conftest.$ac_ext
3709EXEEXT=$ac_cv_exeext
3710ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3712/* end confdefs.h. */
3713#include <stdio.h>
3714int
3715main ()
3716{
3717FILE *f = fopen ("conftest.out", "w");
3718 return ferror (f) || fclose (f) != 0;
3719
3720 ;
3721 return 0;
3722}
Skip Montanaro6dead952003-09-25 14:50:04 +00003723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724ac_clean_files="$ac_clean_files conftest.out"
3725# Check that the compiler produces executables we can run. If not, either
3726# the compiler is broken, or we cross compile.
3727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3728$as_echo_n "checking whether we are cross compiling... " >&6; }
3729if test "$cross_compiling" != yes; then
3730 { { ac_try="$ac_link"
3731case "(($ac_try" in
3732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3733 *) ac_try_echo=$ac_try;;
3734esac
3735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3736$as_echo "$ac_try_echo"; } >&5
3737 (eval "$ac_link") 2>&5
3738 ac_status=$?
3739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3740 test $ac_status = 0; }
3741 if { ac_try='./conftest$ac_cv_exeext'
3742 { { case "(($ac_try" in
3743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3744 *) ac_try_echo=$ac_try;;
3745esac
3746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3747$as_echo "$ac_try_echo"; } >&5
3748 (eval "$ac_try") 2>&5
3749 ac_status=$?
3750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3751 test $ac_status = 0; }; }; then
3752 cross_compiling=no
3753 else
3754 if test "$cross_compiling" = maybe; then
3755 cross_compiling=yes
3756 else
3757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003759as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01003761See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003762 fi
3763 fi
3764fi
3765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3766$as_echo "$cross_compiling" >&6; }
3767
3768rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3769ac_clean_files=$ac_clean_files_save
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3771$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003772if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773 $as_echo_n "(cached) " >&6
3774else
3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778int
3779main ()
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003787if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788case "(($ac_try" in
3789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3790 *) ac_try_echo=$ac_try;;
3791esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3793$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003795 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3797 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798 for ac_file in conftest.o conftest.obj conftest.*; do
3799 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003801 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3803 break;;
3804 esac
3805done
3806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003808sed 's/^/| /' conftest.$ac_ext >&5
3809
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003812as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01003813See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815rm -f conftest.$ac_cv_objext conftest.$ac_ext
3816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3818$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003819OBJEXT=$ac_cv_objext
3820ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3822$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003823if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829int
3830main ()
3831{
3832#ifndef __GNUC__
3833 choke me
3834#endif
3835
3836 ;
3837 return 0;
3838}
3839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_compiler_gnu=yes
3842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003846ac_cv_c_compiler_gnu=$ac_compiler_gnu
3847
3848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3850$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3851if test $ac_compiler_gnu = yes; then
3852 GCC=yes
3853else
3854 GCC=
3855fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003856ac_test_CFLAGS=${CFLAGS+set}
3857ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3859$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003860if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003861 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003862else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863 ac_save_c_werror_flag=$ac_c_werror_flag
3864 ac_c_werror_flag=yes
3865 ac_cv_prog_cc_g=no
3866 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870int
3871main ()
3872{
3873
3874 ;
3875 return 0;
3876}
3877_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003878if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003879 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881 CFLAGS=""
3882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003883/* end confdefs.h. */
3884
3885int
3886main ()
3887{
3888
3889 ;
3890 return 0;
3891}
3892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003894
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895else
3896 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003897 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899/* end confdefs.h. */
3900
3901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003910 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3917 ac_c_werror_flag=$ac_save_c_werror_flag
3918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3920$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003921if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003923elif test $ac_cv_prog_cc_g = yes; then
3924 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925 CFLAGS="-g -O2"
3926 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003927 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003928 fi
3929else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003930 if test "$GCC" = yes; then
3931 CFLAGS="-O2"
3932 else
3933 CFLAGS=
3934 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3937$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003938if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003940else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003942ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003944/* end confdefs.h. */
3945#include <stdarg.h>
3946#include <stdio.h>
3947#include <sys/types.h>
3948#include <sys/stat.h>
3949/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3950struct buf { int x; };
3951FILE * (*rcsopen) (struct buf *, struct stat *, int);
3952static char *e (p, i)
3953 char **p;
3954 int i;
3955{
3956 return p[i];
3957}
3958static char *f (char * (*g) (char **, int), char **p, ...)
3959{
3960 char *s;
3961 va_list v;
3962 va_start (v,p);
3963 s = g (p, va_arg (v,int));
3964 va_end (v);
3965 return s;
3966}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967
3968/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3969 function prototypes and stuff, but not '\xHH' hex character constants.
3970 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003972 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3973 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003975int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3976
Martin v. Löwiseba40652007-08-30 20:10:57 +00003977/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3978 inside strings and character constants. */
3979#define FOO(x) 'x'
3980int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3981
Skip Montanaro6dead952003-09-25 14:50:04 +00003982int test (int i, double x);
3983struct s1 {int (*f) (int a);};
3984struct s2 {int (*f) (double a);};
3985int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3986int argc;
3987char **argv;
3988int
3989main ()
3990{
3991return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3992 ;
3993 return 0;
3994}
3995_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3997 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998do
3999 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004001 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004003rm -f core conftest.err conftest.$ac_objext
4004 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004005done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004006rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004007CC=$ac_save_CC
4008
4009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004010# AC_CACHE_VAL
4011case "x$ac_cv_prog_cc_c89" in
4012 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4014$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4017$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004018 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004019 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4021$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004022esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004025fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004026
Martin v. Löwis11437992002-04-12 09:54:03 +00004027ac_ext=c
4028ac_cpp='$CPP $CPPFLAGS'
4029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004033if test ! -z "$preset_cflags"
4034then
4035 CFLAGS=$preset_cflags
4036fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004037
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004038
4039
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4041$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004042
Martin v. Löwiseba40652007-08-30 20:10:57 +00004043# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004044if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004045 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004046
4047 case $withval in
4048 no) with_cxx_main=no
4049 MAINCC='$(CC)';;
4050 yes) with_cxx_main=yes
4051 MAINCC='$(CXX)';;
4052 *) with_cxx_main=yes
4053 MAINCC=$withval
4054 if test -z "$CXX"
4055 then
4056 CXX=$withval
4057 fi;;
4058 esac
4059else
4060
4061 with_cxx_main=no
4062 MAINCC='$(CC)'
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064fi
4065
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4067$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004068
4069preset_cxx="$CXX"
4070if test -z "$CXX"
4071then
4072 case "$CC" in
4073 gcc) # Extract the first word of "g++", so it can be a program name with args.
4074set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4076$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004077if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004078 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004079else
4080 case $CXX in
4081 [\\/]* | ?:[\\/]*)
4082 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4083 ;;
4084 *)
4085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4086for as_dir in notfound
4087do
4088 IFS=$as_save_IFS
4089 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004092 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004094 break 2
4095 fi
4096done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004098IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004099
4100 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4101 ;;
4102esac
4103fi
4104CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004105if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4107$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4110$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004112
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004113 ;;
4114 cc) # Extract the first word of "c++", so it can be a program name with args.
4115set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4117$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004118if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004119 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004120else
4121 case $CXX in
4122 [\\/]* | ?:[\\/]*)
4123 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4124 ;;
4125 *)
4126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4127for as_dir in notfound
4128do
4129 IFS=$as_save_IFS
4130 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004131 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004133 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004135 break 2
4136 fi
4137done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004138 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004139IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004140
4141 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4142 ;;
4143esac
4144fi
4145CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004146if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4148$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004154 ;;
4155 esac
4156 if test "$CXX" = "notfound"
4157 then
4158 CXX=""
4159 fi
4160fi
4161if test -z "$CXX"
4162then
4163 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4164do
4165 # Extract the first word of "$ac_prog", so it can be a program name with args.
4166set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4168$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004169if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004171else
4172 if test -n "$CXX"; then
4173 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4174else
4175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176for as_dir in $PATH
4177do
4178 IFS=$as_save_IFS
4179 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004180 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004182 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004183 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004184 break 2
4185 fi
4186done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004188IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004189
4190fi
4191fi
4192CXX=$ac_cv_prog_CXX
4193if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4195$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004196else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4198$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004199fi
4200
Martin v. Löwiseba40652007-08-30 20:10:57 +00004201
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004202 test -n "$CXX" && break
4203done
4204test -n "$CXX" || CXX="notfound"
4205
4206 if test "$CXX" = "notfound"
4207 then
4208 CXX=""
4209 fi
4210fi
4211if test "$preset_cxx" != "$CXX"
4212then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004213 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004214
4215 By default, distutils will build C++ extension modules with \"$CXX\".
4216 If this is not intended, then set CXX on the configure command line.
4217 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004218$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004219
4220 By default, distutils will build C++ extension modules with \"$CXX\".
4221 If this is not intended, then set CXX on the configure command line.
4222 " >&2;}
4223fi
4224
4225
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004226# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004227
4228ac_ext=c
4229ac_cpp='$CPP $CPPFLAGS'
4230ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4231ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4232ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4234$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004235# On Suns, sometimes $CPP names a directory.
4236if test -n "$CPP" && test -d "$CPP"; then
4237 CPP=
4238fi
4239if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004240 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004241 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004242else
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 # Double quotes because CPP needs to be expanded
4244 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4245 do
4246 ac_preproc_ok=false
4247for ac_c_preproc_warn_flag in '' yes
4248do
4249 # Use a header file that comes with gcc, so configuring glibc
4250 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004251 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4252 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004253 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004254 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004256/* end confdefs.h. */
4257#ifdef __STDC__
4258# include <limits.h>
4259#else
4260# include <assert.h>
4261#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004264if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266else
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 # Broken: fails on valid input.
4268continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004269fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004270rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004271
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004276#include <ac_nonexistent.h>
4277_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 # Broken: success on invalid input.
4280continue
4281else
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 # Passes both tests.
4283ac_preproc_ok=:
4284break
4285fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004286rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004287
4288done
4289# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004290rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004291if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 break
4293fi
4294
4295 done
4296 ac_cv_prog_CPP=$CPP
4297
4298fi
4299 CPP=$ac_cv_prog_CPP
4300else
4301 ac_cv_prog_CPP=$CPP
4302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4304$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004305ac_preproc_ok=false
4306for ac_c_preproc_warn_flag in '' yes
4307do
4308 # Use a header file that comes with gcc, so configuring glibc
4309 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004310 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4311 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 # On the NeXT, cc -E runs the code through the compiler's parser,
4313 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* end confdefs.h. */
4316#ifdef __STDC__
4317# include <limits.h>
4318#else
4319# include <assert.h>
4320#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004323if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325else
Martin v. Löwis11437992002-04-12 09:54:03 +00004326 # Broken: fails on valid input.
4327continue
4328fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004329rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004330
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004332 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004335#include <ac_nonexistent.h>
4336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004337if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004338 # Broken: success on invalid input.
4339continue
4340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 # Passes both tests.
4342ac_preproc_ok=:
4343break
4344fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004345rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
4347done
4348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004349rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004350if $ac_preproc_ok; then :
4351
Martin v. Löwis11437992002-04-12 09:54:03 +00004352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004353 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4354$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004355as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004356See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004357fi
4358
4359ac_ext=c
4360ac_cpp='$CPP $CPPFLAGS'
4361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4363ac_compiler_gnu=$ac_cv_c_compiler_gnu
4364
4365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4367$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004368if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004371 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373 # Loop through the user's path and test for each of PROGNAME-LIST
4374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004375for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4376do
4377 IFS=$as_save_IFS
4378 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379 for ac_prog in grep ggrep; do
4380 for ac_exec_ext in '' $ac_executable_extensions; do
4381 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4382 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4383# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384 # Check for GNU $ac_path_GREP
4385case `"$ac_path_GREP" --version 2>&1` in
4386*GNU*)
4387 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4388*)
4389 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004390 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 while :
4392 do
4393 cat "conftest.in" "conftest.in" >"conftest.tmp"
4394 mv "conftest.tmp" "conftest.in"
4395 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004396 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4398 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004399 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004400 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4401 # Best one so far, save it but keep looking for a better one
4402 ac_cv_path_GREP="$ac_path_GREP"
4403 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004404 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004405 # 10*(2^10) chars as input seems more than enough
4406 test $ac_count -gt 10 && break
4407 done
4408 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4409esac
4410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004411 $ac_path_GREP_found && break 3
4412 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004413 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004414 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004415IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004417 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004418 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004419else
4420 ac_cv_path_GREP=$GREP
4421fi
4422
Martin v. Löwiseba40652007-08-30 20:10:57 +00004423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4425$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004426 GREP="$ac_cv_path_GREP"
4427
4428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4430$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004431if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004433else
4434 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4435 then ac_cv_path_EGREP="$GREP -E"
4436 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004437 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004438 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 # Loop through the user's path and test for each of PROGNAME-LIST
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004441for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4442do
4443 IFS=$as_save_IFS
4444 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 for ac_prog in egrep; do
4446 for ac_exec_ext in '' $ac_executable_extensions; do
4447 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4448 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4449# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450 # Check for GNU $ac_path_EGREP
4451case `"$ac_path_EGREP" --version 2>&1` in
4452*GNU*)
4453 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4454*)
4455 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004456 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457 while :
4458 do
4459 cat "conftest.in" "conftest.in" >"conftest.tmp"
4460 mv "conftest.tmp" "conftest.in"
4461 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4464 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004465 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004466 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4467 # Best one so far, save it but keep looking for a better one
4468 ac_cv_path_EGREP="$ac_path_EGREP"
4469 ac_path_EGREP_max=$ac_count
4470 fi
4471 # 10*(2^10) chars as input seems more than enough
4472 test $ac_count -gt 10 && break
4473 done
4474 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4475esac
4476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004477 $ac_path_EGREP_found && break 3
4478 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004479 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004483 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004484 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004485else
4486 ac_cv_path_EGREP=$EGREP
4487fi
4488
Martin v. Löwiseba40652007-08-30 20:10:57 +00004489 fi
4490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4492$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004493 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004494
4495
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4497$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004498if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004499 $as_echo_n "(cached) " >&6
4500else
4501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004502/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503#include <stdlib.h>
4504#include <stdarg.h>
4505#include <string.h>
4506#include <float.h>
4507
4508int
4509main ()
4510{
4511
4512 ;
4513 return 0;
4514}
4515_ACEOF
4516if ac_fn_c_try_compile "$LINENO"; then :
4517 ac_cv_header_stdc=yes
4518else
4519 ac_cv_header_stdc=no
4520fi
4521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4522
4523if test $ac_cv_header_stdc = yes; then
4524 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004528
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004529_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004531 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004533else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004534 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004535fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004536rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004538fi
4539
4540if test $ac_cv_header_stdc = yes; then
4541 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544#include <stdlib.h>
4545
4546_ACEOF
4547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4548 $EGREP "free" >/dev/null 2>&1; then :
4549
4550else
4551 ac_cv_header_stdc=no
4552fi
4553rm -f conftest*
4554
4555fi
4556
4557if test $ac_cv_header_stdc = yes; then
4558 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4559 if test "$cross_compiling" = yes; then :
4560 :
4561else
4562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4563/* end confdefs.h. */
4564#include <ctype.h>
4565#include <stdlib.h>
4566#if ((' ' & 0x0FF) == 0x020)
4567# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4568# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4569#else
4570# define ISLOWER(c) \
4571 (('a' <= (c) && (c) <= 'i') \
4572 || ('j' <= (c) && (c) <= 'r') \
4573 || ('s' <= (c) && (c) <= 'z'))
4574# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4575#endif
4576
4577#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4578int
4579main ()
4580{
4581 int i;
4582 for (i = 0; i < 256; i++)
4583 if (XOR (islower (i), ISLOWER (i))
4584 || toupper (i) != TOUPPER (i))
4585 return 2;
4586 return 0;
4587}
4588_ACEOF
4589if ac_fn_c_try_run "$LINENO"; then :
4590
4591else
4592 ac_cv_header_stdc=no
4593fi
4594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4595 conftest.$ac_objext conftest.beam conftest.$ac_ext
4596fi
4597
4598fi
4599fi
4600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4601$as_echo "$ac_cv_header_stdc" >&6; }
4602if test $ac_cv_header_stdc = yes; then
4603
4604$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4605
4606fi
4607
4608# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4609for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4610 inttypes.h stdint.h unistd.h
4611do :
4612 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4613ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4614"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004615if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004616 cat >>confdefs.h <<_ACEOF
4617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4618_ACEOF
4619
4620fi
4621
4622done
4623
4624
4625
4626 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01004627if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004628 MINIX=yes
4629else
4630 MINIX=
4631fi
4632
4633
4634 if test "$MINIX" = yes; then
4635
4636$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4637
4638
4639$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4640
4641
4642$as_echo "#define _MINIX 1" >>confdefs.h
4643
4644 fi
4645
4646
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4648$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004649if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004650 $as_echo_n "(cached) " >&6
4651else
4652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4653/* end confdefs.h. */
4654
4655# define __EXTENSIONS__ 1
4656 $ac_includes_default
4657int
4658main ()
4659{
4660
4661 ;
4662 return 0;
4663}
4664_ACEOF
4665if ac_fn_c_try_compile "$LINENO"; then :
4666 ac_cv_safe_to_define___extensions__=yes
4667else
4668 ac_cv_safe_to_define___extensions__=no
4669fi
4670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4671fi
4672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4673$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4674 test $ac_cv_safe_to_define___extensions__ = yes &&
4675 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4676
4677 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4678
4679 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4680
4681 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4682
4683 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4684
4685
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004686
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004687# Check for unsupported systems
4688case $ac_sys_system/$ac_sys_release in
4689atheos*|Linux*/1*)
4690 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4691 echo See README for details.
4692 exit 1;;
4693esac
4694
4695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4697$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004698
4699# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004700if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004701 withval=$with_suffix;
4702 case $withval in
4703 no) EXEEXT=;;
4704 yes) EXEEXT=.exe;;
4705 *) EXEEXT=$withval;;
4706 esac
4707fi
4708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4710$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004711
4712# Test whether we're running on a non-case-sensitive system, in which
4713# case we give a warning if no ext is given
4714
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4716$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004717if test ! -d CaseSensitiveTestDir; then
4718mkdir CaseSensitiveTestDir
4719fi
4720
4721if test -d casesensitivetestdir
4722then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4724$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004725 BUILDEXEEXT=.exe
4726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4728$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004729 BUILDEXEEXT=$EXEEXT
4730fi
4731rmdir CaseSensitiveTestDir
4732
4733case $MACHDEP in
4734bsdos*)
4735 case $CC in
4736 gcc) CC="$CC -D_HAVE_BSDI";;
4737 esac;;
4738esac
4739
4740case $ac_sys_system in
4741hp*|HP*)
4742 case $CC in
4743 cc|*/cc) CC="$CC -Ae";;
4744 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004745SunOS*)
4746 # Some functions have a prototype only with that define, e.g. confstr
4747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004748$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004749
4750 ;;
4751esac
4752
4753
4754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4756$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004757if test -z "$LIBRARY"
4758then
4759 LIBRARY='libpython$(VERSION).a'
4760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4762$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004763
4764# LDLIBRARY is the name of the library to link against (as opposed to the
4765# name of the library into which to insert object files). BLDLIBRARY is also
4766# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4767# is blank as the main program is not linked directly against LDLIBRARY.
4768# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4769# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4770# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4771# DLLLIBRARY is the shared (i.e., DLL) library.
4772#
4773# RUNSHARED is used to run shared python without installed libraries
4774#
4775# INSTSONAME is the name of the shared library that will be use to install
4776# on the system - some systems like version suffix, others don't
4777
4778
4779
4780
4781
4782
4783LDLIBRARY="$LIBRARY"
4784BLDLIBRARY='$(LDLIBRARY)'
4785INSTSONAME='$(LDLIBRARY)'
4786DLLLIBRARY=''
4787LDLIBRARYDIR=''
4788RUNSHARED=''
4789
4790# LINKCC is the command that links the python executable -- default is $(CC).
4791# If CXX is set, and if it is needed to link a main function that was
4792# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4793# python might then depend on the C++ runtime
4794# This is altered for AIX in order to build the export list before
4795# linking.
4796
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4798$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004799if test -z "$LINKCC"
4800then
4801 LINKCC='$(PURIFY) $(MAINCC)'
4802 case $ac_sys_system in
4803 AIX*)
4804 exp_extra="\"\""
4805 if test $ac_sys_release -ge 5 -o \
4806 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4807 exp_extra="."
4808 fi
4809 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004810 QNX*)
4811 # qcc must be used because the other compilers do not
4812 # support -N.
4813 LINKCC=qcc;;
4814 esac
4815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4817$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004818
4819# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4820# make sure we default having it set to "no": this is used by
4821# distutils.unixccompiler to know if it should add --enable-new-dtags
4822# to linker command lines, and failing to detect GNU ld simply results
4823# in the same bahaviour as before.
4824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4826$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004827ac_prog=ld
4828if test "$GCC" = yes; then
4829 ac_prog=`$CC -print-prog-name=ld`
4830fi
4831case `"$ac_prog" -V 2>&1 < /dev/null` in
4832 *GNU*)
4833 GNULD=yes;;
4834 *)
4835 GNULD=no;;
4836esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4838$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4841$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004842# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004843if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004844 enableval=$enable_shared;
4845fi
4846
4847
4848if test -z "$enable_shared"
4849then
4850 case $ac_sys_system in
4851 CYGWIN* | atheos*)
4852 enable_shared="yes";;
4853 *)
4854 enable_shared="no";;
4855 esac
4856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4858$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004859
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4861$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004862# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864 enableval=$enable_profiling; ac_save_cc="$CC"
4865 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004867 ac_enable_profiling="no"
4868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004870/* end confdefs.h. */
4871int main() { return 0; }
4872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004874 ac_enable_profiling="yes"
4875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004880fi
4881
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004882 CC="$ac_save_cc"
4883fi
4884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4886$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004887
4888case "$ac_enable_profiling" in
4889 "yes")
4890 BASECFLAGS="-pg $BASECFLAGS"
4891 LDFLAGS="-pg $LDFLAGS"
4892 ;;
4893esac
4894
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4896$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004897
4898# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4899# library that we build, but we do not want to link against it (we
4900# will find it with a -framework option). For this reason there is an
4901# extra variable BLDLIBRARY against which Python and the extension
4902# modules are linked, BLDLIBRARY. This is normally the same as
4903# LDLIBRARY, but empty for MacOSX framework builds.
4904if test "$enable_framework"
4905then
4906 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4907 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4908 BLDLIBRARY=''
4909else
4910 BLDLIBRARY='$(LDLIBRARY)'
4911fi
4912
4913# Other platforms follow
4914if test $enable_shared = "yes"; then
4915
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004916$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917
4918 case $ac_sys_system in
4919 BeOS*)
4920 LDLIBRARY='libpython$(VERSION).so'
4921 ;;
4922 CYGWIN*)
4923 LDLIBRARY='libpython$(VERSION).dll.a'
4924 DLLLIBRARY='libpython$(VERSION).dll'
4925 ;;
4926 SunOS*)
4927 LDLIBRARY='libpython$(VERSION).so'
4928 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4929 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4930 INSTSONAME="$LDLIBRARY".$SOVERSION
4931 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004932 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004933 LDLIBRARY='libpython$(VERSION).so'
4934 BLDLIBRARY='-L. -lpython$(VERSION)'
4935 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4936 case $ac_sys_system in
4937 FreeBSD*)
4938 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4939 ;;
4940 esac
4941 INSTSONAME="$LDLIBRARY".$SOVERSION
4942 ;;
4943 hp*|HP*)
4944 case `uname -m` in
4945 ia64)
4946 LDLIBRARY='libpython$(VERSION).so'
4947 ;;
4948 *)
4949 LDLIBRARY='libpython$(VERSION).sl'
4950 ;;
4951 esac
4952 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4953 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4954 ;;
4955 OSF*)
4956 LDLIBRARY='libpython$(VERSION).so'
4957 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4958 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4959 ;;
4960 atheos*)
4961 LDLIBRARY='libpython$(VERSION).so'
4962 BLDLIBRARY='-L. -lpython$(VERSION)'
4963 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4964 ;;
4965 Darwin*)
4966 LDLIBRARY='libpython$(VERSION).dylib'
4967 BLDLIBRARY='-L. -lpython$(VERSION)'
4968 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4969 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004970 AIX*)
4971 LDLIBRARY='libpython$(VERSION).so'
4972 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4973 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004974
4975 esac
4976else # shared is disabled
4977 case $ac_sys_system in
4978 CYGWIN*)
4979 BLDLIBRARY='$(LIBRARY)'
4980 LDLIBRARY='libpython$(VERSION).dll.a'
4981 ;;
4982 esac
4983fi
4984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4986$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004987
4988if test -n "$ac_tool_prefix"; then
4989 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4990set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4992$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004993if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004995else
4996 if test -n "$RANLIB"; then
4997 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4998else
4999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000for as_dir in $PATH
5001do
5002 IFS=$as_save_IFS
5003 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005004 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5006 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005008 break 2
5009 fi
5010done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005011 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005012IFS=$as_save_IFS
5013
5014fi
5015fi
5016RANLIB=$ac_cv_prog_RANLIB
5017if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5019$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005023fi
5024
5025
5026fi
5027if test -z "$ac_cv_prog_RANLIB"; then
5028 ac_ct_RANLIB=$RANLIB
5029 # Extract the first word of "ranlib", so it can be a program name with args.
5030set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005033if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005034 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035else
5036 if test -n "$ac_ct_RANLIB"; then
5037 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5038else
5039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5046 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005048 break 2
5049 fi
5050done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005051 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005052IFS=$as_save_IFS
5053
5054fi
5055fi
5056ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5057if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5059$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005063fi
5064
5065 if test "x$ac_ct_RANLIB" = x; then
5066 RANLIB=":"
5067 else
5068 case $cross_compiling:$ac_tool_warned in
5069yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005072ac_tool_warned=yes ;;
5073esac
5074 RANLIB=$ac_ct_RANLIB
5075 fi
5076else
5077 RANLIB="$ac_cv_prog_RANLIB"
5078fi
5079
5080
5081for ac_prog in ar aal
5082do
5083 # Extract the first word of "$ac_prog", so it can be a program name with args.
5084set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005087if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005088 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005089else
5090 if test -n "$AR"; then
5091 ac_cv_prog_AR="$AR" # Let the user override the test.
5092else
5093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094for as_dir in $PATH
5095do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005098 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005099 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5100 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005102 break 2
5103 fi
5104done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005105 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005106IFS=$as_save_IFS
5107
5108fi
5109fi
5110AR=$ac_cv_prog_AR
5111if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5113$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005117fi
5118
5119
5120 test -n "$AR" && break
5121done
5122test -n "$AR" || AR="ar"
5123
5124
5125# tweak ARFLAGS only if the user didn't set it on the command line
5126
5127if test -z "$ARFLAGS"
5128then
5129 ARFLAGS="rc"
5130fi
5131
5132
5133# Extract the first word of "svnversion", so it can be a program name with args.
5134set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5136$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005137if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005138 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005139else
5140 if test -n "$SVNVERSION"; then
5141 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5142else
5143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5144for as_dir in $PATH
5145do
5146 IFS=$as_save_IFS
5147 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005148 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5150 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005152 break 2
5153 fi
5154done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005155 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005156IFS=$as_save_IFS
5157
5158 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5159fi
5160fi
5161SVNVERSION=$ac_cv_prog_SVNVERSION
5162if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5164$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5167$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005168fi
5169
5170
5171if test $SVNVERSION = found
5172then
5173 SVNVERSION="svnversion \$(srcdir)"
5174else
5175 SVNVERSION="echo Unversioned directory"
5176fi
5177
Georg Brandl3a5508e2011-03-06 10:42:21 +01005178
5179
5180
5181# Extract the first word of "hg", so it can be a program name with args.
5182set dummy hg; ac_word=$2
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005185if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005186 $as_echo_n "(cached) " >&6
5187else
5188 if test -n "$HAS_HG"; then
5189 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5190else
5191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194 IFS=$as_save_IFS
5195 test -z "$as_dir" && as_dir=.
5196 for ac_exec_ext in '' $ac_executable_extensions; do
5197 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5198 ac_cv_prog_HAS_HG="found"
5199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200 break 2
5201 fi
5202done
5203 done
5204IFS=$as_save_IFS
5205
5206 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5207fi
5208fi
5209HAS_HG=$ac_cv_prog_HAS_HG
5210if test -n "$HAS_HG"; then
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5212$as_echo "$HAS_HG" >&6; }
5213else
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215$as_echo "no" >&6; }
5216fi
5217
5218
5219if test $HAS_HG = found
5220then
5221 HGVERSION="hg id -i \$(srcdir)"
5222 HGTAG="hg id -t \$(srcdir)"
5223 HGBRANCH="hg id -b \$(srcdir)"
5224else
5225 HGVERSION=""
5226 HGTAG=""
5227 HGBRANCH=""
5228fi
5229
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005230case $MACHDEP in
5231bsdos*|hp*|HP*)
5232 # install -d does not work on BSDI or HP-UX
5233 if test -z "$INSTALL"
5234 then
5235 INSTALL="${srcdir}/install-sh -c"
5236 fi
5237esac
5238ac_aux_dir=
5239for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005240 if test -f "$ac_dir/install-sh"; then
5241 ac_aux_dir=$ac_dir
5242 ac_install_sh="$ac_aux_dir/install-sh -c"
5243 break
5244 elif test -f "$ac_dir/install.sh"; then
5245 ac_aux_dir=$ac_dir
5246 ac_install_sh="$ac_aux_dir/install.sh -c"
5247 break
5248 elif test -f "$ac_dir/shtool"; then
5249 ac_aux_dir=$ac_dir
5250 ac_install_sh="$ac_aux_dir/shtool install -c"
5251 break
5252 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005253done
5254if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005255 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256fi
5257
5258# These three variables are undocumented and unsupported,
5259# and are intended to be withdrawn in a future Autoconf release.
5260# They can cause serious problems if a builder's source tree is in a directory
5261# whose full name contains unusual characters.
5262ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5263ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5264ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5265
5266
5267# Find a good install program. We prefer a C program (faster),
5268# so one script is as good as another. But avoid the broken or
5269# incompatible versions:
5270# SysV /etc/install, /usr/sbin/install
5271# SunOS /usr/etc/install
5272# IRIX /sbin/install
5273# AIX /bin/install
5274# AmigaOS /C/install, which installs bootblocks on floppy discs
5275# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5276# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5277# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5278# OS/2's system install, which has a completely different semantic
5279# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005280# Reject install programs that cannot install multiple files.
5281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5282$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005284if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005285 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005286else
5287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in $PATH
5289do
5290 IFS=$as_save_IFS
5291 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005292 # Account for people who put trailing slashes in PATH elements.
5293case $as_dir/ in #((
5294 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005296 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297 /usr/ucb/* ) ;;
5298 *)
5299 # OSF1 and SCO ODT 3.0 have their own names for install.
5300 # Don't use installbsd from OSF since it installs stuff as root
5301 # by default.
5302 for ac_prog in ginstall scoinst install; do
5303 for ac_exec_ext in '' $ac_executable_extensions; do
5304 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5305 if test $ac_prog = install &&
5306 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5307 # AIX install. It has an incompatible calling convention.
5308 :
5309 elif test $ac_prog = install &&
5310 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5311 # program-specific install script used by HP pwplus--don't use.
5312 :
5313 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005314 rm -rf conftest.one conftest.two conftest.dir
5315 echo one > conftest.one
5316 echo two > conftest.two
5317 mkdir conftest.dir
5318 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5319 test -s conftest.one && test -s conftest.two &&
5320 test -s conftest.dir/conftest.one &&
5321 test -s conftest.dir/conftest.two
5322 then
5323 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5324 break 3
5325 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326 fi
5327 fi
5328 done
5329 done
5330 ;;
5331esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005332
5333 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005334IFS=$as_save_IFS
5335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005336rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005337
5338fi
5339 if test "${ac_cv_path_install+set}" = set; then
5340 INSTALL=$ac_cv_path_install
5341 else
5342 # As a last resort, use the slow shell script. Don't cache a
5343 # value for INSTALL within a source directory, because that will
5344 # break other packages using the cache if that directory is
5345 # removed, or if the value is a relative name.
5346 INSTALL=$ac_install_sh
5347 fi
5348fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5350$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351
5352# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5353# It thinks the first close brace ends the variable substitution.
5354test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5355
5356test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5357
5358test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5359
Trent Nelsonf6407a12012-08-30 14:56:13 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5361$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5362if test -z "$MKDIR_P"; then
5363 if ${ac_cv_path_mkdir+:} false; then :
5364 $as_echo_n "(cached) " >&6
5365else
5366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5368do
5369 IFS=$as_save_IFS
5370 test -z "$as_dir" && as_dir=.
5371 for ac_prog in mkdir gmkdir; do
5372 for ac_exec_ext in '' $ac_executable_extensions; do
5373 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5374 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5375 'mkdir (GNU coreutils) '* | \
5376 'mkdir (coreutils) '* | \
5377 'mkdir (fileutils) '4.1*)
5378 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5379 break 3;;
5380 esac
5381 done
5382 done
5383 done
5384IFS=$as_save_IFS
5385
5386fi
5387
5388 test -d ./--version && rmdir ./--version
5389 if test "${ac_cv_path_mkdir+set}" = set; then
5390 MKDIR_P="$ac_cv_path_mkdir -p"
5391 else
5392 # As a last resort, use the slow shell script. Don't cache a
5393 # value for MKDIR_P within a source directory, because that will
5394 # break other packages using the cache if that directory is
5395 # removed, or if the value is a relative name.
5396 MKDIR_P="$ac_install_sh -d"
5397 fi
5398fi
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5400$as_echo "$MKDIR_P" >&6; }
5401
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005402
5403# Not every filesystem supports hard links
5404
5405if test -z "$LN" ; then
5406 case $ac_sys_system in
5407 BeOS*) LN="ln -s";;
5408 CYGWIN*) LN="ln -s";;
5409 atheos*) LN="ln -s";;
5410 *) LN=ln;;
5411 esac
5412fi
5413
5414# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5416$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417
5418# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005419if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420 withval=$with_pydebug;
5421if test "$withval" != no
5422then
5423
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005424$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5427$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005429else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431fi
5432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435fi
5436
5437
5438# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5439# merged with this chunk of code?
5440
5441# Optimizer/debugger flags
5442# ------------------------
5443# (The following bit of code is complicated enough - please keep things
5444# indented properly. Just pretend you're editing Python code. ;-)
5445
5446# There are two parallel sets of case statements below, one that checks to
5447# see if OPT was set and one that does BASECFLAGS setting based upon
5448# compiler and platform. BASECFLAGS tweaks need to be made even if the
5449# user set OPT.
5450
5451# tweak OPT based on compiler and platform, only if the user didn't set
5452# it on the command line
5453
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005454if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005455then
5456 case $GCC in
5457 yes)
5458 if test "$CC" != 'g++' ; then
5459 STRICT_PROTO="-Wstrict-prototypes"
5460 fi
5461 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5462 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5463 WRAP="-fwrapv"
5464 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005465
5466 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005467 case $CC in
5468 *clang*) WRAP="-fwrapv"
5469 ;;
5470 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005471
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472 case $ac_cv_prog_cc_g in
5473 yes)
5474 if test "$Py_DEBUG" = 'true' ; then
5475 # Optimization messes up debuggers, so turn it off for
5476 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005477 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005478 else
5479 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5480 fi
5481 ;;
5482 *)
5483 OPT="-O3 -Wall $STRICT_PROTO"
5484 ;;
5485 esac
5486 case $ac_sys_system in
5487 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5488 ;;
5489 esac
5490 ;;
5491
5492 *)
5493 OPT="-O"
5494 ;;
5495 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496fi
5497
5498
5499
5500# The -arch flags for universal builds on OSX
5501UNIVERSAL_ARCH_FLAGS=
5502
5503
5504# tweak BASECFLAGS based on compiler and platform
5505case $GCC in
5506yes)
5507 # Python violates C99 rules, by casting between incompatible
5508 # pointer types. GCC may generate bad code as a result of that,
5509 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5511$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005512 ac_save_cc="$CC"
5513 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005514 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005518/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005519
5520int
5521main ()
5522{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005523
Gregory P. Smith373469a2009-11-01 21:03:38 +00005524 ;
5525 return 0;
5526}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529 ac_cv_no_strict_aliasing_ok=yes
5530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005531 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005532fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005534fi
5535
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5538$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005539 if test $ac_cv_no_strict_aliasing_ok = yes
5540 then
5541 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5542 fi
5543
5544 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5545 # support. Without this, treatment of subnormals doesn't follow
5546 # the standard.
5547 case $ac_sys_machine in
5548 alpha*)
5549 BASECFLAGS="$BASECFLAGS -mieee"
5550 ;;
5551 esac
5552
5553 case $ac_sys_system in
5554 SCO_SV*)
5555 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5556 ;;
5557 # is there any other compiler on Darwin besides gcc?
5558 Darwin*)
5559 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5560 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005561 if test "${CC}" = gcc
5562 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5564$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005565 case "${UNIVERSALSDK}" in
5566 */MacOSX10.4u.sdk)
5567 # Build using 10.4 SDK, force usage of gcc when the
5568 # compiler is gcc, otherwise the user will get very
5569 # confusing error messages when building on OSX 10.6
5570 CC=gcc-4.0
5571 CPP=cpp-4.0
5572 ;;
5573 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5575$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576 fi
5577
5578 # Calculate the right deployment target for this build.
5579 #
5580 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5581 if test ${cur_target} '>' 10.2; then
5582 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005583 if test ${enable_universalsdk}; then
5584 if test "${UNIVERSAL_ARCHS}" = "all"; then
5585 # Ensure that the default platform for a
5586 # 4-way universal build is OSX 10.5,
5587 # that's the first OS release where
5588 # 4-way builds make sense.
5589 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005590
5591 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5592 cur_target='10.5'
5593
5594 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5595 cur_target='10.5'
5596
5597 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5598 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005599 fi
5600 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005601 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005602 # On Intel macs default to a deployment
5603 # target of 10.4, that's the first OSX
5604 # release with Intel support.
5605 cur_target="10.4"
5606 fi
5607 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005608 fi
5609 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5610
5611 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5612 # environment with a value that is the same as what we'll use
5613 # in the Makefile to ensure that we'll get the same compiler
5614 # environment during configure and build time.
5615 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5616 export MACOSX_DEPLOYMENT_TARGET
5617 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5618
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005619 if test "${enable_universalsdk}"; then
5620 UNIVERSAL_ARCH_FLAGS=""
5621 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5622 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5623 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005624 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005625
5626 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5627 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5628 LIPO_32BIT_FLAGS=""
5629 ARCH_RUN_32BIT="true"
5630
5631 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5632 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5633 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005634 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005635
5636 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5637 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5638 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005639 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005640
5641 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5642 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5643 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005644 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005645
5646 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005647 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005648
5649 fi
5650
5651
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005652 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5653 if test "${UNIVERSALSDK}" != "/"
5654 then
5655 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5656 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5657 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005658 fi
5659
5660 fi
5661
5662
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663 ;;
5664 OSF*)
5665 BASECFLAGS="$BASECFLAGS -mieee"
5666 ;;
5667 esac
5668 ;;
5669
5670*)
5671 case $ac_sys_system in
5672 OpenUNIX*|UnixWare*)
5673 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5674 ;;
5675 OSF*)
5676 BASECFLAGS="$BASECFLAGS -ieee -std"
5677 ;;
5678 SCO_SV*)
5679 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5680 ;;
5681 esac
5682 ;;
5683esac
5684
5685if test "$Py_DEBUG" = 'true'; then
5686 :
5687else
5688 OPT="-DNDEBUG $OPT"
5689fi
5690
5691if test "$ac_arch_flags"
5692then
5693 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5694fi
5695
5696# disable check for icc since it seems to pass, but generates a warning
5697if test "$CC" = icc
5698then
5699 ac_cv_opt_olimit_ok=no
5700fi
5701
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5703$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005704if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005705 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005706else
5707 ac_save_cc="$CC"
5708CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005711
5712int
5713main ()
5714{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005715
Gregory P. Smith373469a2009-11-01 21:03:38 +00005716 ;
5717 return 0;
5718}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005719_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721 ac_cv_opt_olimit_ok=yes
5722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005724
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005725fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727CC="$ac_save_cc"
5728fi
5729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5731$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005732if test $ac_cv_opt_olimit_ok = yes; then
5733 case $ac_sys_system in
5734 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5735 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5736 # environment?
5737 Darwin*)
5738 ;;
5739 *)
5740 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5741 ;;
5742 esac
5743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5745$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005746 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005747 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005748else
5749 ac_save_cc="$CC"
5750 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005752/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005753
5754int
5755main ()
5756{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005757
Gregory P. Smith373469a2009-11-01 21:03:38 +00005758 ;
5759 return 0;
5760}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005761_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005762if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005763 ac_cv_olimit_ok=yes
5764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005765 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005766
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005767fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769 CC="$ac_save_cc"
5770fi
5771
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5773$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005774 if test $ac_cv_olimit_ok = yes; then
5775 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5776 fi
5777fi
5778
5779# Check whether GCC supports PyArg_ParseTuple format
5780if test "$GCC" = "yes"
5781then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5783$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005784 save_CFLAGS=$CFLAGS
5785 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005787/* end confdefs.h. */
5788
5789 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005790int
5791main ()
5792{
5793
5794 ;
5795 return 0;
5796}
Matthias Klosec511b472010-05-08 11:01:39 +00005797
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005799if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005800
Matthias Klosec511b472010-05-08 11:01:39 +00005801
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005802$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803
Matthias Klosec511b472010-05-08 11:01:39 +00005804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005805$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005806
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005807else
Matthias Klosec511b472010-05-08 11:01:39 +00005808
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811
5812fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5814 CFLAGS=$save_CFLAGS
5815fi
5816
5817# On some compilers, pthreads are available without further options
5818# (e.g. MacOS X). On some of these systems, the compiler will not
5819# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5820# So we have to see first whether pthreads are available without
5821# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5823$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005824if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005825 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828 ac_cv_pthread_is_default=no
5829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005831/* end confdefs.h. */
5832
5833#include <pthread.h>
5834
5835void* routine(void* p){return NULL;}
5836
5837int main(){
5838 pthread_t p;
5839 if(pthread_create(&p,NULL,routine,NULL)!=0)
5840 return 1;
5841 (void)pthread_detach(p);
5842 return 0;
5843}
5844
5845_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005846if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847
5848 ac_cv_pthread_is_default=yes
5849 ac_cv_kthread=no
5850 ac_cv_pthread=no
5851
5852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005853 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005857fi
5858
5859
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005860fi
5861
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5863$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005864
5865
5866if test $ac_cv_pthread_is_default = yes
5867then
5868 ac_cv_kpthread=no
5869else
5870# -Kpthread, if available, provides the right #defines
5871# and linker options to make pthread_create available
5872# Some compilers won't report that they do not support -Kpthread,
5873# so we need to run a program to see whether it really made the
5874# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5876$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005877if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005878 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005879else
5880 ac_save_cc="$CC"
5881CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005882if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883 ac_cv_kpthread=no
5884else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005886/* end confdefs.h. */
5887
5888#include <pthread.h>
5889
5890void* routine(void* p){return NULL;}
5891
5892int main(){
5893 pthread_t p;
5894 if(pthread_create(&p,NULL,routine,NULL)!=0)
5895 return 1;
5896 (void)pthread_detach(p);
5897 return 0;
5898}
5899
5900_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005901if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902 ac_cv_kpthread=yes
5903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005904 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005908fi
5909
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005910CC="$ac_save_cc"
5911fi
5912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5914$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005915fi
5916
5917if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5918then
5919# -Kthread, if available, provides the right #defines
5920# and linker options to make pthread_create available
5921# Some compilers won't report that they do not support -Kthread,
5922# so we need to run a program to see whether it really made the
5923# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5925$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005926if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005927 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005928else
5929 ac_save_cc="$CC"
5930CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005931if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932 ac_cv_kthread=no
5933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005935/* end confdefs.h. */
5936
5937#include <pthread.h>
5938
5939void* routine(void* p){return NULL;}
5940
5941int main(){
5942 pthread_t p;
5943 if(pthread_create(&p,NULL,routine,NULL)!=0)
5944 return 1;
5945 (void)pthread_detach(p);
5946 return 0;
5947}
5948
5949_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005950if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005951 ac_cv_kthread=yes
5952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005953 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5956 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957fi
5958
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005959CC="$ac_save_cc"
5960fi
5961
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5963$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964fi
5965
5966if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5967then
5968# -pthread, if available, provides the right #defines
5969# and linker options to make pthread_create available
5970# Some compilers won't report that they do not support -pthread,
5971# so we need to run a program to see whether it really made the
5972# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5974$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005975if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005976 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977else
5978 ac_save_cc="$CC"
5979CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981 ac_cv_pthread=no
5982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005984/* end confdefs.h. */
5985
5986#include <pthread.h>
5987
5988void* routine(void* p){return NULL;}
5989
5990int main(){
5991 pthread_t p;
5992 if(pthread_create(&p,NULL,routine,NULL)!=0)
5993 return 1;
5994 (void)pthread_detach(p);
5995 return 0;
5996}
5997
5998_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005999if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006000 ac_cv_pthread=yes
6001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006002 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006004rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6005 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006006fi
6007
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008CC="$ac_save_cc"
6009fi
6010
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6012$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006013fi
6014
6015# If we have set a CC compiler flag for thread support then
6016# check if it works for CXX, too.
6017ac_cv_cxx_thread=no
6018if test ! -z "$CXX"
6019then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6021$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022ac_save_cxx="$CXX"
6023
6024if test "$ac_cv_kpthread" = "yes"
6025then
6026 CXX="$CXX -Kpthread"
6027 ac_cv_cxx_thread=yes
6028elif test "$ac_cv_kthread" = "yes"
6029then
6030 CXX="$CXX -Kthread"
6031 ac_cv_cxx_thread=yes
6032elif test "$ac_cv_pthread" = "yes"
6033then
6034 CXX="$CXX -pthread"
6035 ac_cv_cxx_thread=yes
6036fi
6037
6038if test $ac_cv_cxx_thread = yes
6039then
6040 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6041 $CXX -c conftest.$ac_ext 2>&5
6042 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6043 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6044 then
6045 ac_cv_cxx_thread=yes
6046 else
6047 ac_cv_cxx_thread=no
6048 fi
6049 rm -fr conftest*
6050fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6052$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053fi
6054CXX="$ac_save_cxx"
6055
6056
6057# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6059$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006060if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064/* end confdefs.h. */
6065#include <stdlib.h>
6066#include <stdarg.h>
6067#include <string.h>
6068#include <float.h>
6069
6070int
6071main ()
6072{
6073
6074 ;
6075 return 0;
6076}
6077_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006078if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006079 ac_cv_header_stdc=yes
6080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006081 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6084
6085if test $ac_cv_header_stdc = yes; then
6086 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006088/* end confdefs.h. */
6089#include <string.h>
6090
6091_ACEOF
6092if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 $EGREP "memchr" >/dev/null 2>&1; then :
6094
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006095else
6096 ac_cv_header_stdc=no
6097fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006098rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006099
6100fi
6101
6102if test $ac_cv_header_stdc = yes; then
6103 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006105/* end confdefs.h. */
6106#include <stdlib.h>
6107
6108_ACEOF
6109if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006110 $EGREP "free" >/dev/null 2>&1; then :
6111
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006112else
6113 ac_cv_header_stdc=no
6114fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006115rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006116
6117fi
6118
6119if test $ac_cv_header_stdc = yes; then
6120 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006121 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006122 :
6123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006125/* end confdefs.h. */
6126#include <ctype.h>
6127#include <stdlib.h>
6128#if ((' ' & 0x0FF) == 0x020)
6129# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6130# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6131#else
6132# define ISLOWER(c) \
6133 (('a' <= (c) && (c) <= 'i') \
6134 || ('j' <= (c) && (c) <= 'r') \
6135 || ('s' <= (c) && (c) <= 'z'))
6136# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6137#endif
6138
6139#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6140int
6141main ()
6142{
6143 int i;
6144 for (i = 0; i < 256; i++)
6145 if (XOR (islower (i), ISLOWER (i))
6146 || toupper (i) != TOUPPER (i))
6147 return 2;
6148 return 0;
6149}
6150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006151if ac_fn_c_try_run "$LINENO"; then :
6152
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006154 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006158fi
6159
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006160fi
6161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6163$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006164if test $ac_cv_header_stdc = yes; then
6165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006166$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006167
6168fi
6169
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006170for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6171fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006172ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006173shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006174unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006175sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6176sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006177sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006178sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006179sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006180sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006181bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006182do :
6183 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6184ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006185if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006186 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006187#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006188_ACEOF
6189
6190fi
6191
Guido van Rossum627b2d71993-12-24 10:39:16 +00006192done
6193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006195for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006196 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6198$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006199if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006200 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006203/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006204#include <sys/types.h>
6205#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006206
Martin v. Löwis11437992002-04-12 09:54:03 +00006207int
6208main ()
6209{
6210if ((DIR *) 0)
6211return 0;
6212 ;
6213 return 0;
6214}
6215_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006217 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006218else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006219 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006223eval ac_res=\$$as_ac_Header
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6225$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006226if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006227 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006228#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006229_ACEOF
6230
6231ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006232fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234done
6235# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6236if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6238$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006239if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006240 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241else
Martin v. Löwis11437992002-04-12 09:54:03 +00006242 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006245
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246/* Override any GCC internal prototype to avoid an error.
6247 Use char because int might match the return type of a GCC
6248 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006249#ifdef __cplusplus
6250extern "C"
6251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006252char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006253int
6254main ()
6255{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006257 ;
6258 return 0;
6259}
6260_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006261for ac_lib in '' dir; do
6262 if test -z "$ac_lib"; then
6263 ac_res="none required"
6264 else
6265 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006266 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006268 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006269 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006271rm -f core conftest.err conftest.$ac_objext \
6272 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006273 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006277if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006278
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279else
6280 ac_cv_search_opendir=no
6281fi
6282rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006283LIBS=$ac_func_search_save_LIBS
6284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6286$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006288if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006290
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006292
Michael W. Hudson54241132001-12-07 15:38:26 +00006293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6295$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006296if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006297 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006298else
6299 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006301/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006302
Martin v. Löwiseba40652007-08-30 20:10:57 +00006303/* Override any GCC internal prototype to avoid an error.
6304 Use char because int might match the return type of a GCC
6305 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006306#ifdef __cplusplus
6307extern "C"
6308#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006309char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006310int
6311main ()
6312{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006314 ;
6315 return 0;
6316}
6317_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318for ac_lib in '' x; do
6319 if test -z "$ac_lib"; then
6320 ac_res="none required"
6321 else
6322 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006323 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006324 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006326 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328rm -f core conftest.err conftest.$ac_objext \
6329 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006330 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006331 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006333done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006334if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006335
Martin v. Löwiseba40652007-08-30 20:10:57 +00006336else
6337 ac_cv_search_opendir=no
6338fi
6339rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006340LIBS=$ac_func_search_save_LIBS
6341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6343$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006344ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006345if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006346 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006347
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006348fi
6349
6350fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6353$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006354if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006355 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006358/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006359#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006360int
6361main ()
6362{
6363return makedev(0, 0);
6364 ;
6365 return 0;
6366}
6367_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369 ac_cv_header_sys_types_h_makedev=yes
6370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006371 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373rm -f core conftest.err conftest.$ac_objext \
6374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006375
6376fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6378$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006379
6380if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006382if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006385
6386fi
6387
6388
6389
6390 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006391 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006392if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006394$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006395
6396fi
6397
6398
6399 fi
6400fi
6401
Michael W. Hudson54241132001-12-07 15:38:26 +00006402
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006403# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006404for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006405do :
6406 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006407#ifdef HAVE_CURSES_H
6408#include <curses.h>
6409#endif
6410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006411"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006412if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006413 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006414#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006415_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006416
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006417fi
6418
6419done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006420
6421
Martin v. Löwis11017b12006-01-14 18:12:57 +00006422# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006423for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006424do :
6425 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 +00006426#ifdef HAVE_ASM_TYPES_H
6427#include <asm/types.h>
6428#endif
6429#ifdef HAVE_SYS_SOCKET_H
6430#include <sys/socket.h>
6431#endif
6432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006433"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006434if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006435 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006436#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006437_ACEOF
6438
6439fi
6440
6441done
6442
6443
Guido van Rossum627b2d71993-12-24 10:39:16 +00006444# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006445was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6447$as_echo_n "checking for clock_t in time.h... " >&6; }
6448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006449/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006451
6452_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006455 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456else
Martin v. Löwis11437992002-04-12 09:54:03 +00006457
6458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006459$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006461
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006463rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006464
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6466$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006467
Neal Norwitz11690112002-07-30 01:08:28 +00006468# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6470$as_echo_n "checking for makedev... " >&6; }
6471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006472/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006473
6474#if defined(MAJOR_IN_MKDEV)
6475#include <sys/mkdev.h>
6476#elif defined(MAJOR_IN_SYSMACROS)
6477#include <sys/sysmacros.h>
6478#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006479#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006480#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006481int
6482main ()
6483{
6484 makedev(0, 0)
6485 ;
6486 return 0;
6487}
6488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006489if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006490 ac_cv_has_makedev=yes
6491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006492 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006493fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006494rm -f core conftest.err conftest.$ac_objext \
6495 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006496if test "$ac_cv_has_makedev" = "no"; then
6497 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006499/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006500
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006501#define _OSF_SOURCE 1
6502#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006503
Neal Norwitz11690112002-07-30 01:08:28 +00006504int
6505main ()
6506{
6507 makedev(0, 0)
6508 ;
6509 return 0;
6510}
6511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006512if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006513 ac_cv_has_makedev=yes
6514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006515 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006517rm -f core conftest.err conftest.$ac_objext \
6518 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006519 if test "$ac_cv_has_makedev" = "yes"; then
6520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006521$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006522
6523 fi
6524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6526$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006527if test "$ac_cv_has_makedev" = "yes"; then
6528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006530
6531fi
6532
Martin v. Löwis399a6892002-10-04 10:22:02 +00006533# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6534# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6535# defined, but the compiler does not support pragma redefine_extname,
6536# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6537# structures (such as rlimit64) without declaring them. As a
6538# work-around, disable LFS on such configurations
6539
6540use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6542$as_echo_n "checking Solaris LFS bug... " >&6; }
6543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006544/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006545
6546#define _LARGEFILE_SOURCE 1
6547#define _FILE_OFFSET_BITS 64
6548#include <sys/resource.h>
6549
Martin v. Löwis399a6892002-10-04 10:22:02 +00006550int
6551main ()
6552{
6553struct rlimit foo;
6554 ;
6555 return 0;
6556}
6557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006559 sol_lfs_bug=no
6560else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006561 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6565$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006566if test "$sol_lfs_bug" = "yes"; then
6567 use_lfs=no
6568fi
6569
6570if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006571# Two defines needed to enable largefile support on various platforms
6572# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006573case $ac_sys_system/$ac_sys_release in
6574AIX*)
6575
6576$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6577
6578 ;;
6579esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006580
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006581$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006582
6583
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006584$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006585
Martin v. Löwis399a6892002-10-04 10:22:02 +00006586fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006587
Guido van Rossum84e7b241996-08-19 21:59:00 +00006588# Add some code to confdefs.h so that the test for off_t works on SCO
6589cat >> confdefs.h <<\EOF
6590#if defined(SCO_DS)
6591#undef _OFF_T
6592#endif
6593EOF
6594
Guido van Rossumef2255b2000-03-10 22:30:29 +00006595# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006596ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006597if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006598
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006599else
Martin v. Löwis11437992002-04-12 09:54:03 +00006600
6601cat >>confdefs.h <<_ACEOF
6602#define mode_t int
6603_ACEOF
6604
6605fi
6606
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006607ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006608if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006609
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006610else
Martin v. Löwis11437992002-04-12 09:54:03 +00006611
6612cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006613#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006614_ACEOF
6615
6616fi
6617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006619if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006620
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621else
Martin v. Löwis11437992002-04-12 09:54:03 +00006622
6623cat >>confdefs.h <<_ACEOF
6624#define pid_t int
6625_ACEOF
6626
6627fi
6628
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006631#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006632_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006634ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006635if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006636
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006637else
Martin v. Löwis11437992002-04-12 09:54:03 +00006638
6639cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006640#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006641_ACEOF
6642
6643fi
6644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6646$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006647if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006651/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006653
6654_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006655if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006656 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006657 ac_cv_type_uid_t=yes
6658else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006659 ac_cv_type_uid_t=no
6660fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006661rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006662
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6665$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006666if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006668$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006669
6670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006671$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006672
6673fi
6674
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006675ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6676case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006677 no|yes) ;; #(
6678 *)
6679
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006680$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006681
6682
6683cat >>confdefs.h <<_ACEOF
6684#define uint32_t $ac_cv_c_uint32_t
6685_ACEOF
6686;;
6687 esac
6688
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6690case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006691 no|yes) ;; #(
6692 *)
6693
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006695
6696
6697cat >>confdefs.h <<_ACEOF
6698#define uint64_t $ac_cv_c_uint64_t
6699_ACEOF
6700;;
6701 esac
6702
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006703ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6704case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006705 no|yes) ;; #(
6706 *)
6707
6708cat >>confdefs.h <<_ACEOF
6709#define int32_t $ac_cv_c_int32_t
6710_ACEOF
6711;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006712esac
6713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006714ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6715case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006716 no|yes) ;; #(
6717 *)
6718
6719cat >>confdefs.h <<_ACEOF
6720#define int64_t $ac_cv_c_int64_t
6721_ACEOF
6722;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006723esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006724
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006725ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006726if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006728$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006729
6730fi
6731
Jack Jansendd19cf82001-12-06 22:36:17 +00006732
Michael W. Hudson54241132001-12-07 15:38:26 +00006733# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006734# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735# The cast to long int works around a bug in the HP C Compiler
6736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6738# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6740$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006741if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006742 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006744 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 +00006745
Martin v. Löwis11437992002-04-12 09:54:03 +00006746else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747 if test "$ac_cv_type_int" = yes; then
6748 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006750as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006751See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006752 else
6753 ac_cv_sizeof_int=0
6754 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006755fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756
Martin v. Löwis11437992002-04-12 09:54:03 +00006757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6759$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006760
6761
6762
Martin v. Löwis11437992002-04-12 09:54:03 +00006763cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006764#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006765_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006766
6767
Martin v. Löwiseba40652007-08-30 20:10:57 +00006768# The cast to long int works around a bug in the HP C Compiler
6769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6771# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6773$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006774if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006777 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 +00006778
Martin v. Löwis11437992002-04-12 09:54:03 +00006779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780 if test "$ac_cv_type_long" = yes; then
6781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006783as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006784See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006785 else
6786 ac_cv_sizeof_long=0
6787 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006789
Martin v. Löwis11437992002-04-12 09:54:03 +00006790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6792$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793
6794
6795
Martin v. Löwis11437992002-04-12 09:54:03 +00006796cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006797#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006798_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006799
6800
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801# The cast to long int works around a bug in the HP C Compiler
6802# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6803# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6804# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6806$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006807if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006809else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810 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 +00006811
Martin v. Löwis11437992002-04-12 09:54:03 +00006812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813 if test "$ac_cv_type_void_p" = yes; then
6814 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006816as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006817See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818 else
6819 ac_cv_sizeof_void_p=0
6820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822
Martin v. Löwis11437992002-04-12 09:54:03 +00006823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6825$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826
6827
6828
Martin v. Löwis11437992002-04-12 09:54:03 +00006829cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006830#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006831_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006832
6833
Martin v. Löwiseba40652007-08-30 20:10:57 +00006834# The cast to long int works around a bug in the HP C Compiler
6835# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6836# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6837# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6839$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006840if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006841 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843 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 +00006844
Martin v. Löwis11437992002-04-12 09:54:03 +00006845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846 if test "$ac_cv_type_short" = yes; then
6847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006849as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006850See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006851 else
6852 ac_cv_sizeof_short=0
6853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006855
Martin v. Löwis11437992002-04-12 09:54:03 +00006856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6858$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859
6860
6861
Martin v. Löwis11437992002-04-12 09:54:03 +00006862cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006863#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006864_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006865
6866
Martin v. Löwiseba40652007-08-30 20:10:57 +00006867# The cast to long int works around a bug in the HP C Compiler
6868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6870# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6872$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006873if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006874 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876 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 +00006877
Martin v. Löwis11437992002-04-12 09:54:03 +00006878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879 if test "$ac_cv_type_float" = yes; then
6880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006882as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006883See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006884 else
6885 ac_cv_sizeof_float=0
6886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888
Martin v. Löwis11437992002-04-12 09:54:03 +00006889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6891$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006892
6893
6894
Martin v. Löwis11437992002-04-12 09:54:03 +00006895cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006896#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006897_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006898
6899
Martin v. Löwiseba40652007-08-30 20:10:57 +00006900# The cast to long int works around a bug in the HP C Compiler
6901# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6902# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6903# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6905$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006906if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006907 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909 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 +00006910
Martin v. Löwis11437992002-04-12 09:54:03 +00006911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006912 if test "$ac_cv_type_double" = yes; then
6913 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6914$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006915as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006916See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006917 else
6918 ac_cv_sizeof_double=0
6919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006921
Martin v. Löwis11437992002-04-12 09:54:03 +00006922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6924$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006925
6926
6927
Martin v. Löwis11437992002-04-12 09:54:03 +00006928cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006929#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006930_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006931
6932
Martin v. Löwiseba40652007-08-30 20:10:57 +00006933# The cast to long int works around a bug in the HP C Compiler
6934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6936# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6938$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006939if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942 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 +00006943
Martin v. Löwis11437992002-04-12 09:54:03 +00006944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006945 if test "$ac_cv_type_fpos_t" = yes; then
6946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006948as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006949See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006950 else
6951 ac_cv_sizeof_fpos_t=0
6952 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006953fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954
Martin v. Löwis11437992002-04-12 09:54:03 +00006955fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6957$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006958
6959
6960
Martin v. Löwis11437992002-04-12 09:54:03 +00006961cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006962#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006963_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006964
Michael W. Hudson54241132001-12-07 15:38:26 +00006965
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966# The cast to long int works around a bug in the HP C Compiler
6967# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6968# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6969# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6971$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006972if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006973 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975 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 +00006976
Martin v. Löwis18e16552006-02-15 17:27:45 +00006977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978 if test "$ac_cv_type_size_t" = yes; then
6979 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006981as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006982See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006983 else
6984 ac_cv_sizeof_size_t=0
6985 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00006986fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006987
Martin v. Löwis18e16552006-02-15 17:27:45 +00006988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
6990$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006991
6992
6993
Martin v. Löwis18e16552006-02-15 17:27:45 +00006994cat >>confdefs.h <<_ACEOF
6995#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
6996_ACEOF
6997
6998
Christian Heimes951cc0f2008-01-31 23:08:23 +00006999# The cast to long int works around a bug in the HP C Compiler
7000# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7001# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7002# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7004$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007005if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007006 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00007009
Christian Heimes951cc0f2008-01-31 23:08:23 +00007010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007011 if test "$ac_cv_type_pid_t" = yes; then
7012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007014as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007015See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007016 else
7017 ac_cv_sizeof_pid_t=0
7018 fi
7019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020
Christian Heimes951cc0f2008-01-31 23:08:23 +00007021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7023$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007024
7025
7026
7027cat >>confdefs.h <<_ACEOF
7028#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7029_ACEOF
7030
7031
Michael W. Hudson54241132001-12-07 15:38:26 +00007032
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7034$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007035have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007037/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007038
Martin v. Löwis11437992002-04-12 09:54:03 +00007039int
7040main ()
7041{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007042long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007043 ;
7044 return 0;
7045}
7046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007048
7049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007051
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007052 have_long_long=yes
7053
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007054fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7057$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007058if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059# The cast to long int works around a bug in the HP C Compiler
7060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7062# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7064$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007065if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007066 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068 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 +00007069
Martin v. Löwis11437992002-04-12 09:54:03 +00007070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007071 if test "$ac_cv_type_long_long" = yes; then
7072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007074as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007075See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007076 else
7077 ac_cv_sizeof_long_long=0
7078 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080
Martin v. Löwis11437992002-04-12 09:54:03 +00007081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7083$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007084
7085
7086
Martin v. Löwis11437992002-04-12 09:54:03 +00007087cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007088#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007089_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007090
Michael W. Hudson54241132001-12-07 15:38:26 +00007091
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007092fi
7093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7095$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007096have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007098/* end confdefs.h. */
7099
7100int
7101main ()
7102{
Matthias Klosec511b472010-05-08 11:01:39 +00007103long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007104 ;
7105 return 0;
7106}
7107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007109
7110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007112
7113 have_long_double=yes
7114
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007115fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7118$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007119if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007120# The cast to long int works around a bug in the HP C Compiler
7121# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7122# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7123# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7125$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007126if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007130
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007132 if test "$ac_cv_type_long_double" = yes; then
7133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007135as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007136See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007137 else
7138 ac_cv_sizeof_long_double=0
7139 fi
7140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7144$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007145
7146
7147
7148cat >>confdefs.h <<_ACEOF
7149#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7150_ACEOF
7151
7152
7153fi
7154
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7156$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007157have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007159/* end confdefs.h. */
7160
7161int
7162main ()
7163{
7164_Bool x; x = (_Bool)0;
7165 ;
7166 return 0;
7167}
7168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007170
7171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007172$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007173
7174 have_c99_bool=yes
7175
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7179$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007180if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007181# The cast to long int works around a bug in the HP C Compiler
7182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7184# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7186$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007187if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007191
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193 if test "$ac_cv_type__Bool" = yes; then
7194 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7195$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007196as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007197See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007198 else
7199 ac_cv_sizeof__Bool=0
7200 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007202
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7205$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007206
7207
7208
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007209cat >>confdefs.h <<_ACEOF
7210#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7211_ACEOF
7212
7213
7214fi
7215
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007216ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007217 #include <stdint.h>
7218 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007219 #ifdef HAVE_INTTYPES_H
7220 #include <inttypes.h>
7221 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007223if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007224
7225cat >>confdefs.h <<_ACEOF
7226#define HAVE_UINTPTR_T 1
7227_ACEOF
7228
Martin v. Löwiseba40652007-08-30 20:10:57 +00007229# The cast to long int works around a bug in the HP C Compiler
7230# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7231# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7232# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7234$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007235if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007236 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007238 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 +00007239
Martin v. Löwis11437992002-04-12 09:54:03 +00007240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241 if test "$ac_cv_type_uintptr_t" = yes; then
7242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007244as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007245See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007246 else
7247 ac_cv_sizeof_uintptr_t=0
7248 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250
Martin v. Löwis11437992002-04-12 09:54:03 +00007251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7253$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007254
7255
7256
Martin v. Löwis11437992002-04-12 09:54:03 +00007257cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007258#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007259_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007260
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007262fi
7263
Martin v. Löwisebe26702006-10-02 14:55:51 +00007264
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007265# The cast to long int works around a bug in the HP C Compiler
7266# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7267# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7268# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7270$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007271if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007275#ifdef HAVE_SYS_TYPES_H
7276#include <sys/types.h>
7277#endif
7278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007279"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007280
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282 if test "$ac_cv_type_off_t" = yes; then
7283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007285as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007286See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007287 else
7288 ac_cv_sizeof_off_t=0
7289 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7294$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007295
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007296
7297
Martin v. Löwis11437992002-04-12 09:54:03 +00007298cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007299#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007300_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007301
Michael W. Hudson54241132001-12-07 15:38:26 +00007302
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007303
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7305$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007306if test "$have_long_long" = yes
7307then
7308if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007309 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007310
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007311$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7314$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007318fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007322fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007323
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007324# The cast to long int works around a bug in the HP C Compiler
7325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7327# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7329$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007330if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007331 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007332else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007334#ifdef HAVE_SYS_TYPES_H
7335#include <sys/types.h>
7336#endif
7337#ifdef HAVE_TIME_H
7338#include <time.h>
7339#endif
7340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007342
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007343else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344 if test "$ac_cv_type_time_t" = yes; then
7345 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007347as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007348See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007349 else
7350 ac_cv_sizeof_time_t=0
7351 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007354fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7356$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007357
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007358
7359
Martin v. Löwis11437992002-04-12 09:54:03 +00007360cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007361#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007362_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007363
Michael W. Hudson54241132001-12-07 15:38:26 +00007364
7365
Trent Mick635f6fb2000-08-23 21:33:05 +00007366# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007367ac_save_cc="$CC"
7368if test "$ac_cv_kpthread" = "yes"
7369then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007370elif test "$ac_cv_kthread" = "yes"
7371then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007372elif test "$ac_cv_pthread" = "yes"
7373then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7376$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007377have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007379/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007380
7381 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
7384{
Guido van Rossum12580492000-09-24 16:47:19 +00007385pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007386 ;
7387 return 0;
7388}
Matthias Klosec511b472010-05-08 11:01:39 +00007389
Martin v. Löwis11437992002-04-12 09:54:03 +00007390_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007392 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7396$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007397if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007398 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007399# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7400# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7401# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7403$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007404if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007408#ifdef HAVE_PTHREAD_H
7409#include <pthread.h>
7410#endif
7411
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007413
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007415 if test "$ac_cv_type_pthread_t" = yes; then
7416 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7417$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007418as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007419See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007420 else
7421 ac_cv_sizeof_pthread_t=0
7422 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424
Trent Mick635f6fb2000-08-23 21:33:05 +00007425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7427$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007428
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007429
7430
Martin v. Löwis11437992002-04-12 09:54:03 +00007431cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007432#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007433_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007434
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007435
Trent Mick635f6fb2000-08-23 21:33:05 +00007436fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007437CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7440$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007441# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007443 enableval=$enable_toolbox_glue;
7444fi
Jack Jansene578a632001-08-15 01:27:14 +00007445
7446
7447if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007448then
Jack Jansene578a632001-08-15 01:27:14 +00007449 case $ac_sys_system/$ac_sys_release in
7450 Darwin/*)
7451 enable_toolbox_glue="yes";;
7452 *)
7453 enable_toolbox_glue="no";;
7454 esac
7455fi
7456case "$enable_toolbox_glue" in
7457yes)
Jack Jansene578a632001-08-15 01:27:14 +00007458 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007459 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007462
7463 ;;
7464*)
Jack Jansene578a632001-08-15 01:27:14 +00007465 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007466 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007467 ;;
7468esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7470$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007471
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007472
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007473
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007474case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007475 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007476 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7477 ;;
7478 Darwin/*)
7479 OTHER_LIBTOOL_OPT=""
7480 ;;
7481esac
7482
7483
Ronald Oussoren25967582009-09-06 10:00:26 +00007484ARCH_RUN_32BIT=""
7485
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007486case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007487 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007488 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7489 if test "${enable_universalsdk}"; then
7490 :
7491 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007492 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007493 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007494 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007495 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007496 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007497 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007498 if test ${gcc_version} '<' 4.0
7499 then
7500 LIBTOOL_CRUFT="-lcc_dynamic"
7501 else
7502 LIBTOOL_CRUFT=""
7503 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007505 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007508/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007509
Ronald Oussoren25967582009-09-06 10:00:26 +00007510 #include <unistd.h>
7511 int main(int argc, char*argv[])
7512 {
7513 if (sizeof(long) == 4) {
7514 return 0;
7515 } else {
7516 return 1;
7517 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007518 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007519
Ronald Oussoren25967582009-09-06 10:00:26 +00007520_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007522 ac_osx_32bit=yes
7523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007524 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007528fi
7529
7530
Ronald Oussoren25967582009-09-06 10:00:26 +00007531 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007532 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007533 i386)
7534 MACOSX_DEFAULT_ARCH="i386"
7535 ;;
7536 ppc)
7537 MACOSX_DEFAULT_ARCH="ppc"
7538 ;;
7539 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007540 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007541 ;;
7542 esac
7543 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007544 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007545 i386)
7546 MACOSX_DEFAULT_ARCH="x86_64"
7547 ;;
7548 ppc)
7549 MACOSX_DEFAULT_ARCH="ppc64"
7550 ;;
7551 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007552 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007553 ;;
7554 esac
7555
7556 #ARCH_RUN_32BIT="true"
7557 fi
7558
7559 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007560 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007561 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007562esac
7563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7565$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007566if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007567then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007568 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007570 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007572$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7575$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007576 if test $enable_shared = "yes"
7577 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007578 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00007579 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7582$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007583fi
7584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7586$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007587case $ac_sys_system/$ac_sys_release in
7588 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007591
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7593$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007594 ;;
7595 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007598 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007599esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007600
Guido van Rossum0a516c91994-09-12 10:58:40 +00007601# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007602
Michael W. Hudson54241132001-12-07 15:38:26 +00007603
7604
7605
7606
Ronald Oussoren75912852010-04-08 08:13:31 +00007607
Guido van Rossum0a516c91994-09-12 10:58:40 +00007608# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007609# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7611$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007612if test -z "$SO"
7613then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007614 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007615 hp*|HP*)
7616 case `uname -m` in
7617 ia64) SO=.so;;
7618 *) SO=.sl;;
7619 esac
7620 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007621 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007622 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007623 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007624else
7625 # this might also be a termcap variable, see #610332
7626 echo
7627 echo '====================================================================='
7628 echo '+ +'
7629 echo '+ WARNING: You have set SO in your environment. +'
7630 echo '+ Do you really mean to change the extension for shared libraries? +'
7631 echo '+ Continuing in 10 seconds to let you to ponder. +'
7632 echo '+ +'
7633 echo '====================================================================='
7634 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007635fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7637$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007638
Ronald Oussoren79f90492009-01-02 10:44:46 +00007639
Neal Norwitz58e28882006-05-19 07:00:58 +00007640cat >>confdefs.h <<_ACEOF
7641#define SHLIB_EXT "$SO"
7642_ACEOF
7643
Guido van Rossum0a516c91994-09-12 10:58:40 +00007644# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007645# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007646# (Shared libraries in this instance are shared modules to be loaded into
7647# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7649$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007650if test -z "$LDSHARED"
7651then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007652 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007653 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007654 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007655 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007656 ;;
7657 BeOS*)
7658 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007659 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007660 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007661 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007662 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007664 if test "$GCC" = "yes" ; then
7665 LDSHARED='$(CC) -shared'
7666 LDCXXSHARED='$(CXX) -shared'
7667 else
7668 LDSHARED='$(CC) -G'
7669 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007670 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007671 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007672 if test "$GCC" = "yes" ; then
7673 LDSHARED='$(CC) -shared'
7674 LDCXXSHARED='$(CXX) -shared'
7675 else
7676 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007677 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007678 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007679 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007680 LDSHARED='$(CC) -bundle'
7681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007682 if test "$enable_framework" ; then
7683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007687 else
7688 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007689 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007690 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007691 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007692 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007693 LDSHARED='$(CC) -bundle'
7694 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007695 if test "$enable_framework" ; then
7696 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007697 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7698 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007699 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007700 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007701 # No framework, use the Python app as bundle-loader
7702 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007703 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007704 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007705 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007706 Darwin/*)
7707 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7708 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007709
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007710 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007711 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007712 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007713 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007714 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007715 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7716 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007717 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007718 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007719 LDSHARED='$(CC) -bundle'
7720 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007721 if test "$enable_framework" ; then
7722 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007723 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7724 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007725 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007726 else
7727 # No framework, use the Python app as bundle-loader
7728 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7729 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007730 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007731 fi
7732 fi
7733 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007734 Linux*|GNU*|QNX*)
7735 LDSHARED='$(CC) -shared'
7736 LDCXXSHARED='$(CXX) -shared';;
7737 BSD/OS*/4*)
7738 LDSHARED="gcc -shared"
7739 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007740 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007741 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007742 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007743 LDSHARED='$(CC) -shared'
7744 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007745 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007746 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007747 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007748 OpenBSD*)
7749 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7750 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007751 LDSHARED='$(CC) -shared $(CCSHARED)'
7752 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007753 else
7754 case `uname -r` in
7755 [01].* | 2.[0-7] | 2.[0-7].*)
7756 LDSHARED="ld -Bshareable ${LDFLAGS}"
7757 ;;
7758 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007759 LDSHARED='$(CC) -shared $(CCSHARED)'
7760 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007761 ;;
7762 esac
7763 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007764 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007765 LDSHARED='$(CC) -shared'
7766 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007767 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007768 if test "$GCC" = "yes" ; then
7769 LDSHARED='$(CC) -shared'
7770 LDCXXSHARED='$(CXX) -shared'
7771 else
7772 LDSHARED='$(CC) -G'
7773 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007774 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007775 SCO_SV*)
7776 LDSHARED='$(CC) -Wl,-G,-Bexport'
7777 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7778 CYGWIN*)
7779 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7780 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7781 atheos*)
7782 LDSHARED="gcc -shared"
7783 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007784 *) LDSHARED="ld";;
7785 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7788$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007789LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007790BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007791# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007792# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7794$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007795if test -z "$CCSHARED"
7796then
Guido van Rossum07397971997-04-29 21:49:50 +00007797 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007798 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007799 then CCSHARED="-fPIC";
7800 elif test `uname -p` = sparc;
7801 then CCSHARED="-xcode=pic32";
7802 else CCSHARED="-Kpic";
7803 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007804 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007805 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007806 else CCSHARED="+z";
7807 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007808 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007809 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007810 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007811 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007812 if test "$GCC" = "yes"
7813 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007814 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007815 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007816 SCO_SV*)
7817 if test "$GCC" = "yes"
7818 then CCSHARED="-fPIC"
7819 else CCSHARED="-Kpic -belf"
7820 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007821 IRIX*/6*) case $CC in
7822 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007823 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007824 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007825 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007826 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7829$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007830# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007831# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7833$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007834if test -z "$LINKFORSHARED"
7835then
Guido van Rossum07397971997-04-29 21:49:50 +00007836 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007837 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007838 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007839 LINKFORSHARED="-Wl,-E -Wl,+s";;
7840# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007841 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007842 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007843 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007845 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7846 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007847 # not used by the core itself but which needs to be in the core so
7848 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007849 # -prebind is no longer used, because it actually seems to give a
7850 # slowdown in stead of a speedup, maybe due to the large number of
7851 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007852
7853 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007854 if test "$enable_framework"
7855 then
Jack Jansenda49e192005-01-07 13:08:22 +00007856 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007857 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007858 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007859 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007860 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007861 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007862 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007863 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7864 then
7865 LINKFORSHARED="-Wl,--export-dynamic"
7866 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007867 SunOS/5*) case $CC in
7868 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007869 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007870 then
7871 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007872 fi;;
7873 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007874 CYGWIN*)
7875 if test $enable_shared = "no"
7876 then
7877 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7878 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007879 QNX*)
7880 # -Wl,-E causes the symbols to be added to the dynamic
7881 # symbol table so that they can be found when a module
7882 # is loaded. -N 2048K causes the stack size to be set
7883 # to 2048 kilobytes so that the stack doesn't overflow
7884 # when running test_compile.py.
7885 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007886 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7889$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007890
Michael W. Hudson54241132001-12-07 15:38:26 +00007891
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7894$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007895if test ! "$LIBRARY" = "$LDLIBRARY"
7896then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007897 case $ac_sys_system in
7898 CYGWIN*)
7899 # Cygwin needs CCSHARED when building extension DLLs
7900 # but not when building the interpreter DLL.
7901 CFLAGSFORSHARED='';;
7902 *)
7903 CFLAGSFORSHARED='$(CCSHARED)'
7904 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7907$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007908
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007909# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7910# library (with --enable-shared).
7911# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007912# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7913# if it is not required, since it creates a dependency of the shared library
7914# to LIBS. This, in turn, means that applications linking the shared libpython
7915# don't need to link LIBS explicitly. The default should be only changed
7916# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007917
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7919$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007920case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007921 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007922 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007923esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7925$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007926
7927
Guido van Rossum627b2d71993-12-24 10:39:16 +00007928# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7930$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007931if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007932 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007933else
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007935LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007938
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939/* Override any GCC internal prototype to avoid an error.
7940 Use char because int might match the return type of a GCC
7941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942#ifdef __cplusplus
7943extern "C"
7944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007945char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007946int
7947main ()
7948{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 ;
7951 return 0;
7952}
7953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959rm -f core conftest.err conftest.$ac_objext \
7960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007961LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7964$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007965if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007966 cat >>confdefs.h <<_ACEOF
7967#define HAVE_LIBDL 1
7968_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007969
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007970 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007971
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007972fi
7973 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7975$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007976if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007978else
Martin v. Löwis11437992002-04-12 09:54:03 +00007979 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007980LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983
Martin v. Löwiseba40652007-08-30 20:10:57 +00007984/* Override any GCC internal prototype to avoid an error.
7985 Use char because int might match the return type of a GCC
7986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987#ifdef __cplusplus
7988extern "C"
7989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007990char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991int
7992main ()
7993{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ;
7996 return 0;
7997}
7998_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008004rm -f core conftest.err conftest.$ac_objext \
8005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008006LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8009$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008010if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 cat >>confdefs.h <<_ACEOF
8012#define HAVE_LIBDLD 1
8013_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008015 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017fi
8018 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008019
Ronald Oussoren79f90492009-01-02 10:44:46 +00008020# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008021if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8023$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008024if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008026else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008027 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Martin v. Löwiseba40652007-08-30 20:10:57 +00008031/* Override any GCC internal prototype to avoid an error.
8032 Use char because int might match the return type of a GCC
8033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008034#ifdef __cplusplus
8035extern "C"
8036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008037char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008038int
8039main ()
8040{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008041return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008042 ;
8043 return 0;
8044}
8045_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008046for ac_lib in '' pthread rt posix4; do
8047 if test -z "$ac_lib"; then
8048 ac_res="none required"
8049 else
8050 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008051 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008053 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008054 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008058 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008061done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008062if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008063
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064else
8065 ac_cv_search_sem_init=no
8066fi
8067rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008068LIBS=$ac_func_search_save_LIBS
8069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8071$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008073if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008075
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008076fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008077 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008078 # posix4 on Solaris 2.6
8079 # pthread (first!) on Linux
8080fi
8081
Martin v. Löwis19d17342003-06-14 21:03:05 +00008082# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8084$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008085if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008087else
8088 ac_check_lib_save_LIBS=$LIBS
8089LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008092
Martin v. Löwiseba40652007-08-30 20:10:57 +00008093/* Override any GCC internal prototype to avoid an error.
8094 Use char because int might match the return type of a GCC
8095 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008096#ifdef __cplusplus
8097extern "C"
8098#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008099char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008100int
8101main ()
8102{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008103return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008104 ;
8105 return 0;
8106}
8107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008109 ac_cv_lib_intl_textdomain=yes
8110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008112fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008113rm -f core conftest.err conftest.$ac_objext \
8114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008115LIBS=$ac_check_lib_save_LIBS
8116fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8118$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008119if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008122
8123fi
8124
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008125
8126# checks for system dependent C++ extensions support
8127case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8129$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008131/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008132
Georg Brandl94800df2011-02-25 11:09:02 +00008133 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008134int
8135main ()
8136{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008137loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ;
8139 return 0;
8140}
Matthias Klosec511b472010-05-08 11:01:39 +00008141
Martin v. Löwis11437992002-04-12 09:54:03 +00008142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008144
Matthias Klosec511b472010-05-08 11:01:39 +00008145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008147
Matthias Klosec511b472010-05-08 11:01:39 +00008148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008149$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008150
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008151else
Matthias Klosec511b472010-05-08 11:01:39 +00008152
8153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008154$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008155
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008157rm -f core conftest.err conftest.$ac_objext \
8158 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008159 *) ;;
8160esac
8161
Guido van Rossum70c7f481998-03-26 18:44:10 +00008162# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008163# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8165$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008166if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008168else
Martin v. Löwis11437992002-04-12 09:54:03 +00008169 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008170LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008173
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174/* Override any GCC internal prototype to avoid an error.
8175 Use char because int might match the return type of a GCC
8176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008177#ifdef __cplusplus
8178extern "C"
8179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008180char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008181int
8182main ()
8183{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008185 ;
8186 return 0;
8187}
8188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008190 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008193fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008194rm -f core conftest.err conftest.$ac_objext \
8195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008196LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8199$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008200if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008201 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008202fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008203 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8205$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008206if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008207 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008208else
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008210LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214/* Override any GCC internal prototype to avoid an error.
8215 Use char because int might match the return type of a GCC
8216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008217#ifdef __cplusplus
8218extern "C"
8219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008220char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008221int
8222main ()
8223{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ;
8226 return 0;
8227}
8228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234rm -f core conftest.err conftest.$ac_objext \
8235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008236LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008237fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8239$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008240if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008241 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008242fi
8243 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008244
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008245case "$ac_sys_system" in
8246BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8248$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008249if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008251else
Martin v. Löwis11437992002-04-12 09:54:03 +00008252 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008253LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008255/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008256
Martin v. Löwiseba40652007-08-30 20:10:57 +00008257/* Override any GCC internal prototype to avoid an error.
8258 Use char because int might match the return type of a GCC
8259 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008260#ifdef __cplusplus
8261extern "C"
8262#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008263char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008264int
8265main ()
8266{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 ;
8269 return 0;
8270}
8271_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008277rm -f core conftest.err conftest.$ac_objext \
8278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008279LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008280fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8282$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008283if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008284 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008285fi
8286 # BeOS
8287;;
8288esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8291$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008292
Martin v. Löwiseba40652007-08-30 20:10:57 +00008293# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008294if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8297$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008298LIBS="$withval $LIBS"
8299
8300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8302$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008303fi
8304
Guido van Rossum7f43da71994-08-01 12:15:30 +00008305
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008306if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008307 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8308set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008311if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008313else
8314 case $PKG_CONFIG in
8315 [\\/]* | ?:[\\/]*)
8316 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8317 ;;
8318 *)
8319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322 IFS=$as_save_IFS
8323 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008324 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008325 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8326 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008328 break 2
8329 fi
8330done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008332IFS=$as_save_IFS
8333
8334 ;;
8335esac
8336fi
8337PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8338if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8340$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008344fi
8345
8346
8347fi
8348if test -z "$ac_cv_path_PKG_CONFIG"; then
8349 ac_pt_PKG_CONFIG=$PKG_CONFIG
8350 # Extract the first word of "pkg-config", so it can be a program name with args.
8351set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008354if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008355 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008356else
8357 case $ac_pt_PKG_CONFIG in
8358 [\\/]* | ?:[\\/]*)
8359 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8360 ;;
8361 *)
8362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365 IFS=$as_save_IFS
8366 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8369 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008371 break 2
8372 fi
8373done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008374 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008375IFS=$as_save_IFS
8376
8377 ;;
8378esac
8379fi
8380ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8381if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8383$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008384else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008387fi
8388
8389 if test "x$ac_pt_PKG_CONFIG" = x; then
8390 PKG_CONFIG=""
8391 else
8392 case $cross_compiling:$ac_tool_warned in
8393yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8395$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008396ac_tool_warned=yes ;;
8397esac
8398 PKG_CONFIG=$ac_pt_PKG_CONFIG
8399 fi
8400else
8401 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8402fi
8403
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008404
8405# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8407$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008408
8409# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008411 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008412else
8413 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008414fi
8415
8416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8418$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008419
8420# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8422$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008423
8424# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008425if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008426 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008427else
8428 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008429fi
8430
8431
8432if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008433 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8434else
8435 LIBFFI_INCLUDEDIR=""
8436fi
8437
8438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8440$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008441
Benjamin Peterson867475c2009-04-29 20:36:25 +00008442# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8444$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008445
8446# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008447if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008448 withval=$with_dbmliborder;
8449if test x$with_dbmliborder = xyes
8450then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008451as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008452else
8453 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8454 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8455 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008456 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008457 fi
8458 done
8459fi
8460fi
8461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8463$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008464
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008465# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008466
8467
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8469$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008470
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008473 withval=$with_signal_module;
8474fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008475
8476
8477if test -z "$with_signal_module"
8478then with_signal_module="yes"
8479fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8481$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008482
8483if test "${with_signal_module}" = "yes"; then
8484 USE_SIGNAL_MODULE=""
8485 SIGNAL_OBJS=""
8486else
8487 USE_SIGNAL_MODULE="#"
8488 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8489fi
8490
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008491# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008492
Barry Warsawc0d24d82000-06-29 16:12:00 +00008493USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8496$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008497
Guido van Rossumec2f0731997-01-22 20:54:01 +00008498
Martin v. Löwiseba40652007-08-30 20:10:57 +00008499# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008500if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008501 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8503$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008504LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008505if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008506 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008507fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8510$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008511fi
8512
Martin v. Löwis11437992002-04-12 09:54:03 +00008513
8514# Templates for things AC_DEFINEd more than once.
8515# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008516
8517
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
8519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8521$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008522
Martin v. Löwiseba40652007-08-30 20:10:57 +00008523# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525 withval=$with_threads;
8526fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008527
8528
Barry Warsawc0d24d82000-06-29 16:12:00 +00008529# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008530
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008532if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533 withval=$with_thread; with_threads=$with_thread
8534fi
8535
Barry Warsawc0d24d82000-06-29 16:12:00 +00008536
8537if test -z "$with_threads"
8538then with_threads="yes"
8539fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8541$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008542
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008543
Barry Warsawc0d24d82000-06-29 16:12:00 +00008544if test "$with_threads" = "no"
8545then
8546 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008547elif test "$ac_cv_pthread_is_default" = yes
8548then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008549 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008550
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008551 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008552 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008553
8554 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008555 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008556elif test "$ac_cv_kpthread" = "yes"
8557then
8558 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008559 if test "$ac_cv_cxx_thread" = "yes"; then
8560 CXX="$CXX -Kpthread"
8561 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008562 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008563
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008564 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008565 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008566elif test "$ac_cv_kthread" = "yes"
8567then
8568 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008569 if test "$ac_cv_cxx_thread" = "yes"; then
8570 CXX="$CXX -Kthread"
8571 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008573
8574 posix_threads=yes
8575 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008576elif test "$ac_cv_pthread" = "yes"
8577then
8578 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008579 if test "$ac_cv_cxx_thread" = "yes"; then
8580 CXX="$CXX -pthread"
8581 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008583
8584 posix_threads=yes
8585 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008586else
8587 if test ! -z "$with_threads" -a -d "$with_threads"
8588 then LDFLAGS="$LDFLAGS -L$with_threads"
8589 fi
8590 if test ! -z "$withval" -a -d "$withval"
8591 then LDFLAGS="$LDFLAGS -L$withval"
8592 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008593
8594 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008595 # define _POSIX_THREADS in unistd.h. Some apparently don't
8596 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8598$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008600/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008601
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008602#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008603#ifdef _POSIX_THREADS
8604yes
8605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008606
8607_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008609 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008610 unistd_defines_pthreads=yes
8611else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008612 unistd_defines_pthreads=no
8613fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008614rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8617$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008618
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008619 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008621 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008622if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008625 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008628$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008629
8630 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008631 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008632else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008635if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008636 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008638 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008639
Martin v. Löwis11437992002-04-12 09:54:03 +00008640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008642
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008643 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008644else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8647$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008648
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008650if test "${with_pth+set}" = set; then :
8651 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8652$as_echo "$withval" >&6; }
8653 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008654
8655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008656$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008657
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008658 LIBS="-lpth $LIBS"
8659 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8662$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008663
8664 # Just looking for pthread_create in libpthread is not enough:
8665 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8666 # So we really have to include pthread.h, and then link.
8667 _libs=$LIBS
8668 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8670$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008672/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008673#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008674
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008675void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008679
8680pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 ;
8682 return 0;
8683}
8684_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008685if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8688$as_echo "yes" >&6; }
8689 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008690
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008691 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008692 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008693else
Martin v. Löwis11437992002-04-12 09:54:03 +00008694
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008695 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008697if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008698 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008699
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008700 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008701 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008702else
Guido van Rossumad678af1998-10-02 14:42:15 +00008703
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008704 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008705if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008706 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008707
8708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008710
8711 THREADOBJ="Python/thread.o"
8712else
8713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008714 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008715if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008717
8718
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008719$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008720
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008721 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008722else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008723
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8725$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008726if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008728else
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008730LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008733
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734/* Override any GCC internal prototype to avoid an error.
8735 Use char because int might match the return type of a GCC
8736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737#ifdef __cplusplus
8738extern "C"
8739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008740char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008744return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ;
8746 return 0;
8747}
8748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008752 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008753fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008754rm -f core conftest.err conftest.$ac_objext \
8755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008756LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8759$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008760if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008762
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008763 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008764 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008765 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008766else
Greg Steinadf63d62000-07-05 10:38:09 +00008767
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8769$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008770if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008771 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008772else
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008774LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008777
Martin v. Löwiseba40652007-08-30 20:10:57 +00008778/* Override any GCC internal prototype to avoid an error.
8779 Use char because int might match the return type of a GCC
8780 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008781#ifdef __cplusplus
8782extern "C"
8783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008784char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008785int
8786main ()
8787{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008788return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008789 ;
8790 return 0;
8791}
8792_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008793if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008796 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798rm -f core conftest.err conftest.$ac_objext \
8799 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008800LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8803$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008804if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008805 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008806
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008807 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008808 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008809 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008810else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8813$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008814if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008815 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008816else
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008818LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008820/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008821
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822/* Override any GCC internal prototype to avoid an error.
8823 Use char because int might match the return type of a GCC
8824 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008825#ifdef __cplusplus
8826extern "C"
8827#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008828char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008829int
8830main ()
8831{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008832return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 ;
8834 return 0;
8835}
8836_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008837if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008840 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842rm -f core conftest.err conftest.$ac_objext \
8843 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008844LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8847$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008848if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008851 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008852 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008853 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008854else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008855
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8857$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008858if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008860else
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008862LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Martin v. Löwiseba40652007-08-30 20:10:57 +00008866/* Override any GCC internal prototype to avoid an error.
8867 Use char because int might match the return type of a GCC
8868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008869#ifdef __cplusplus
8870extern "C"
8871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008872char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ;
8878 return 0;
8879}
8880_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008884 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886rm -f core conftest.err conftest.$ac_objext \
8887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008888LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8891$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008892if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008893 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008894
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008895 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008896 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008897 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008898else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008899
Martin v. Löwis130fb172001-07-19 11:00:41 +00008900 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008901fi
8902
Guido van Rossum627b2d71993-12-24 10:39:16 +00008903
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008904fi
8905
Guido van Rossum0be3e491997-05-22 20:33:33 +00008906fi
8907
Guido van Rossum49545951997-12-02 19:28:29 +00008908fi
8909
Guido van Rossumb93a8621998-05-07 13:27:32 +00008910fi
8911
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008912
Michael W. Hudson54241132001-12-07 15:38:26 +00008913fi
8914
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008915
8916fi
8917
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008919rm -f core conftest.err conftest.$ac_objext \
8920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008921fi
8922
Martin v. Löwis11437992002-04-12 09:54:03 +00008923fi
8924
8925
8926fi
8927
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008928
Michael W. Hudson54241132001-12-07 15:38:26 +00008929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8931$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008932if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008934else
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008936LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008939
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940/* Override any GCC internal prototype to avoid an error.
8941 Use char because int might match the return type of a GCC
8942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008943#ifdef __cplusplus
8944extern "C"
8945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008946char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008947int
8948main ()
8949{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008950return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008951 ;
8952 return 0;
8953}
8954_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008959fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008960rm -f core conftest.err conftest.$ac_objext \
8961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008962LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8965$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008966if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008968
Martin v. Löwis130fb172001-07-19 11:00:41 +00008969 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008970 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008971 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008972fi
8973
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008974
Neal Norwitza978ab02002-11-02 16:58:05 +00008975 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8977$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008978if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008979 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008982LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986/* Override any GCC internal prototype to avoid an error.
8987 Use char because int might match the return type of a GCC
8988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989#ifdef __cplusplus
8990extern "C"
8991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008992char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
8995{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 ;
8998 return 0;
8999}
9000_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009001if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009003else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006rm -f core conftest.err conftest.$ac_objext \
9007 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009008LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9011$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009012if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009014
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009015 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009016 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009017 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009018fi
9019
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009020 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009021
Martin v. Löwis130fb172001-07-19 11:00:41 +00009022 if test "$USE_THREAD_MODULE" != "#"
9023 then
9024 # If the above checks didn't disable threads, (at least) OSF1
9025 # needs this '-threads' argument during linking.
9026 case $ac_sys_system in
9027 OSF1) LDLAST=-threads;;
9028 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009029 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009030fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009031
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009032if test "$posix_threads" = "yes"; then
9033 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009036
9037 fi
9038
9039 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9040 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009041 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009042$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009043
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009044 ;;
9045 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009046$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009047
9048 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009049 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009051
9052 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009053 esac
9054
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9056$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009057 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009061 ac_cv_pthread_system_supported=no
9062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009064/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009065#include <pthread.h>
9066 void *foo(void *parm) {
9067 return NULL;
9068 }
9069 main() {
9070 pthread_attr_t attr;
9071 pthread_t id;
9072 if (pthread_attr_init(&attr)) exit(-1);
9073 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9074 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9075 exit(0);
9076 }
9077_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009079 ac_cv_pthread_system_supported=yes
9080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009081 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9084 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009085fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009086
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087
Guido van Rossum627b2d71993-12-24 10:39:16 +00009088fi
9089
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9091$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009092 if test "$ac_cv_pthread_system_supported" = "yes"; then
9093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009095
9096 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097 for ac_func in pthread_sigmask
9098do :
9099 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009100if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009101 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009103_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009104 case $ac_sys_system in
9105 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009107$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009108
9109 ;;
9110 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009111fi
9112done
9113
9114fi
9115
9116
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009117# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009118
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9120$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009121# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009122if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009123 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009124 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9126$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009127 ipv6=no
9128 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130$as_echo "yes" >&6; }
9131 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009132
9133 ipv6=yes
9134 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009135 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009136else
Martin v. Löwis11437992002-04-12 09:54:03 +00009137
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009138 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009139
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9141$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142 ipv6=no
9143
9144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009146/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009147 /* AF_INET6 available check */
9148#include <sys/types.h>
9149#include <sys/socket.h>
9150main()
9151{
9152 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9153 exit(1);
9154 else
9155 exit(0);
9156}
9157
Martin v. Löwis11437992002-04-12 09:54:03 +00009158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009159if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009160
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9162$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009163 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009164
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165else
Matthias Klosec511b472010-05-08 11:01:39 +00009166
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009169 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9173 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009174fi
9175
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009177if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9179$as_echo_n "checking if RFC2553 API is available... " >&6; }
9180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009181/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009182
9183 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009184#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009185int
9186main ()
9187{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009188struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009189 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ;
9191 return 0;
9192}
Matthias Klosec511b472010-05-08 11:01:39 +00009193
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009196
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009199 ipv6=yes
9200
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009201else
Matthias Klosec511b472010-05-08 11:01:39 +00009202
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009205 ipv6=no
9206
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009209fi
9210
9211if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009212 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009213
9214fi
9215
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216fi
9217
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009218
9219ipv6type=unknown
9220ipv6lib=none
9221ipv6trylibc=no
9222
9223if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9225$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009226 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9227 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009228 case $i in
9229 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009231/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009232
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009233#include <netinet/in.h>
9234#ifdef IPV6_INRIA_VERSION
9235yes
9236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009237_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009240 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009241fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009242rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009243
9244 ;;
9245 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249#include <netinet/in.h>
9250#ifdef __KAME__
9251yes
9252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009256 ipv6type=$i;
9257 ipv6lib=inet6
9258 ipv6libdir=/usr/local/v6/lib
9259 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009260fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009261rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262
9263 ;;
9264 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009267
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009268#include <features.h>
9269#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9270yes
9271#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009272_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009274 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009275 ipv6type=$i;
9276 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009278rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009279
9280 ;;
9281 linux-inet6)
9282 if test -d /usr/inet6; then
9283 ipv6type=$i
9284 ipv6lib=inet6
9285 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009286 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009287 fi
9288 ;;
9289 solaris)
9290 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009291 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009292 ipv6type=$i
9293 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009294 fi
9295 fi
9296 ;;
9297 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009299/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009300
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009301#include <sys/param.h>
9302#ifdef _TOSHIBA_INET6
9303yes
9304#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009305_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009307 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308 ipv6type=$i;
9309 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009310 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009311fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009312rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009313
9314 ;;
9315 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009317/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009318
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009319#include </usr/local/v6/include/sys/v6config.h>
9320#ifdef __V6D__
9321yes
9322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009326 ipv6type=$i;
9327 ipv6lib=v6;
9328 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009329 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009330fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009331rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009332
9333 ;;
9334 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009336/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009337
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009338#include <sys/param.h>
9339#ifdef _ZETA_MINAMI_INET6
9340yes
9341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009342_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009345 ipv6type=$i;
9346 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009347 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009348fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009349rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009350
9351 ;;
9352 esac
9353 if test "$ipv6type" != "unknown"; then
9354 break
9355 fi
9356 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9358$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009359fi
9360
9361if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9362 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9363 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9364 echo "using lib$ipv6lib"
9365 else
9366 if test $ipv6trylibc = "yes"; then
9367 echo "using libc"
9368 else
9369 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9370 echo "You need to fetch lib$ipv6lib.a from appropriate"
9371 echo 'ipv6 kit and compile beforehand.'
9372 exit 1
9373 fi
9374 fi
9375fi
9376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9378$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009380/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009381
9382 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009383int
9384main ()
9385{
9386FSIORefNum fRef = 0
9387 ;
9388 return 0;
9389}
Mark Dickinson0712b562010-05-08 19:13:21 +00009390
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009391_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009392if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009393
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009396
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9398$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009399
Mark Dickinson0712b562010-05-08 19:13:21 +00009400else
9401
9402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
9404
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009405fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9407
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009408# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9410$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009411
Martin v. Löwiseba40652007-08-30 20:10:57 +00009412# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414 withval=$with_doc_strings;
9415fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009416
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009417
9418if test -z "$with_doc_strings"
9419then with_doc_strings="yes"
9420fi
9421if test "$with_doc_strings" != "no"
9422then
9423
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009425
9426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9428$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009429
Neil Schemenauera35c6882001-02-27 04:45:05 +00009430# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9432$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009433
Martin v. Löwiseba40652007-08-30 20:10:57 +00009434# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009435if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009437if test "$withval" != no
9438then
9439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009440$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9443$as_echo "yes" >&6; }
9444else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009446fi
9447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9449$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009450fi
9451
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009452
9453# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9455$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009458if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009459 withval=$with_pymalloc;
9460fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009461
Neil Schemenauera35c6882001-02-27 04:45:05 +00009462
Neil Schemenauer16c22972002-03-22 15:34:49 +00009463if test -z "$with_pymalloc"
9464then with_pymalloc="yes"
9465fi
9466if test "$with_pymalloc" != "no"
9467then
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009470
9471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9473$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009474
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009475# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9477$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009478
9479# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009481 withval=$with_valgrind;
9482else
9483 with_valgrind=no
9484fi
9485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9487$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009488if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009490if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009491
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009493
9494else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009495 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009496
9497fi
9498
9499
9500fi
9501
Barry Warsawef82cd72000-06-30 16:21:01 +00009502# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9504$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
Martin v. Löwiseba40652007-08-30 20:10:57 +00009506# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009507if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009509if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009510then
9511
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009512$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9515$as_echo "yes" >&6; }
9516else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9517$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009518fi
9519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9521$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009522fi
9523
Barry Warsawef82cd72000-06-30 16:21:01 +00009524
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009525# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009526
Guido van Rossum98935bf2001-09-05 19:13:16 +00009527DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009528
Guido van Rossume97ee181999-12-20 21:27:22 +00009529# the dlopen() function means we might want to use dynload_shlib.o. some
9530# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009531for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532do :
9533 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009534if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009536#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009537_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009538
Guido van Rossume97ee181999-12-20 21:27:22 +00009539fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009540done
Guido van Rossume97ee181999-12-20 21:27:22 +00009541
Michael W. Hudson54241132001-12-07 15:38:26 +00009542
Guido van Rossume97ee181999-12-20 21:27:22 +00009543# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9544# loading of modules.
9545
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9547$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009548if test -z "$DYNLOADFILE"
9549then
9550 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009551 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9552 if test "$ac_cv_func_dlopen" = yes
9553 then DYNLOADFILE="dynload_shlib.o"
9554 else DYNLOADFILE="dynload_aix.o"
9555 fi
9556 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009557 BeOS*) DYNLOADFILE="dynload_beos.o";;
9558 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009559 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9560 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009562 *)
9563 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9564 # out any dynamic loading
9565 if test "$ac_cv_func_dlopen" = yes
9566 then DYNLOADFILE="dynload_shlib.o"
9567 else DYNLOADFILE="dynload_stub.o"
9568 fi
9569 ;;
9570 esac
9571fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9573$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009574if test "$DYNLOADFILE" != "dynload_stub.o"
9575then
Martin v. Löwis11437992002-04-12 09:54:03 +00009576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009578
9579fi
9580
Neil Schemenauer4e425612001-06-19 15:44:15 +00009581# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9582
Michael W. Hudson54241132001-12-07 15:38:26 +00009583
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9585$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009586if test -z "$MACHDEP_OBJS"
9587then
Jack Jansene578a632001-08-15 01:27:14 +00009588 MACHDEP_OBJS=$extra_machdep_objs
9589else
9590 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9593$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009594
Guido van Rossum627b2d71993-12-24 10:39:16 +00009595# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009596for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9597 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009598 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009599 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009600 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009601 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009602 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009603 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9604 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009605 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009606 setlocale setregid setreuid setresuid setresgid \
9607 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009608 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009609 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009610 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611do :
9612 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9613ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009614if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009617_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009618
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009619fi
9620done
9621
Michael W. Hudson54241132001-12-07 15:38:26 +00009622
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009623# For some functions, having a definition is not sufficient, since
9624# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9626$as_echo_n "checking for chroot... " >&6; }
9627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009629#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009630int
9631main ()
9632{
9633void *x=chroot
9634 ;
9635 return 0;
9636}
9637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009639
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009641
Matthias Klosec511b472010-05-08 11:01:39 +00009642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9646$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009647
9648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9651$as_echo_n "checking for link... " >&6; }
9652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009653/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009654#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009655int
9656main ()
9657{
9658void *x=link
9659 ;
9660 return 0;
9661}
9662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009664
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009666
Matthias Klosec511b472010-05-08 11:01:39 +00009667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009672
9673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9676$as_echo_n "checking for symlink... " >&6; }
9677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009679#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009680int
9681main ()
9682{
9683void *x=symlink
9684 ;
9685 return 0;
9686}
9687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009691
Matthias Klosec511b472010-05-08 11:01:39 +00009692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009697
9698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9701$as_echo_n "checking for fchdir... " >&6; }
9702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009704#include <unistd.h>
9705int
9706main ()
9707{
9708void *x=fchdir
9709 ;
9710 return 0;
9711}
9712_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009714
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009715$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009716
Matthias Klosec511b472010-05-08 11:01:39 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9721$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009722
9723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9726$as_echo_n "checking for fsync... " >&6; }
9727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009728/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009729#include <unistd.h>
9730int
9731main ()
9732{
9733void *x=fsync
9734 ;
9735 return 0;
9736}
9737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009739
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009741
Matthias Klosec511b472010-05-08 11:01:39 +00009742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009747
9748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9751$as_echo_n "checking for fdatasync... " >&6; }
9752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009754#include <unistd.h>
9755int
9756main ()
9757{
9758void *x=fdatasync
9759 ;
9760 return 0;
9761}
9762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009766
Matthias Klosec511b472010-05-08 11:01:39 +00009767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009768$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009772
9773fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9776$as_echo_n "checking for epoll... " >&6; }
9777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009778/* end confdefs.h. */
9779#include <sys/epoll.h>
9780int
9781main ()
9782{
9783void *x=epoll_create
9784 ;
9785 return 0;
9786}
9787_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009789
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009790$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009791
Matthias Klosec511b472010-05-08 11:01:39 +00009792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009793$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009797
9798fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9801$as_echo_n "checking for kqueue... " >&6; }
9802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009803/* end confdefs.h. */
9804
9805#include <sys/types.h>
9806#include <sys/event.h>
9807
9808int
9809main ()
9810{
9811int x=kqueue()
9812 ;
9813 return 0;
9814}
9815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009816if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009817
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009819
Matthias Klosec511b472010-05-08 11:01:39 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009825
9826fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009828# On some systems (eg. FreeBSD 5), we would find a definition of the
9829# functions ctermid_r, setgroups in the library, but no prototype
9830# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9831# address to avoid compiler warnings and potential miscompilations
9832# because of the missing prototypes.
9833
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9835$as_echo_n "checking for ctermid_r... " >&6; }
9836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009837/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009838
Martin v. Löwisd5843682002-11-21 20:41:28 +00009839#include <stdio.h>
9840
Martin v. Löwisd5843682002-11-21 20:41:28 +00009841int
9842main ()
9843{
9844void* p = ctermid_r
9845 ;
9846 return 0;
9847}
9848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009850
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009851$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009852
Matthias Klosec511b472010-05-08 11:01:39 +00009853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009854$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9857$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009858
9859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9861
Antoine Pitroub170f172010-09-10 18:47:36 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9863$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009864if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009865 $as_echo_n "(cached) " >&6
9866else
9867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009868/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009869#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009870int
9871main ()
9872{
9873void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009874
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009875 ;
9876 return 0;
9877}
9878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009879if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009880 ac_cv_flock_decl=yes
9881else
9882 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009883
9884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009886
Antoine Pitroub170f172010-09-10 18:47:36 +00009887fi
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9889$as_echo "$ac_cv_flock_decl" >&6; }
9890if test "x${ac_cv_flock_decl}" = xyes; then
9891 for ac_func in flock
9892do :
9893 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009894if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009895 cat >>confdefs.h <<_ACEOF
9896#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009897_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009898
Antoine Pitrou85729812010-09-07 14:55:24 +00009899else
Antoine Pitroub170f172010-09-10 18:47:36 +00009900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009901$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009902if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009903 $as_echo_n "(cached) " >&6
9904else
9905 ac_check_lib_save_LIBS=$LIBS
9906LIBS="-lbsd $LIBS"
9907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9908/* end confdefs.h. */
9909
9910/* Override any GCC internal prototype to avoid an error.
9911 Use char because int might match the return type of a GCC
9912 builtin and then its argument prototype would still apply. */
9913#ifdef __cplusplus
9914extern "C"
9915#endif
9916char flock ();
9917int
9918main ()
9919{
9920return flock ();
9921 ;
9922 return 0;
9923}
9924_ACEOF
9925if ac_fn_c_try_link "$LINENO"; then :
9926 ac_cv_lib_bsd_flock=yes
9927else
9928 ac_cv_lib_bsd_flock=no
9929fi
9930rm -f core conftest.err conftest.$ac_objext \
9931 conftest$ac_exeext conftest.$ac_ext
9932LIBS=$ac_check_lib_save_LIBS
9933fi
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9935$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009936if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009937 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009938
9939
9940$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9941
9942
9943fi
9944
9945
9946fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009947done
9948
Antoine Pitrou85729812010-09-07 14:55:24 +00009949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9952$as_echo_n "checking for getpagesize... " >&6; }
9953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009954/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009955
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009956#include <unistd.h>
9957
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009958int
9959main ()
9960{
9961void* p = getpagesize
9962 ;
9963 return 0;
9964}
9965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009969
Matthias Klosec511b472010-05-08 11:01:39 +00009970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009971$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9974$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009975
9976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009978
Charles-François Natali93a11752011-11-27 13:01:35 +01009979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9980$as_echo_n "checking for broken unsetenv... " >&6; }
9981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9982/* end confdefs.h. */
9983
9984#include <stdlib.h>
9985
9986int
9987main ()
9988{
9989int res = unsetenv("DUMMY")
9990 ;
9991 return 0;
9992}
9993_ACEOF
9994if ac_fn_c_try_compile "$LINENO"; then :
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997else
9998
9999$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10000
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10002$as_echo "yes" >&6; }
10003
10004fi
10005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10006
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010007for ac_prog in true
10008do
10009 # Extract the first word of "$ac_prog", so it can be a program name with args.
10010set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10012$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010013if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010015else
10016 if test -n "$TRUE"; then
10017 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10018else
10019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022 IFS=$as_save_IFS
10023 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 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 +000010026 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010027 $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 +000010028 break 2
10029 fi
10030done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010031 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010032IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033
10034fi
10035fi
10036TRUE=$ac_cv_prog_TRUE
10037if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10039$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043fi
10044
Martin v. Löwiseba40652007-08-30 20:10:57 +000010045
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046 test -n "$TRUE" && break
10047done
10048test -n "$TRUE" || TRUE="/bin/true"
10049
10050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10052$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010053if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010055else
10056 ac_check_lib_save_LIBS=$LIBS
10057LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010059/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010060
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061/* Override any GCC internal prototype to avoid an error.
10062 Use char because int might match the return type of a GCC
10063 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010064#ifdef __cplusplus
10065extern "C"
10066#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010067char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010068int
10069main ()
10070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010072 ;
10073 return 0;
10074}
10075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010077 ac_cv_lib_c_inet_aton=yes
10078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010079 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081rm -f core conftest.err conftest.$ac_objext \
10082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010083LIBS=$ac_check_lib_save_LIBS
10084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10086$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010087if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010088 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010089else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10091$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010092if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010094else
10095 ac_check_lib_save_LIBS=$LIBS
10096LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010099
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100/* Override any GCC internal prototype to avoid an error.
10101 Use char because int might match the return type of a GCC
10102 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010103#ifdef __cplusplus
10104extern "C"
10105#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010106char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010107int
10108main ()
10109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010111 ;
10112 return 0;
10113}
10114_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010116 ac_cv_lib_resolv_inet_aton=yes
10117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010118 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010119fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010120rm -f core conftest.err conftest.$ac_objext \
10121 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010122LIBS=$ac_check_lib_save_LIBS
10123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10125$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010126if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010127 cat >>confdefs.h <<_ACEOF
10128#define HAVE_LIBRESOLV 1
10129_ACEOF
10130
10131 LIBS="-lresolv $LIBS"
10132
10133fi
10134
10135
10136fi
10137
10138
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010139# On Tru64, chflags seems to be present, but calling it will
10140# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10142$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010143if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010146 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010147 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010148else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010150/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010151
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010152#include <sys/stat.h>
10153#include <unistd.h>
10154int main(int argc, char*argv[])
10155{
10156 if(chflags(argv[0], 0) != 0)
10157 return 1;
10158 return 0;
10159}
Ned Deily43e10542011-06-27 23:41:53 -070010160
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010161_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010162if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010163 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010166fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010169fi
10170
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010171
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010172fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10174$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010175if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010176 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010177if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010178 ac_cv_have_chflags="yes"
10179else
10180 ac_cv_have_chflags="no"
10181fi
10182
10183fi
10184if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010185
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010187
10188fi
10189
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10191$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010192if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010195 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010196 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010199/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010200
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010201#include <sys/stat.h>
10202#include <unistd.h>
10203int main(int argc, char*argv[])
10204{
10205 if(lchflags(argv[0], 0) != 0)
10206 return 1;
10207 return 0;
10208}
Ned Deily43e10542011-06-27 23:41:53 -070010209
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010212 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010214 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010218fi
10219
10220
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10223$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010224if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010226if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010227 ac_cv_have_lchflags="yes"
10228else
10229 ac_cv_have_lchflags="no"
10230fi
10231
10232fi
10233if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010236
10237fi
10238
Ronald Oussorenf8752642006-07-06 10:13:35 +000010239case $ac_sys_system/$ac_sys_release in
10240Darwin/*)
10241 _CUR_CFLAGS="${CFLAGS}"
10242 _CUR_LDFLAGS="${LDFLAGS}"
10243 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10244 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10245 ;;
10246esac
10247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10249$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010250if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010252else
10253 ac_check_lib_save_LIBS=$LIBS
10254LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010256/* end confdefs.h. */
10257
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258/* Override any GCC internal prototype to avoid an error.
10259 Use char because int might match the return type of a GCC
10260 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010261#ifdef __cplusplus
10262extern "C"
10263#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010264char inflateCopy ();
10265int
10266main ()
10267{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010268return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010274 ac_cv_lib_z_inflateCopy=yes
10275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010277fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010278rm -f core conftest.err conftest.$ac_objext \
10279 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010280LIBS=$ac_check_lib_save_LIBS
10281fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10283$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010284if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010287
10288fi
10289
10290
Ronald Oussorenf8752642006-07-06 10:13:35 +000010291case $ac_sys_system/$ac_sys_release in
10292Darwin/*)
10293 CFLAGS="${_CUR_CFLAGS}"
10294 LDFLAGS="${_CUR_LDFLAGS}"
10295 ;;
10296esac
10297
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10299$as_echo_n "checking for hstrerror... " >&6; }
10300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010301/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010302
Martin v. Löwise9416172003-05-03 10:12:45 +000010303#include <netdb.h>
10304
Martin v. Löwise9416172003-05-03 10:12:45 +000010305int
10306main ()
10307{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010308void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010309 ;
10310 return 0;
10311}
10312_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010315$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010316
Matthias Klosec511b472010-05-08 11:01:39 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010318$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010322
10323fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324rm -f core conftest.err conftest.$ac_objext \
10325 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10328$as_echo_n "checking for inet_aton... " >&6; }
10329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010330/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010331
Martin v. Löwis86d66262006-02-17 08:40:11 +000010332#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010333#include <sys/socket.h>
10334#include <netinet/in.h>
10335#include <arpa/inet.h>
10336
Martin v. Löwise9416172003-05-03 10:12:45 +000010337int
10338main ()
10339{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010340void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010341 ;
10342 return 0;
10343}
10344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010347$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010348
Matthias Klosec511b472010-05-08 11:01:39 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010351else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010354
10355fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010356rm -f core conftest.err conftest.$ac_objext \
10357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10360$as_echo_n "checking for inet_pton... " >&6; }
10361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010362/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010363
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010364#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010365#include <sys/socket.h>
10366#include <netinet/in.h>
10367#include <arpa/inet.h>
10368
Martin v. Löwise9416172003-05-03 10:12:45 +000010369int
10370main ()
10371{
10372void* p = inet_pton
10373 ;
10374 return 0;
10375}
10376_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010378
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010379$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010380
Matthias Klosec511b472010-05-08 11:01:39 +000010381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010382$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10385$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010386
10387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010389
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010390# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10392$as_echo_n "checking for setgroups... " >&6; }
10393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010394/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010395
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010396#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010397#ifdef HAVE_GRP_H
10398#include <grp.h>
10399#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010400
Martin v. Löwisd5843682002-11-21 20:41:28 +000010401int
10402main ()
10403{
10404void* p = setgroups
10405 ;
10406 return 0;
10407}
10408_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010411$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010412
Matthias Klosec511b472010-05-08 11:01:39 +000010413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010414$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010418
10419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010421
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010422# check for openpty and forkpty
10423
10424for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010425do :
10426 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010427if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010430_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010431
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10434$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010435if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010437else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010439LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Martin v. Löwiseba40652007-08-30 20:10:57 +000010443/* Override any GCC internal prototype to avoid an error.
10444 Use char because int might match the return type of a GCC
10445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010446#ifdef __cplusplus
10447extern "C"
10448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010449char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010450int
10451main ()
10452{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ;
10455 return 0;
10456}
10457_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010461 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010462fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010463rm -f core conftest.err conftest.$ac_objext \
10464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010465LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010466fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10468$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010469if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010470 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010471 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10474$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010475if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010477else
10478 ac_check_lib_save_LIBS=$LIBS
10479LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010481/* end confdefs.h. */
10482
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483/* Override any GCC internal prototype to avoid an error.
10484 Use char because int might match the return type of a GCC
10485 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010486#ifdef __cplusplus
10487extern "C"
10488#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010489char openpty ();
10490int
10491main ()
10492{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010493return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010494 ;
10495 return 0;
10496}
10497_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010499 ac_cv_lib_bsd_openpty=yes
10500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010502fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503rm -f core conftest.err conftest.$ac_objext \
10504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010505LIBS=$ac_check_lib_save_LIBS
10506fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10508$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010509if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010510 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010511 LIBS="$LIBS -lbsd"
10512fi
10513
10514
10515fi
10516
Fred Drake8cef4cf2000-06-28 16:40:38 +000010517
10518fi
10519done
10520
10521for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010522do :
10523 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010524if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010525 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010526#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010527_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010528
Fred Drake8cef4cf2000-06-28 16:40:38 +000010529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10531$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010532if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010534else
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010536LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010539
Martin v. Löwiseba40652007-08-30 20:10:57 +000010540/* Override any GCC internal prototype to avoid an error.
10541 Use char because int might match the return type of a GCC
10542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010543#ifdef __cplusplus
10544extern "C"
10545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010546char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010547int
10548main ()
10549{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ;
10552 return 0;
10553}
10554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010556 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010557else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010558 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010559fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010560rm -f core conftest.err conftest.$ac_objext \
10561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010562LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010563fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10565$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010566if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010567 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010568 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10571$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010572if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010574else
10575 ac_check_lib_save_LIBS=$LIBS
10576LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010578/* end confdefs.h. */
10579
Martin v. Löwiseba40652007-08-30 20:10:57 +000010580/* Override any GCC internal prototype to avoid an error.
10581 Use char because int might match the return type of a GCC
10582 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010583#ifdef __cplusplus
10584extern "C"
10585#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010586char forkpty ();
10587int
10588main ()
10589{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010590return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010591 ;
10592 return 0;
10593}
10594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010596 ac_cv_lib_bsd_forkpty=yes
10597else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010598 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600rm -f core conftest.err conftest.$ac_objext \
10601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010602LIBS=$ac_check_lib_save_LIBS
10603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10605$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010606if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010608 LIBS="$LIBS -lbsd"
10609fi
10610
10611
10612fi
10613
Fred Drake8cef4cf2000-06-28 16:40:38 +000010614
10615fi
10616done
10617
Jack Jansendd19cf82001-12-06 22:36:17 +000010618
Brett Cannonaa5778d2008-03-18 04:09:00 +000010619# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010620for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621do :
10622 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010623if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010624 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010626_ACEOF
10627
10628fi
10629done
10630
10631
Michael W. Hudson54241132001-12-07 15:38:26 +000010632# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010633for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634do :
10635 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10636ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010637if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010642fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010643done
10644
Michael W. Hudson54241132001-12-07 15:38:26 +000010645
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010646ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010647if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010648 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010649
Martin v. Löwis1142de32002-03-29 16:28:31 +000010650else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010652 *" dup2.$ac_objext "* ) ;;
10653 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010655esac
10656
Martin v. Löwis1142de32002-03-29 16:28:31 +000010657fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010658
10659ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010660if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010661 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10662
10663else
10664 case " $LIBOBJS " in
10665 *" getcwd.$ac_objext "* ) ;;
10666 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10667 ;;
10668esac
10669
10670fi
10671
10672ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010673if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010674 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10675
10676else
10677 case " $LIBOBJS " in
10678 *" strdup.$ac_objext "* ) ;;
10679 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10680 ;;
10681esac
10682
10683fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010684
10685
10686for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687do :
10688 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010689if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010691#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010695#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010696int
10697main ()
10698{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010699getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 ;
10701 return 0;
10702}
10703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010707
Guido van Rossum627b2d71993-12-24 10:39:16 +000010708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010710
Guido van Rossum627b2d71993-12-24 10:39:16 +000010711fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010712done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010713
Jack Jansen150753c2003-03-29 22:07:47 +000010714for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715do :
10716 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010717if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010718 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010719#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010723#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010724int
10725main ()
10726{
10727setpgrp(0,0);
10728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010735
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010738
10739fi
10740done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010741
Thomas Wouters3a584202000-08-05 23:28:51 +000010742for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743do :
10744 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010745if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010751#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010752int
10753main ()
10754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010755gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010756 ;
10757 return 0;
10758}
10759_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760if ac_fn_c_try_compile "$LINENO"; then :
10761
Guido van Rossum627b2d71993-12-24 10:39:16 +000010762else
Skip Montanaro6dead952003-09-25 14:50:04 +000010763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765
Martin v. Löwis11437992002-04-12 09:54:03 +000010766
Guido van Rossum627b2d71993-12-24 10:39:16 +000010767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010769
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010771done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010772
Michael W. Hudson54241132001-12-07 15:38:26 +000010773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10775$as_echo_n "checking for major... " >&6; }
10776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010777/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010778
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010779#if defined(MAJOR_IN_MKDEV)
10780#include <sys/mkdev.h>
10781#elif defined(MAJOR_IN_SYSMACROS)
10782#include <sys/sysmacros.h>
10783#else
10784#include <sys/types.h>
10785#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010786
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010787int
10788main ()
10789{
10790
10791 makedev(major(0),minor(0));
10792
10793 ;
10794 return 0;
10795}
10796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010798
10799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010800$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10803$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010804
10805else
Skip Montanaro6dead952003-09-25 14:50:04 +000010806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10808$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010809
10810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811rm -f core conftest.err conftest.$ac_objext \
10812 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010813
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010814# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010815# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10817$as_echo_n "checking for getaddrinfo... " >&6; }
10818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010819/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010820
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010821#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010822#include <sys/socket.h>
10823#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010824#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010825
Martin v. Löwis11437992002-04-12 09:54:03 +000010826int
10827main ()
10828{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010829getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010830 ;
10831 return 0;
10832}
10833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010835 have_getaddrinfo=yes
10836else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010838fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839rm -f core conftest.err conftest.$ac_objext \
10840 conftest$ac_exeext conftest.$ac_ext
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10842$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010843if test $have_getaddrinfo = yes
10844then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10846$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010847 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010848 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010850 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010851 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010855
10856#include <sys/types.h>
10857#include <netdb.h>
10858#include <string.h>
10859#include <sys/socket.h>
10860#include <netinet/in.h>
10861
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010862int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010863{
10864 int passive, gaierr, inet4 = 0, inet6 = 0;
10865 struct addrinfo hints, *ai, *aitop;
10866 char straddr[INET6_ADDRSTRLEN], strport[16];
10867
10868 for (passive = 0; passive <= 1; passive++) {
10869 memset(&hints, 0, sizeof(hints));
10870 hints.ai_family = AF_UNSPEC;
10871 hints.ai_flags = passive ? AI_PASSIVE : 0;
10872 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010873 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010874 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10875 (void)gai_strerror(gaierr);
10876 goto bad;
10877 }
10878 for (ai = aitop; ai; ai = ai->ai_next) {
10879 if (ai->ai_addr == NULL ||
10880 ai->ai_addrlen == 0 ||
10881 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10882 straddr, sizeof(straddr), strport, sizeof(strport),
10883 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10884 goto bad;
10885 }
10886 switch (ai->ai_family) {
10887 case AF_INET:
10888 if (strcmp(strport, "54321") != 0) {
10889 goto bad;
10890 }
10891 if (passive) {
10892 if (strcmp(straddr, "0.0.0.0") != 0) {
10893 goto bad;
10894 }
10895 } else {
10896 if (strcmp(straddr, "127.0.0.1") != 0) {
10897 goto bad;
10898 }
10899 }
10900 inet4++;
10901 break;
10902 case AF_INET6:
10903 if (strcmp(strport, "54321") != 0) {
10904 goto bad;
10905 }
10906 if (passive) {
10907 if (strcmp(straddr, "::") != 0) {
10908 goto bad;
10909 }
10910 } else {
10911 if (strcmp(straddr, "::1") != 0) {
10912 goto bad;
10913 }
10914 }
10915 inet6++;
10916 break;
10917 case AF_UNSPEC:
10918 goto bad;
10919 break;
10920 default:
10921 /* another family support? */
10922 break;
10923 }
10924 }
10925 }
10926
10927 if (!(inet4 == 0 || inet4 == 2))
10928 goto bad;
10929 if (!(inet6 == 0 || inet6 == 2))
10930 goto bad;
10931
10932 if (aitop)
10933 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010934 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010935
10936 bad:
10937 if (aitop)
10938 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010939 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010940}
10941
Martin v. Löwis11437992002-04-12 09:54:03 +000010942_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010944 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010947fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010951
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010952fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010955
Benjamin Peterson75fed812010-11-01 01:47:19 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10957$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10958
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010959if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010960then
10961 if test $ipv6 = yes
10962 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010963 echo 'Fatal: You must get working getaddrinfo() function.'
10964 echo ' or you can specify "--disable-ipv6"'.
10965 exit 1
10966 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010967else
Martin v. Löwis11437992002-04-12 09:54:03 +000010968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010970
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010971fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010972
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010973for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010974do :
10975 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010976if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010977 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010978#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010979_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010980
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010981fi
10982done
10983
Michael W. Hudson54241132001-12-07 15:38:26 +000010984
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010985# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10987$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010988if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010993#include <sys/types.h>
10994#include <sys/time.h>
10995#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
Martin v. Löwis11437992002-04-12 09:54:03 +000010997int
10998main ()
10999{
11000if ((struct tm *) 0)
11001return 0;
11002 ;
11003 return 0;
11004}
11005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011007 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11014$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011015if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011017$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011018
11019fi
11020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11022$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011023if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011027/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011028#include <sys/types.h>
11029#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
Martin v. Löwis11437992002-04-12 09:54:03 +000011031int
11032main ()
11033{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011034struct tm tm;
11035 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 ;
11038 return 0;
11039}
11040_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011042 ac_cv_struct_tm=time.h
11043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011045fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11049$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011050if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011053
11054fi
11055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056ac_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 +000011057#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011060if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011061
11062cat >>confdefs.h <<_ACEOF
11063#define HAVE_STRUCT_TM_TM_ZONE 1
11064_ACEOF
11065
11066
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011067fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011068
Martin v. Löwis11437992002-04-12 09:54:03 +000011069if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011072
11073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11075"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011076if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080fi
11081
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011084_ACEOF
11085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11087$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011088if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011090else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011093#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011094#if !HAVE_DECL_TZNAME
11095extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011096#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011097
Martin v. Löwis11437992002-04-12 09:54:03 +000011098int
11099main ()
11100{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011101return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ;
11103 return 0;
11104}
11105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011107 ac_cv_var_tzname=yes
11108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011110fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111rm -f core conftest.err conftest.$ac_objext \
11112 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11115$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011116 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011119
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011120 fi
11121fi
11122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011124if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
11126cat >>confdefs.h <<_ACEOF
11127#define HAVE_STRUCT_STAT_ST_RDEV 1
11128_ACEOF
11129
11130
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011131fi
11132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011133ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011134if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011135
Martin v. Löwis11437992002-04-12 09:54:03 +000011136cat >>confdefs.h <<_ACEOF
11137#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11138_ACEOF
11139
11140
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011141fi
11142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011144if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011145
11146cat >>confdefs.h <<_ACEOF
11147#define HAVE_STRUCT_STAT_ST_FLAGS 1
11148_ACEOF
11149
11150
11151fi
11152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011154if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011155
11156cat >>confdefs.h <<_ACEOF
11157#define HAVE_STRUCT_STAT_ST_GEN 1
11158_ACEOF
11159
11160
11161fi
11162
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011164if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011165
11166cat >>confdefs.h <<_ACEOF
11167#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11168_ACEOF
11169
11170
11171fi
11172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011174if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011175
Martin v. Löwis11437992002-04-12 09:54:03 +000011176cat >>confdefs.h <<_ACEOF
11177#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11178_ACEOF
11179
11180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011182
11183else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011185 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011186 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11187 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011188esac
11189
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011190fi
11191
Michael W. Hudson54241132001-12-07 15:38:26 +000011192
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11195$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011196if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011198else
Matthias Klosec511b472010-05-08 11:01:39 +000011199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011201/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011202#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011203int
11204main ()
11205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011206return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 ;
11208 return 0;
11209}
11210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011212 ac_cv_header_time_altzone=yes
11213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011217
Martin v. Löwiseba40652007-08-30 20:10:57 +000011218fi
11219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11221$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011222if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011224$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011225
11226fi
11227
Guido van Rossumda88dad1995-01-26 00:46:29 +000011228was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11230$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011232/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011233
11234#include <sys/types.h>
11235#include <sys/select.h>
11236#include <sys/time.h>
11237
Martin v. Löwis11437992002-04-12 09:54:03 +000011238int
11239main ()
11240{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011241;
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 ;
11243 return 0;
11244}
11245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
11248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011249$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011251 was_it_defined=yes
11252
Martin v. Löwiseba40652007-08-30 20:10:57 +000011253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11256$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11259$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011260if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011261 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011264/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011265#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011266int
11267main ()
11268{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011269struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011275 ac_cv_struct_addrinfo=yes
11276else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11280fi
11281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11283$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011284if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011287
11288fi
11289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11291$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011292if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011296/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011297
11298# include <sys/types.h>
11299# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011300int
11301main ()
11302{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011303struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011309 ac_cv_struct_sockaddr_storage=yes
11310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11314fi
11315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11317$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011318if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011321
11322fi
11323
Guido van Rossum627b2d71993-12-24 10:39:16 +000011324# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11327$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011328if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011329 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011333$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011334int
11335main ()
11336{
11337static int test_array [1 - 2 * !(((char) -1) < 0)];
11338test_array [0] = 0
11339
11340 ;
11341 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011342}
Martin v. Löwis11437992002-04-12 09:54:03 +000011343_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011345 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11352$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011353if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011355
11356fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11359$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011360if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365
Martin v. Löwis11437992002-04-12 09:54:03 +000011366int
11367main ()
11368{
11369/* FIXME: Include the comments suggested by Paul. */
11370#ifndef __cplusplus
11371 /* Ultrix mips cc rejects this. */
11372 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011373 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375 char const *const *pcpcc;
11376 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 /* NEC SVR4.0.2 mips cc rejects this. */
11378 struct point {int x, y;};
11379 static struct point const zero = {0,0};
11380 /* AIX XL C 1.02.0.0 rejects this.
11381 It does not let you subtract one const X* pointer from another in
11382 an arm of an if-expression whose if-part is not a constant
11383 expression */
11384 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011385 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011386 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011387 ++pcpcc;
11388 ppc = (char**) pcpcc;
11389 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 { /* SCO 3.2v4 cc rejects this. */
11391 char *t;
11392 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011393
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011395 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 }
11397 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11398 int x[] = {25, 17};
11399 const int *foo = &x[0];
11400 ++foo;
11401 }
11402 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11403 typedef const int *iptr;
11404 iptr p = 0;
11405 ++p;
11406 }
11407 { /* AIX XL C 1.02.0.0 rejects this saying
11408 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11409 struct s { int j; const int *ap[3]; };
11410 struct s *b; b->j = 5;
11411 }
11412 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11413 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011416 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011417#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011418
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 ;
11420 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011421}
Martin v. Löwis11437992002-04-12 09:54:03 +000011422_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424 ac_cv_c_const=yes
11425else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11431$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011434$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011435
11436fi
11437
Michael W. Hudson54241132001-12-07 15:38:26 +000011438
Guido van Rossumda88dad1995-01-26 00:46:29 +000011439works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11441$as_echo_n "checking for working volatile... " >&6; }
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011443/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011444
Martin v. Löwis11437992002-04-12 09:54:03 +000011445int
11446main ()
11447{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011448volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011454 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011455else
Skip Montanaro6dead952003-09-25 14:50:04 +000011456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011457$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011458
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011459
Guido van Rossum627b2d71993-12-24 10:39:16 +000011460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11463$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011464
Guido van Rossumda88dad1995-01-26 00:46:29 +000011465works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11467$as_echo_n "checking for working signed char... " >&6; }
11468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011469/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011470
Martin v. Löwis11437992002-04-12 09:54:03 +000011471int
11472main ()
11473{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 ;
11476 return 0;
11477}
11478_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011479if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011480 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011481else
Skip Montanaro6dead952003-09-25 14:50:04 +000011482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011484
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011485
Guido van Rossum7f43da71994-08-01 12:15:30 +000011486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11489$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011490
Guido van Rossumda88dad1995-01-26 00:46:29 +000011491have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11493$as_echo_n "checking for prototypes... " >&6; }
11494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011495/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011496int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011497int
11498main ()
11499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 ;
11502 return 0;
11503}
11504_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011507$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011508
Matthias Klosec511b472010-05-08 11:01:39 +000011509 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11513$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011514
Guido van Rossumda88dad1995-01-26 00:46:29 +000011515works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11517$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011519/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011520
11521#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011522int foo(int x, ...) {
11523 va_list va;
11524 va_start(va, x);
11525 va_arg(va, int);
11526 va_arg(va, char *);
11527 va_arg(va, double);
11528 return 0;
11529}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011530
Martin v. Löwis11437992002-04-12 09:54:03 +000011531int
11532main ()
11533{
Guido van Rossum90eea071996-08-30 20:58:57 +000011534return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ;
11536 return 0;
11537}
11538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011540
11541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011544 works=yes
11545
Guido van Rossum627b2d71993-12-24 10:39:16 +000011546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11549$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011550
Martin v. Löwisd6320502004-08-12 13:45:08 +000011551# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11553$as_echo_n "checking for socketpair... " >&6; }
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011555/* end confdefs.h. */
11556
11557#include <sys/types.h>
11558#include <sys/socket.h>
11559
11560int
11561main ()
11562{
11563void *x=socketpair
11564 ;
11565 return 0;
11566}
11567_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011570$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011571
Matthias Klosec511b472010-05-08 11:01:39 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011577
11578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011580
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011581# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11583$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011586#include <sys/types.h>
11587#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011588int
11589main ()
11590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011591struct sockaddr x;
11592x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011593 ;
11594 return 0;
11595}
11596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597if ac_fn_c_try_compile "$LINENO"; then :
11598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11599$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011602
11603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011606
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011609
Guido van Rossumda88dad1995-01-26 00:46:29 +000011610va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11612$as_echo_n "checking whether va_list is an array... " >&6; }
11613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615
11616#ifdef HAVE_STDARG_PROTOTYPES
11617#include <stdarg.h>
11618#else
11619#include <varargs.h>
11620#endif
11621
Martin v. Löwis11437992002-04-12 09:54:03 +000011622int
11623main ()
11624{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011625va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 ;
11627 return 0;
11628}
11629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011630if ac_fn_c_try_compile "$LINENO"; then :
11631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011632else
Skip Montanaro6dead952003-09-25 14:50:04 +000011633
Martin v. Löwis11437992002-04-12 09:54:03 +000011634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011635$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011636
Guido van Rossumda88dad1995-01-26 00:46:29 +000011637 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011638
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11642$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011644# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011645
11646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011647ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011648if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011650 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11653$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011654 OLD_CFLAGS=$CFLAGS
11655 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011658
11659# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011660
Martin v. Löwis11437992002-04-12 09:54:03 +000011661int
11662main ()
11663{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011664
11665 char *name;
11666 struct hostent *he, *res;
11667 char buffer[2048];
11668 int buflen = 2048;
11669 int h_errnop;
11670
11671 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011672
11673 ;
11674 return 0;
11675}
11676_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011680
Martin v. Löwis11437992002-04-12 09:54:03 +000011681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011682$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11685$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011687else
Skip Montanaro6dead952003-09-25 14:50:04 +000011688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11692$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011696# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698int
11699main ()
11700{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011701
11702 char *name;
11703 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011704 char buffer[2048];
11705 int buflen = 2048;
11706 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011707
Matthias Klosec511b472010-05-08 11:01:39 +000011708 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011709
11710 ;
11711 return 0;
11712}
11713_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011714if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011716 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011717
Martin v. Löwis11437992002-04-12 09:54:03 +000011718
Matthias Klosec511b472010-05-08 11:01:39 +000011719$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11722$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011724else
Skip Montanaro6dead952003-09-25 14:50:04 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11729$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731/* end confdefs.h. */
11732
11733# include <netdb.h>
11734
11735int
11736main ()
11737{
11738
11739 char *name;
11740 struct hostent *he;
11741 struct hostent_data data;
11742
11743 (void) gethostbyname_r(name, he, &data);
11744
11745 ;
11746 return 0;
11747}
11748_ACEOF
11749if ac_fn_c_try_compile "$LINENO"; then :
11750
11751 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11752
11753
11754$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11755
11756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11757$as_echo "yes" >&6; }
11758
11759else
11760
11761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011766
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011769
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011772 CFLAGS=$OLD_CFLAGS
11773
11774else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776 for ac_func in gethostbyname
11777do :
11778 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011779if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011782_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011783
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011784fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011785done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011786
Michael W. Hudson54241132001-12-07 15:38:26 +000011787
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011788fi
11789
Michael W. Hudson54241132001-12-07 15:38:26 +000011790
11791
11792
11793
11794
11795
Guido van Rossum627b2d71993-12-24 10:39:16 +000011796# checks for system services
11797# (none yet)
11798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011799# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011801if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011803else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11805$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011806if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011808else
Martin v. Löwis11437992002-04-12 09:54:03 +000011809 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011810LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011812/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
Martin v. Löwiseba40652007-08-30 20:10:57 +000011814/* Override any GCC internal prototype to avoid an error.
11815 Use char because int might match the return type of a GCC
11816 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011817#ifdef __cplusplus
11818extern "C"
11819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011820char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011821int
11822main ()
11823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 ;
11826 return 0;
11827}
11828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011834rm -f core conftest.err conftest.$ac_objext \
11835 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011836LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11839$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011840if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 cat >>confdefs.h <<_ACEOF
11842#define HAVE_LIBIEEE 1
11843_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011844
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011845 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011846
Guido van Rossum627b2d71993-12-24 10:39:16 +000011847fi
11848
Michael W. Hudson54241132001-12-07 15:38:26 +000011849
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011850fi
11851
Michael W. Hudson54241132001-12-07 15:38:26 +000011852
Guido van Rossum7f253911997-05-09 02:42:48 +000011853# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11855$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011856
Martin v. Löwiseba40652007-08-30 20:10:57 +000011857# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011859 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011860if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011861then
11862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11866$as_echo "yes" >&6; }
11867else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11868$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011869fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11872$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011873fi
11874
Guido van Rossum7f253911997-05-09 02:42:48 +000011875
Guido van Rossum7f43da71994-08-01 12:15:30 +000011876# check for --with-libm=...
11877
Guido van Rossum563e7081996-09-10 18:20:48 +000011878case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011879Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011880BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011881*) LIBM=-lm
11882esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11884$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011885
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011888 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011889if test "$withval" = no
11890then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11892$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011893elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011894then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11896$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011897else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011898fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11901$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011902fi
11903
Guido van Rossum7f43da71994-08-01 12:15:30 +000011904
11905# check for --with-libc=...
11906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11908$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011909
Martin v. Löwiseba40652007-08-30 20:10:57 +000011910# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011911if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011912 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011913if test "$withval" = no
11914then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11916$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011917elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011918then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11920$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011921else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011922fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011923else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11925$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011926fi
11927
Guido van Rossum7f43da71994-08-01 12:15:30 +000011928
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011929# **************************************************
11930# * Check for various properties of floating point *
11931# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11934$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011935if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011936 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011937else
11938
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011940 ac_cv_little_endian_double=no
11941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011943/* end confdefs.h. */
11944
11945#include <string.h>
11946int main() {
11947 double x = 9006104071832581.0;
11948 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11949 return 0;
11950 else
11951 return 1;
11952}
11953
11954_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011956 ac_cv_little_endian_double=yes
11957else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011958 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011959fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011962fi
11963
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011964fi
11965
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11967$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011968if test "$ac_cv_little_endian_double" = yes
11969then
11970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011972
11973fi
11974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11976$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011977if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011979else
11980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011981if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011982 ac_cv_big_endian_double=no
11983else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011985/* end confdefs.h. */
11986
11987#include <string.h>
11988int main() {
11989 double x = 9006104071832581.0;
11990 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
11991 return 0;
11992 else
11993 return 1;
11994}
11995
11996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011997if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011998 ac_cv_big_endian_double=yes
11999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012004fi
12005
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012006fi
12007
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12009$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012010if test "$ac_cv_big_endian_double" = yes
12011then
12012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012014
12015fi
12016
12017# Some ARM platforms use a mixed-endian representation for doubles.
12018# While Python doesn't currently have full support for these platforms
12019# (see e.g., issue 1762561), we can at least make sure that float <-> string
12020# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12022$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012023if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012025else
12026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012027if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012028 ac_cv_mixed_endian_double=no
12029else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012031/* end confdefs.h. */
12032
12033#include <string.h>
12034int main() {
12035 double x = 9006104071832581.0;
12036 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12037 return 0;
12038 else
12039 return 1;
12040}
12041
12042_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012044 ac_cv_mixed_endian_double=yes
12045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012046 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12049 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012050fi
12051
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012052fi
12053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12055$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012056if test "$ac_cv_mixed_endian_double" = yes
12057then
12058
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012060
12061fi
12062
12063# The short float repr introduced in Python 3.1 requires the
12064# correctly-rounded string <-> double conversion functions from
12065# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12066# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012067# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012068# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012069
12070# This inline assembler syntax may also work for suncc and icc,
12071# so we try it on all platforms.
12072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12074$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012076/* end confdefs.h. */
12077
12078int
12079main ()
12080{
12081
Mark Dickinsona548dee2009-11-15 13:12:43 +000012082 unsigned short cw;
12083 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12084 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012085
12086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012091 have_gcc_asm_for_x87=yes
12092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012094fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12097$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012098if test "$have_gcc_asm_for_x87" = yes
12099then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012102
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012103fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012104
Mark Dickinson04b27232009-01-04 12:29:36 +000012105# Detect whether system arithmetic is subject to x87-style double
12106# rounding issues. The result of this test has little meaning on non
12107# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12108# mode is round-to-nearest and double rounding issues are present, and
12109# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12111$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012112# $BASECFLAGS may affect the result
12113ac_save_cc="$CC"
12114CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012115if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012116 ac_cv_x87_double_rounding=no
12117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012119/* end confdefs.h. */
12120
12121#include <stdlib.h>
12122#include <math.h>
12123int main() {
12124 volatile double x, y, z;
12125 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12126 x = 0.99999999999999989; /* 1-2**-53 */
12127 y = 1./x;
12128 if (y != 1.)
12129 exit(0);
12130 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12131 x = 1e16;
12132 y = 2.99999;
12133 z = x + y;
12134 if (z != 1e16+4.)
12135 exit(0);
12136 /* both tests show evidence of double rounding */
12137 exit(1);
12138}
12139
12140_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012141if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012142 ac_cv_x87_double_rounding=no
12143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012144 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012148fi
12149
Mark Dickinson99abd142009-10-24 13:44:16 +000012150CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12152$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012153if test "$ac_cv_x87_double_rounding" = yes
12154then
12155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012157
12158fi
12159
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012160# ************************************
12161# * Check for mathematical functions *
12162# ************************************
12163
12164LIBS_SAVE=$LIBS
12165LIBS="$LIBS $LIBM"
12166
Mark Dickinson265d7382008-04-21 22:32:24 +000012167# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12168# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12170$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012171if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012173else
12174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012175if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012176 ac_cv_tanh_preserves_zero_sign=no
12177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012179/* end confdefs.h. */
12180
12181#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012182#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012183int main() {
12184 /* return 0 if either negative zeros don't exist
12185 on this platform or if negative zeros exist
12186 and tanh(-0.) == -0. */
12187 if (atan2(0., -1.) == atan2(-0., -1.) ||
12188 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12189 else exit(1);
12190}
12191
12192_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012194 ac_cv_tanh_preserves_zero_sign=yes
12195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012200fi
12201
Mark Dickinson265d7382008-04-21 22:32:24 +000012202fi
12203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12205$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012206if test "$ac_cv_tanh_preserves_zero_sign" = yes
12207then
12208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012210
12211fi
12212
Mark Dickinson65898e02009-09-05 10:27:00 +000012213for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214do :
12215 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12216ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012217if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012218 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012220_ACEOF
12221
12222fi
12223done
12224
Mark Dickinson65898e02009-09-05 10:27:00 +000012225for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012226do :
12227 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12228ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012229if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012230 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012232_ACEOF
12233
12234fi
12235done
12236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12238"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012239if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012243fi
12244
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012245cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12249"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012250if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012254fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012255
12256cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12260"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012261if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012265fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012266
12267cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012269_ACEOF
12270
12271
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012272LIBS=$LIBS_SAVE
12273
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012274# For multiprocessing module, check that sem_open
12275# actually works. For FreeBSD versions <= 7.2,
12276# the kernel module that provides POSIX semaphores
12277# isn't loaded by default, so an attempt to call
12278# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12280$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012281if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012285 ac_cv_posix_semaphores_enabled=yes
12286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012288/* end confdefs.h. */
12289
12290#include <unistd.h>
12291#include <fcntl.h>
12292#include <stdio.h>
12293#include <semaphore.h>
12294#include <sys/stat.h>
12295
12296int main(void) {
12297 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12298 if (a == SEM_FAILED) {
12299 perror("sem_open");
12300 return 1;
12301 }
12302 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012303 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012304 return 0;
12305}
12306
12307_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012309 ac_cv_posix_semaphores_enabled=yes
12310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012311 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012315fi
12316
12317
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012318fi
12319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12321$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012322if test $ac_cv_posix_semaphores_enabled = no
12323then
12324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012326
12327fi
12328
12329# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12331$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012332if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012334else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012336 ac_cv_broken_sem_getvalue=yes
12337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012339/* end confdefs.h. */
12340
12341#include <unistd.h>
12342#include <fcntl.h>
12343#include <stdio.h>
12344#include <semaphore.h>
12345#include <sys/stat.h>
12346
12347int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012348 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012349 int count;
12350 int res;
12351 if(a==SEM_FAILED){
12352 perror("sem_open");
12353 return 1;
12354
12355 }
12356 res = sem_getvalue(a, &count);
12357 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012358 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012359 return res==-1 ? 1 : 0;
12360}
12361
12362_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012363if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012364 ac_cv_broken_sem_getvalue=no
12365else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012366 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12369 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012370fi
12371
12372
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012373fi
12374
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12376$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012377if test $ac_cv_broken_sem_getvalue = yes
12378then
12379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012380$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012381
12382fi
12383
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012384# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12386$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012387# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012389 enableval=$enable_big_digits; case $enable_big_digits in
12390yes)
12391 enable_big_digits=30 ;;
12392no)
12393 enable_big_digits=15 ;;
1239415|30)
12395 ;;
12396*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012397 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012398esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12400$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012401
12402cat >>confdefs.h <<_ACEOF
12403#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12404_ACEOF
12405
12406
12407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12409$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012410fi
12411
12412
Guido van Rossumef2255b2000-03-10 22:30:29 +000012413# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012415if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012416
12417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012418$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012420 wchar_h="yes"
12421
Guido van Rossumef2255b2000-03-10 22:30:29 +000012422else
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012424
12425fi
12426
Michael W. Hudson54241132001-12-07 15:38:26 +000012427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012429# determine wchar_t size
12430if test "$wchar_h" = yes
12431then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012433# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12434# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12435# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12437$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012438if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12442"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445 if test "$ac_cv_type_wchar_t" = yes; then
12446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012448as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012449See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450 else
12451 ac_cv_sizeof_wchar_t=0
12452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012453fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454
Martin v. Löwis11437992002-04-12 09:54:03 +000012455fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12457$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012458
12459
12460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012462#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012463_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012464
Michael W. Hudson54241132001-12-07 15:38:26 +000012465
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012466fi
12467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12469$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012470have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012473
12474#include <tcl.h>
12475#if TCL_UTF_MAX != 6
12476# error "NOT UCS4_TCL"
12477#endif
12478int
12479main ()
12480{
12481
12482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012487
12488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012490
12491 have_ucs4_tcl=yes
12492
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12496$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012497
Skip Montanaro6dead952003-09-25 14:50:04 +000012498# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012499if test "$wchar_h" = yes
12500then
12501 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12503$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012504 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012505 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012506else
12507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012509 ac_cv_wchar_t_signed=yes
12510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012512/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012513
12514 #include <wchar.h>
12515 int main()
12516 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012517 /* Success: exit code 0 */
12518 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012519 }
12520
12521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012522if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012523 ac_cv_wchar_t_signed=yes
12524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012526fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012529fi
12530
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012531fi
12532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12534$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012535fi
12536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12538$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012539# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012542else
12543 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012544fi
12545
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012546
12547if test $enable_unicode = yes
12548then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012549 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012550 case "$have_ucs4_tcl" in
12551 yes) enable_unicode="ucs4"
12552 ;;
12553 *) enable_unicode="ucs2"
12554 ;;
12555 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012556fi
12557
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012558
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012559case "$enable_unicode" in
12560ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012561 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012562
12563 ;;
12564ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012566
12567 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020012568no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010012569*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012570esac
12571
Michael W. Hudson54241132001-12-07 15:38:26 +000012572
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
12574
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012575if test "$enable_unicode" = "no"
12576then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012577 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12579$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012580else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012581 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012584
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012585
12586 # wchar_t is only usable if it maps to an unsigned type
12587 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012588 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012589 then
12590 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012591
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012592$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012594 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012595
12596 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12597 then
12598 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012600
12601 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12602 then
12603 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012605
12606 else
12607 PY_UNICODE_TYPE="no type found"
12608 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12610$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012611fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012612
12613# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12615$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012616if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012619 ac_cv_c_bigendian=unknown
12620 # See if we're dealing with a universal compiler.
12621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12622/* end confdefs.h. */
12623#ifndef __APPLE_CC__
12624 not a universal capable compiler
12625 #endif
12626 typedef int dummy;
12627
Skip Montanaro6dead952003-09-25 14:50:04 +000012628_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629if ac_fn_c_try_compile "$LINENO"; then :
12630
12631 # Check for potential -arch flags. It is not universal unless
12632 # there are at least two -arch flags with different values.
12633 ac_arch=
12634 ac_prev=
12635 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12636 if test -n "$ac_prev"; then
12637 case $ac_word in
12638 i?86 | x86_64 | ppc | ppc64)
12639 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12640 ac_arch=$ac_word
12641 else
12642 ac_cv_c_bigendian=universal
12643 break
12644 fi
12645 ;;
12646 esac
12647 ac_prev=
12648 elif test "x$ac_word" = "x-arch"; then
12649 ac_prev=arch
12650 fi
12651 done
12652fi
12653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12654 if test $ac_cv_c_bigendian = unknown; then
12655 # See if sys/param.h defines the BYTE_ORDER macro.
12656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012657/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012658#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012659 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012660
Martin v. Löwis11437992002-04-12 09:54:03 +000012661int
12662main ()
12663{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12665 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12666 && LITTLE_ENDIAN)
12667 bogus endian macros
12668 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
12670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012674if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012675 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012677/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012678#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681int
12682main ()
12683{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012684#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685 not big endian
12686 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
12688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012692if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012693 ac_cv_c_bigendian=yes
12694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012698fi
12699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12700 fi
12701 if test $ac_cv_c_bigendian = unknown; then
12702 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705#include <limits.h>
12706
Martin v. Löwis11437992002-04-12 09:54:03 +000012707int
12708main ()
12709{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12711 bogus endian macros
12712 #endif
12713
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 ;
12715 return 0;
12716}
12717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012718if ac_fn_c_try_compile "$LINENO"; then :
12719 # It does; now see whether it defined to _BIG_ENDIAN or not.
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h. */
12722#include <limits.h>
12723
12724int
12725main ()
12726{
12727#ifndef _BIG_ENDIAN
12728 not big endian
12729 #endif
12730
12731 ;
12732 return 0;
12733}
12734_ACEOF
12735if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012736 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12741fi
12742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12743 fi
12744 if test $ac_cv_c_bigendian = unknown; then
12745 # Compile a test program.
12746 if test "$cross_compiling" = yes; then :
12747 # Try to guess by grepping values from an object file.
12748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749/* end confdefs.h. */
12750short int ascii_mm[] =
12751 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12752 short int ascii_ii[] =
12753 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12754 int use_ascii (int i) {
12755 return ascii_mm[i] + ascii_ii[i];
12756 }
12757 short int ebcdic_ii[] =
12758 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12759 short int ebcdic_mm[] =
12760 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12761 int use_ebcdic (int i) {
12762 return ebcdic_mm[i] + ebcdic_ii[i];
12763 }
12764 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766int
12767main ()
12768{
12769return use_ascii (foo) == use_ebcdic (foo);
12770 ;
12771 return 0;
12772}
12773_ACEOF
12774if ac_fn_c_try_compile "$LINENO"; then :
12775 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12776 ac_cv_c_bigendian=yes
12777 fi
12778 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12779 if test "$ac_cv_c_bigendian" = unknown; then
12780 ac_cv_c_bigendian=no
12781 else
12782 # finding both strings is unlikely to happen, but who knows?
12783 ac_cv_c_bigendian=unknown
12784 fi
12785 fi
12786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012791$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012792int
12793main ()
12794{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796 /* Are we little or big endian? From Harbison&Steele. */
12797 union
12798 {
12799 long int l;
12800 char c[sizeof (long int)];
12801 } u;
12802 u.l = 1;
12803 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804
12805 ;
12806 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012807}
Martin v. Löwis11437992002-04-12 09:54:03 +000012808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012810 ac_cv_c_bigendian=no
12811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12821$as_echo "$ac_cv_c_bigendian" >&6; }
12822 case $ac_cv_c_bigendian in #(
12823 yes)
12824 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12825;; #(
12826 no)
12827 ;; #(
12828 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832 ;; #(
12833 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012834 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010012835 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012837
Michael W. Hudson54241132001-12-07 15:38:26 +000012838
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012839# Check whether right shifting a negative integer extends the sign bit
12840# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12842$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012843if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012844 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012845else
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012848 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012851/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012852
12853int main()
12854{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012855 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012856}
12857
Martin v. Löwis11437992002-04-12 09:54:03 +000012858_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012860 ac_cv_rshift_extends_sign=yes
12861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012866fi
12867
Martin v. Löwiseba40652007-08-30 20:10:57 +000012868fi
12869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12871$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012872if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012873then
Martin v. Löwis11437992002-04-12 09:54:03 +000012874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012876
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012877fi
12878
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012879# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12881$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012882if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012883 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012884else
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012887/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012888#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012889int
12890main ()
12891{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012892
12893 FILE *f = fopen("/dev/null", "r");
12894 flockfile(f);
12895 getc_unlocked(f);
12896 funlockfile(f);
12897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898 ;
12899 return 0;
12900}
12901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012903 ac_cv_have_getc_unlocked=yes
12904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 ac_cv_have_getc_unlocked=no
12906fi
12907rm -f core conftest.err conftest.$ac_objext \
12908 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12912$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012913if test "$ac_cv_have_getc_unlocked" = yes
12914then
Martin v. Löwis11437992002-04-12 09:54:03 +000012915
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012917
12918fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012919
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012920# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012921# save the value of LIBS so we don't actually link Python with readline
12922LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012923
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012924# On some systems we need to link readline to a termcap compatible
12925# library. NOTE: Keep the precedence of listed libraries synchronised
12926# with setup.py.
12927py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12929$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012930for py_libtermcap in "" ncursesw ncurses curses termcap; do
12931 if test -z "$py_libtermcap"; then
12932 READLINE_LIBS="-lreadline"
12933 else
12934 READLINE_LIBS="-lreadline -l$py_libtermcap"
12935 fi
12936 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012938/* end confdefs.h. */
12939
Martin v. Löwiseba40652007-08-30 20:10:57 +000012940/* Override any GCC internal prototype to avoid an error.
12941 Use char because int might match the return type of a GCC
12942 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012943#ifdef __cplusplus
12944extern "C"
12945#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012946char readline ();
12947int
12948main ()
12949{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012956 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012957fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012958rm -f core conftest.err conftest.$ac_objext \
12959 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012960 if test $py_cv_lib_readline = yes; then
12961 break
12962 fi
12963done
12964# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12965#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012966if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12968$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012969else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12971$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012972
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012974
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012975fi
12976
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012977# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12979$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012980if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012981 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012982else
12983 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000012984LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012986/* end confdefs.h. */
12987
Martin v. Löwiseba40652007-08-30 20:10:57 +000012988/* Override any GCC internal prototype to avoid an error.
12989 Use char because int might match the return type of a GCC
12990 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012991#ifdef __cplusplus
12992extern "C"
12993#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012994char rl_callback_handler_install ();
12995int
12996main ()
12997{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012999 ;
13000 return 0;
13001}
13002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013004 ac_cv_lib_readline_rl_callback_handler_install=yes
13005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013006 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008rm -f core conftest.err conftest.$ac_objext \
13009 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013010LIBS=$ac_check_lib_save_LIBS
13011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13013$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013014if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013017
13018fi
13019
13020
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013021# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013024#include <readline/readline.h>
13025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013027 have_readline=yes
13028else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013029 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013030
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013031fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013032rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013033if test $have_readline = yes
13034then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013037#include <readline/readline.h>
13038
13039_ACEOF
13040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013044
13045fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013046rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013049/* end confdefs.h. */
13050#include <readline/readline.h>
13051
13052_ACEOF
13053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013057
13058fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013059rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013060
13061fi
13062
Martin v. Löwis0daad592001-09-30 21:09:59 +000013063# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13065$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013066if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013068else
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013070LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074/* Override any GCC internal prototype to avoid an error.
13075 Use char because int might match the return type of a GCC
13076 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013077#ifdef __cplusplus
13078extern "C"
13079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013080char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013081int
13082main ()
13083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013084return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094rm -f core conftest.err conftest.$ac_objext \
13095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013096LIBS=$ac_check_lib_save_LIBS
13097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13099$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013100if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013103
Martin v. Löwis0daad592001-09-30 21:09:59 +000013104fi
13105
Michael W. Hudson54241132001-12-07 15:38:26 +000013106
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013107# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13109$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013110if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013112else
13113 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013114LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013116/* end confdefs.h. */
13117
13118/* Override any GCC internal prototype to avoid an error.
13119 Use char because int might match the return type of a GCC
13120 builtin and then its argument prototype would still apply. */
13121#ifdef __cplusplus
13122extern "C"
13123#endif
13124char rl_completion_display_matches_hook ();
13125int
13126main ()
13127{
13128return rl_completion_display_matches_hook ();
13129 ;
13130 return 0;
13131}
13132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013134 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138rm -f core conftest.err conftest.$ac_objext \
13139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013140LIBS=$ac_check_lib_save_LIBS
13141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13143$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013144if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013147
13148fi
13149
13150
Martin v. Löwis0daad592001-09-30 21:09:59 +000013151# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13153$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013154if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013156else
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013158LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013161
Martin v. Löwiseba40652007-08-30 20:10:57 +000013162/* Override any GCC internal prototype to avoid an error.
13163 Use char because int might match the return type of a GCC
13164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013165#ifdef __cplusplus
13166extern "C"
13167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013168char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013169int
13170main ()
13171{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013172return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013173 ;
13174 return 0;
13175}
13176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182rm -f core conftest.err conftest.$ac_objext \
13183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013184LIBS=$ac_check_lib_save_LIBS
13185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13187$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013188if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013189
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013190$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013191
Guido van Rossum353ae582001-07-10 16:45:32 +000013192fi
13193
Jack Jansendd19cf82001-12-06 22:36:17 +000013194
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013195# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013197/* end confdefs.h. */
13198#include <readline/readline.h>
13199_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013201 have_readline=yes
13202else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013203 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013204
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013205fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013206rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013207if test $have_readline = yes
13208then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013210/* end confdefs.h. */
13211#include <readline/readline.h>
13212
13213_ACEOF
13214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013216
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013218
13219fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013220rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013221
13222fi
13223
Martin v. Löwis82bca632006-02-10 20:49:30 +000013224# End of readline checks: restore LIBS
13225LIBS=$LIBS_no_readline
13226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13228$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013229if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013231else
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013234 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013237/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013238
13239int main()
13240{
13241 int val1 = nice(1);
13242 if (val1 != -1 && val1 == nice(2))
13243 exit(0);
13244 exit(1);
13245}
13246
Martin v. Löwis11437992002-04-12 09:54:03 +000013247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013249 ac_cv_broken_nice=yes
13250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013252fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13254 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013255fi
13256
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257fi
13258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13260$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013261if test "$ac_cv_broken_nice" = yes
13262then
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013265
13266fi
13267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13269$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013270if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013274 ac_cv_broken_poll=no
13275else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013277/* end confdefs.h. */
13278
13279#include <poll.h>
13280
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013281int main()
13282{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013283 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013284 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013285
13286 close (42);
13287
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013288 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013289 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013290 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013291 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013292 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013293 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013294 return 1;
13295}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013296
13297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013299 ac_cv_broken_poll=yes
13300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13304 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013306
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013307fi
13308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13310$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013311if test "$ac_cv_broken_poll" = yes
13312then
13313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013314$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013315
13316fi
13317
Brett Cannon43802422005-02-10 20:48:03 +000013318# 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 +000013319# (which is not required by ISO C or UNIX spec) and/or if we support
13320# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321ac_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 +000013322#include <$ac_cv_struct_tm>
13323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013324"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013325if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013326
13327cat >>confdefs.h <<_ACEOF
13328#define HAVE_STRUCT_TM_TM_ZONE 1
13329_ACEOF
13330
13331
13332fi
13333
13334if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013337
13338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13340"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013341if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013343else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013344 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013345fi
13346
Martin v. Löwiseba40652007-08-30 20:10:57 +000013347cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013349_ACEOF
13350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13352$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013353if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013354 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013357/* end confdefs.h. */
13358#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013359#if !HAVE_DECL_TZNAME
13360extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013361#endif
13362
13363int
13364main ()
13365{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013366return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013367 ;
13368 return 0;
13369}
13370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013372 ac_cv_var_tzname=yes
13373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013375fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376rm -f core conftest.err conftest.$ac_objext \
13377 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13380$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013381 if test $ac_cv_var_tzname = yes; then
13382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013384
13385 fi
13386fi
13387
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013388
Martin v. Löwis1d459062005-03-14 21:23:33 +000013389# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13391$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013392if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013394else
13395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013396if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013397 ac_cv_working_tzset=no
13398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013401
13402#include <stdlib.h>
13403#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013404#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013405
13406#if HAVE_TZNAME
13407extern char *tzname[];
13408#endif
13409
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013410int main()
13411{
Brett Cannon18367812003-09-19 00:59:16 +000013412 /* Note that we need to ensure that not only does tzset(3)
13413 do 'something' with localtime, but it works as documented
13414 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013415 This includes making sure that tzname is set properly if
13416 tm->tm_zone does not exist since it is the alternative way
13417 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013418
13419 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013420 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013421 */
13422
Martin v. Löwis1d459062005-03-14 21:23:33 +000013423 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013424 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13425
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013426 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013427 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013428 if (localtime(&groundhogday)->tm_hour != 0)
13429 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013430#if HAVE_TZNAME
13431 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13432 if (strcmp(tzname[0], "UTC") ||
13433 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13434 exit(1);
13435#endif
Brett Cannon18367812003-09-19 00:59:16 +000013436
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013437 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013438 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013439 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013440 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013441#if HAVE_TZNAME
13442 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13443 exit(1);
13444#endif
Brett Cannon18367812003-09-19 00:59:16 +000013445
13446 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13447 tzset();
13448 if (localtime(&groundhogday)->tm_hour != 11)
13449 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013450#if HAVE_TZNAME
13451 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13452 exit(1);
13453#endif
13454
13455#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013456 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13457 exit(1);
13458 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13459 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013460#endif
Brett Cannon18367812003-09-19 00:59:16 +000013461
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013462 exit(0);
13463}
13464
13465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013467 ac_cv_working_tzset=yes
13468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013470fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13472 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013473fi
13474
Martin v. Löwiseba40652007-08-30 20:10:57 +000013475fi
13476
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13478$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013479if test "$ac_cv_working_tzset" = yes
13480then
13481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013482$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013483
13484fi
13485
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013486# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13488$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013489if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013490 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013493/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013494#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013495int
13496main ()
13497{
13498
13499struct stat st;
13500st.st_mtim.tv_nsec = 1;
13501
13502 ;
13503 return 0;
13504}
13505_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013507 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013509 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013510fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13512fi
13513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13515$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013516if test "$ac_cv_stat_tv_nsec" = yes
13517then
13518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013520
13521fi
13522
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013523# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13525$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013526if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013530/* end confdefs.h. */
13531#include <sys/stat.h>
13532int
13533main ()
13534{
13535
13536struct stat st;
13537st.st_mtimespec.tv_nsec = 1;
13538
13539 ;
13540 return 0;
13541}
13542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013544 ac_cv_stat_tv_nsec2=yes
13545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013546 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13549fi
13550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13552$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013553if test "$ac_cv_stat_tv_nsec2" = yes
13554then
13555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013557
13558fi
13559
Jack Jansen666b1e72001-10-31 12:11:48 +000013560# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13562$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013563if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013567/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013568#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013569int
13570main ()
13571{
Jack Jansen666b1e72001-10-31 12:11:48 +000013572
13573 int rtn;
13574 rtn = mvwdelch(0,0,0);
13575
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 ;
13577 return 0;
13578}
13579_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013581 ac_cv_mvwdelch_is_expression=yes
13582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13586fi
13587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13589$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013590
13591if test "$ac_cv_mvwdelch_is_expression" = yes
13592then
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013594$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013595
13596fi
13597
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13599$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013600if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013604/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013605#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013606int
13607main ()
13608{
Jack Jansen666b1e72001-10-31 12:11:48 +000013609
13610 WINDOW *w;
13611 w->_flags = 0;
13612
Martin v. Löwis11437992002-04-12 09:54:03 +000013613 ;
13614 return 0;
13615}
13616_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013617if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013618 ac_cv_window_has_flags=yes
13619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13623fi
13624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13626$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013627
Jack Jansen666b1e72001-10-31 12:11:48 +000013628
13629if test "$ac_cv_window_has_flags" = yes
13630then
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013633
13634fi
13635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13637$as_echo_n "checking for is_term_resized... " >&6; }
13638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013639/* end confdefs.h. */
13640#include <curses.h>
13641int
13642main ()
13643{
13644void *x=is_term_resized
13645 ;
13646 return 0;
13647}
13648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013652
Matthias Klosec511b472010-05-08 11:01:39 +000013653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13657$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013658
13659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13663$as_echo_n "checking for resize_term... " >&6; }
13664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013665/* end confdefs.h. */
13666#include <curses.h>
13667int
13668main ()
13669{
13670void *x=resize_term
13671 ;
13672 return 0;
13673}
13674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013678
Matthias Klosec511b472010-05-08 11:01:39 +000013679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13683$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013684
13685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13689$as_echo_n "checking for resizeterm... " >&6; }
13690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013691/* end confdefs.h. */
13692#include <curses.h>
13693int
13694main ()
13695{
13696void *x=resizeterm
13697 ;
13698 return 0;
13699}
13700_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013704
Matthias Klosec511b472010-05-08 11:01:39 +000013705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13709$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013710
13711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13713
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13715$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013716
13717if test -r /dev/ptmx
13718then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13720$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013722$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013723
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13726$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013727fi
13728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13730$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013731
13732if test -r /dev/ptc
13733then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13735$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013736
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013737$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013738
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013739else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13741$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013742fi
13743
Mark Dickinson82864d12009-11-15 16:18:58 +000013744if test "$have_long_long" = yes
13745then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13747$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013748 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013752 ac_cv_have_long_long_format=no
13753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013755/* end confdefs.h. */
13756
13757 #include <stdio.h>
13758 #include <stddef.h>
13759 #include <string.h>
13760
13761 #ifdef HAVE_SYS_TYPES_H
13762 #include <sys/types.h>
13763 #endif
13764
13765 int main()
13766 {
13767 char buffer[256];
13768
13769 if (sprintf(buffer, "%lld", (long long)123) < 0)
13770 return 1;
13771 if (strcmp(buffer, "123"))
13772 return 1;
13773
13774 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13775 return 1;
13776 if (strcmp(buffer, "-123"))
13777 return 1;
13778
13779 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13780 return 1;
13781 if (strcmp(buffer, "123"))
13782 return 1;
13783
13784 return 0;
13785 }
13786
13787_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013788if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013789 ac_cv_have_long_long_format=yes
13790else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013791 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013792fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013795fi
13796
13797
Mark Dickinson82864d12009-11-15 16:18:58 +000013798fi
13799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13801$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013802fi
13803
Mark Dickinson5ce84742009-12-31 20:48:04 +000013804if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013805then
13806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013808
13809fi
13810
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013811if test $ac_sys_system = Darwin
13812then
13813 LIBS="$LIBS -framework CoreFoundation"
13814fi
13815
Mark Dickinson82864d12009-11-15 16:18:58 +000013816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13818$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013819if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013823 ac_cv_have_size_t_format="cross -- assuming yes"
13824
Brett Cannon09d12362006-05-11 05:11:33 +000013825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013827/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013828
Brett Cannon09d12362006-05-11 05:11:33 +000013829#include <stdio.h>
13830#include <stddef.h>
13831#include <string.h>
13832
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013833#ifdef HAVE_SYS_TYPES_H
13834#include <sys/types.h>
13835#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013836
13837#ifdef HAVE_SSIZE_T
13838typedef ssize_t Py_ssize_t;
13839#elif SIZEOF_VOID_P == SIZEOF_LONG
13840typedef long Py_ssize_t;
13841#else
13842typedef int Py_ssize_t;
13843#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013844
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013845int main()
13846{
13847 char buffer[256];
13848
Brett Cannon09d12362006-05-11 05:11:33 +000013849 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13850 return 1;
13851
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013852 if (strcmp(buffer, "123"))
13853 return 1;
13854
13855 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13856 return 1;
13857
13858 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013859 return 1;
13860
13861 return 0;
13862}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013863
Brett Cannon09d12362006-05-11 05:11:33 +000013864_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013866 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13871 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013872fi
13873
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13876$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013877if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013880
13881fi
13882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013884#ifdef HAVE_SYS_TYPES_H
13885#include <sys/types.h>
13886#endif
13887#ifdef HAVE_SYS_SOCKET_H
13888#include <sys/socket.h>
13889#endif
13890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013891"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013892if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013893
Martin v. Löwis11437992002-04-12 09:54:03 +000013894else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013895
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013896$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013897
13898fi
13899
Michael W. Hudson54241132001-12-07 15:38:26 +000013900
Benjamin Peterson7497e912010-10-16 00:53:39 +000013901case $ac_sys_system in
13902AIX*)
13903
13904$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13905 ;;
13906esac
13907
13908
Michael W. Hudson54241132001-12-07 15:38:26 +000013909
13910
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013911for h in `(cd $srcdir;echo Python/thread_*.h)`
13912do
13913 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13914done
13915
Michael W. Hudson54241132001-12-07 15:38:26 +000013916
Neal Norwitzd24499d2005-12-18 21:36:39 +000013917SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13919$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013920for dir in $SRCDIRS; do
13921 if test ! -d $dir; then
13922 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013923 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013924done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13926$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013927
Guido van Rossum627b2d71993-12-24 10:39:16 +000013928# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013929ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013930
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013931ac_config_files="$ac_config_files Modules/ld_so_aix"
13932
Martin v. Löwis11437992002-04-12 09:54:03 +000013933cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013934# This file is a shell script that caches the results of configure
13935# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013936# scripts and configure runs, see configure's option --config-cache.
13937# It is not useful on other systems. If it contains results you don't
13938# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013939#
Martin v. Löwis11437992002-04-12 09:54:03 +000013940# config.status only pays attention to the cache file if you give it
13941# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013942#
Skip Montanaro6dead952003-09-25 14:50:04 +000013943# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013944# loading this file, other *unset* `ac_cv_foo' will be assigned the
13945# following values.
13946
13947_ACEOF
13948
Guido van Rossumf78abae1997-01-21 22:02:36 +000013949# The following way of writing the cache mishandles newlines in values,
13950# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013952# Ultrix sh set writes to stderr and can't be redirected directly,
13953# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954(
13955 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13956 eval ac_val=\$$ac_var
13957 case $ac_val in #(
13958 *${as_nl}*)
13959 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013960 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13961$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013962 esac
13963 case $ac_var in #(
13964 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13966 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967 esac ;;
13968 esac
13969 done
13970
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013972 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13973 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013974 # `set' does not quote correctly, so add quotes: double-quote
13975 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013976 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013977 "s/'/'\\\\''/g;
13978 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 *)
13981 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013982 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000013983 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013984 esac |
13985 sort
13986) |
Martin v. Löwis11437992002-04-12 09:54:03 +000013987 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000013988 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13992 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000013993 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13994 :end' >>confcache
13995if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13996 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010013997 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13999$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014000 if test ! -f "$cache_file" || test -h "$cache_file"; then
14001 cat confcache >"$cache_file"
14002 else
14003 case $cache_file in #(
14004 */* | ?:*)
14005 mv -f confcache "$cache_file"$$ &&
14006 mv -f "$cache_file"$$ "$cache_file" ;; #(
14007 *)
14008 mv -f confcache "$cache_file" ;;
14009 esac
14010 fi
14011 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014012 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014013 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14014$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014015 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014017rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014018
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014019test "x$prefix" = xNONE && prefix=$ac_default_prefix
14020# Let make expand exec_prefix.
14021test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014023DEFS=-DHAVE_CONFIG_H
14024
Skip Montanaro6dead952003-09-25 14:50:04 +000014025ac_libobjs=
14026ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014027U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014028for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14029 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014032 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14033 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014034 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14035 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014036done
14037LIBOBJS=$ac_libobjs
14038
14039LTLIBOBJS=$ac_ltlibobjs
14040
14041
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043
Matthias Klose3cef2a92012-03-14 23:39:33 +010014044: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014046ac_clean_files_save=$ac_clean_files
14047ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014048{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14049$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14050as_write_fail=0
14051cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014052#! $SHELL
14053# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014054# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014055# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014056# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014057
Martin v. Löwis11437992002-04-12 09:54:03 +000014058debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014059ac_cs_recheck=false
14060ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062SHELL=\${CONFIG_SHELL-$SHELL}
14063export SHELL
14064_ASEOF
14065cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14066## -------------------- ##
14067## M4sh Initialization. ##
14068## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014069
Martin v. Löwiseba40652007-08-30 20:10:57 +000014070# Be more Bourne compatible
14071DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014072if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 emulate sh
14074 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014075 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014076 # is contrary to our usage. Disable this feature.
14077 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080 case `(set -o) 2>/dev/null` in #(
14081 *posix*) :
14082 set -o posix ;; #(
14083 *) :
14084 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014086fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014087
Skip Montanaro6dead952003-09-25 14:50:04 +000014088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089as_nl='
14090'
14091export as_nl
14092# Printing a long string crashes Solaris 7 /usr/bin/printf.
14093as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14094as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14095as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14096# Prefer a ksh shell builtin over an external printf program on Solaris,
14097# but without wasting forks for bash or zsh.
14098if test -z "$BASH_VERSION$ZSH_VERSION" \
14099 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14100 as_echo='print -r --'
14101 as_echo_n='print -rn --'
14102elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14103 as_echo='printf %s\n'
14104 as_echo_n='printf %s'
14105else
14106 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14107 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14108 as_echo_n='/usr/ucb/echo -n'
14109 else
14110 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14111 as_echo_n_body='eval
14112 arg=$1;
14113 case $arg in #(
14114 *"$as_nl"*)
14115 expr "X$arg" : "X\\(.*\\)$as_nl";
14116 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14117 esac;
14118 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14119 '
14120 export as_echo_n_body
14121 as_echo_n='sh -c $as_echo_n_body as_echo'
14122 fi
14123 export as_echo_body
14124 as_echo='sh -c $as_echo_body as_echo'
14125fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
14127# The user is always right.
14128if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129 PATH_SEPARATOR=:
14130 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14131 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14132 PATH_SEPARATOR=';'
14133 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014134fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014135
Martin v. Löwiseba40652007-08-30 20:10:57 +000014136
14137# IFS
14138# We need space, tab and new line, in precisely that order. Quoting is
14139# there to prevent editors from complaining about space-tab.
14140# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14141# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014142IFS=" "" $as_nl"
14143
14144# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014145as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014146case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014147 *[\\/]* ) as_myself=$0 ;;
14148 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014149for as_dir in $PATH
14150do
14151 IFS=$as_save_IFS
14152 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014153 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14154 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014155IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014156
Martin v. Löwiseba40652007-08-30 20:10:57 +000014157 ;;
14158esac
14159# We did not find ourselves, most probably we were run as `sh COMMAND'
14160# in which case we are not to be found in the path.
14161if test "x$as_myself" = x; then
14162 as_myself=$0
14163fi
14164if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14166 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167fi
14168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014169# Unset variables that we do not need and which cause bugs (e.g. in
14170# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14171# suppresses any "Segmentation fault" message there. '((' could
14172# trigger a bug in pdksh 5.2.14.
14173for as_var in BASH_ENV ENV MAIL MAILPATH
14174do eval test x\${$as_var+set} = xset \
14175 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014176done
14177PS1='$ '
14178PS2='> '
14179PS4='+ '
14180
14181# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014182LC_ALL=C
14183export LC_ALL
14184LANGUAGE=C
14185export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187# CDPATH.
14188(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14189
14190
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014191# as_fn_error STATUS ERROR [LINENO LOG_FD]
14192# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14194# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014195# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196as_fn_error ()
14197{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014198 as_status=$1; test $as_status -eq 0 && as_status=1
14199 if test "$4"; then
14200 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14201 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014203 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014204 as_fn_exit $as_status
14205} # as_fn_error
14206
14207
14208# as_fn_set_status STATUS
14209# -----------------------
14210# Set $? to STATUS, without forking.
14211as_fn_set_status ()
14212{
14213 return $1
14214} # as_fn_set_status
14215
14216# as_fn_exit STATUS
14217# -----------------
14218# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14219as_fn_exit ()
14220{
14221 set +e
14222 as_fn_set_status $1
14223 exit $1
14224} # as_fn_exit
14225
14226# as_fn_unset VAR
14227# ---------------
14228# Portably unset VAR.
14229as_fn_unset ()
14230{
14231 { eval $1=; unset $1;}
14232}
14233as_unset=as_fn_unset
14234# as_fn_append VAR VALUE
14235# ----------------------
14236# Append the text in VALUE to the end of the definition contained in VAR. Take
14237# advantage of any shell optimizations that allow amortized linear growth over
14238# repeated appends, instead of the typical quadratic growth present in naive
14239# implementations.
14240if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14241 eval 'as_fn_append ()
14242 {
14243 eval $1+=\$2
14244 }'
14245else
14246 as_fn_append ()
14247 {
14248 eval $1=\$$1\$2
14249 }
14250fi # as_fn_append
14251
14252# as_fn_arith ARG...
14253# ------------------
14254# Perform arithmetic evaluation on the ARGs, and store the result in the
14255# global $as_val. Take advantage of shells that can avoid forks. The arguments
14256# must be portable across $(()) and expr.
14257if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14258 eval 'as_fn_arith ()
14259 {
14260 as_val=$(( $* ))
14261 }'
14262else
14263 as_fn_arith ()
14264 {
14265 as_val=`expr "$@" || test $? -eq 1`
14266 }
14267fi # as_fn_arith
14268
14269
Martin v. Löwiseba40652007-08-30 20:10:57 +000014270if expr a : '\(a\)' >/dev/null 2>&1 &&
14271 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14272 as_expr=expr
14273else
14274 as_expr=false
14275fi
14276
14277if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14278 as_basename=basename
14279else
14280 as_basename=false
14281fi
14282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14284 as_dirname=dirname
14285else
14286 as_dirname=false
14287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288
Martin v. Löwiseba40652007-08-30 20:10:57 +000014289as_me=`$as_basename -- "$0" ||
14290$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14291 X"$0" : 'X\(//\)$' \| \
14292 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014293$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014294 sed '/^.*\/\([^/][^/]*\)\/*$/{
14295 s//\1/
14296 q
14297 }
14298 /^X\/\(\/\/\)$/{
14299 s//\1/
14300 q
14301 }
14302 /^X\/\(\/\).*/{
14303 s//\1/
14304 q
14305 }
14306 s/.*/./; q'`
14307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308# Avoid depending upon Character Ranges.
14309as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14310as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14311as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14312as_cr_digits='0123456789'
14313as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014314
14315ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014316case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014317-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014318 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014319 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014320 xy) ECHO_C='\c';;
14321 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14322 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014323 esac;;
14324*)
14325 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014326esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014327
Martin v. Löwis11437992002-04-12 09:54:03 +000014328rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014329if test -d conf$$.dir; then
14330 rm -f conf$$.dir/conf$$.file
14331else
14332 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335if (echo >conf$$.file) 2>/dev/null; then
14336 if ln -s conf$$.file conf$$ 2>/dev/null; then
14337 as_ln_s='ln -s'
14338 # ... but there are two gotchas:
14339 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14340 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14341 # In both cases, we have to default to `cp -p'.
14342 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14343 as_ln_s='cp -p'
14344 elif ln conf$$.file conf$$ 2>/dev/null; then
14345 as_ln_s=ln
14346 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014348 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014349else
14350 as_ln_s='cp -p'
14351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14353rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355
14356# as_fn_mkdir_p
14357# -------------
14358# Create "$as_dir" as a directory, including parents if necessary.
14359as_fn_mkdir_p ()
14360{
14361
14362 case $as_dir in #(
14363 -*) as_dir=./$as_dir;;
14364 esac
14365 test -d "$as_dir" || eval $as_mkdir_p || {
14366 as_dirs=
14367 while :; do
14368 case $as_dir in #(
14369 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14370 *) as_qdir=$as_dir;;
14371 esac
14372 as_dirs="'$as_qdir' $as_dirs"
14373 as_dir=`$as_dirname -- "$as_dir" ||
14374$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14375 X"$as_dir" : 'X\(//\)[^/]' \| \
14376 X"$as_dir" : 'X\(//\)$' \| \
14377 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14378$as_echo X"$as_dir" |
14379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14380 s//\1/
14381 q
14382 }
14383 /^X\(\/\/\)[^/].*/{
14384 s//\1/
14385 q
14386 }
14387 /^X\(\/\/\)$/{
14388 s//\1/
14389 q
14390 }
14391 /^X\(\/\).*/{
14392 s//\1/
14393 q
14394 }
14395 s/.*/./; q'`
14396 test -d "$as_dir" && break
14397 done
14398 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014399 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400
14401
14402} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014403if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014404 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014405else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014406 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014407 as_mkdir_p=false
14408fi
14409
Martin v. Löwiseba40652007-08-30 20:10:57 +000014410if test -x / >/dev/null 2>&1; then
14411 as_test_x='test -x'
14412else
14413 if ls -dL / >/dev/null 2>&1; then
14414 as_ls_L_option=L
14415 else
14416 as_ls_L_option=
14417 fi
14418 as_test_x='
14419 eval sh -c '\''
14420 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014421 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014422 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014423 case $1 in #(
14424 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014426 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014427 ???[sx]*):;;*)false;;esac;fi
14428 '\'' sh
14429 '
14430fi
14431as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014432
14433# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014434as_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 +000014435
14436# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014437as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014438
14439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014441## ----------------------------------- ##
14442## Main body of $CONFIG_STATUS script. ##
14443## ----------------------------------- ##
14444_ASEOF
14445test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14448# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014449# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014450# values after options handling.
14451ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014452This file was extended by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +010014453generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014454
14455 CONFIG_FILES = $CONFIG_FILES
14456 CONFIG_HEADERS = $CONFIG_HEADERS
14457 CONFIG_LINKS = $CONFIG_LINKS
14458 CONFIG_COMMANDS = $CONFIG_COMMANDS
14459 $ $0 $@
14460
Martin v. Löwiseba40652007-08-30 20:10:57 +000014461on `(hostname || uname -n) 2>/dev/null | sed 1q`
14462"
14463
Martin v. Löwis11437992002-04-12 09:54:03 +000014464_ACEOF
14465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014466case $ac_config_files in *"
14467"*) set x $ac_config_files; shift; ac_config_files=$*;;
14468esac
14469
14470case $ac_config_headers in *"
14471"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14472esac
14473
14474
14475cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014476# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014477config_files="$ac_config_files"
14478config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014479
Martin v. Löwiseba40652007-08-30 20:10:57 +000014480_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014483ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484\`$as_me' instantiates files and other configuration actions
14485from templates according to the current configuration. Unless the files
14486and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
14490 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014491 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014492 --config print configuration, then exit
14493 -q, --quiet, --silent
14494 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 -d, --debug don't remove temporary files
14496 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497 --file=FILE[:TEMPLATE]
14498 instantiate the configuration file FILE
14499 --header=FILE[:TEMPLATE]
14500 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014501
14502Configuration files:
14503$config_files
14504
14505Configuration headers:
14506$config_headers
14507
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014509
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14512ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014513ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014514python config.status 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +010014515configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014517
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014518Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014519This config.status script is free software; the Free Software Foundation
14520gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014521
14522ac_pwd='$ac_pwd'
14523srcdir='$srcdir'
14524INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000014525MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014527_ACEOF
14528
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14530# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014531ac_need_defaults=:
14532while test $# != 0
14533do
14534 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014535 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14537 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014538 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014539 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014540 --*=)
14541 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14542 ac_optarg=
14543 ac_shift=:
14544 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014546 ac_option=$1
14547 ac_optarg=$2
14548 ac_shift=shift
14549 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 esac
14551
Skip Montanaro6dead952003-09-25 14:50:04 +000014552 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014554 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14555 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014556 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014557 $as_echo "$ac_cs_version"; exit ;;
14558 --config | --confi | --conf | --con | --co | --c )
14559 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014560 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 debug=: ;;
14562 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014563 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564 case $ac_optarg in
14565 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014566 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014567 esac
14568 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014569 ac_need_defaults=false;;
14570 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014571 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014572 case $ac_optarg in
14573 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14574 esac
14575 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014576 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014577 --he | --h)
14578 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014579 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014580Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014583 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14584 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14585 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
14587 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014588 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014589Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014591 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014592 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
14594 esac
14595 shift
14596done
14597
Skip Montanaro6dead952003-09-25 14:50:04 +000014598ac_configure_extra_args=
14599
14600if $ac_cs_silent; then
14601 exec 6>/dev/null
14602 ac_configure_extra_args="$ac_configure_extra_args --silent"
14603fi
14604
14605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014607if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14609 shift
14610 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14611 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014613 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014614fi
14615
Martin v. Löwis11437992002-04-12 09:54:03 +000014616_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618exec 5>>config.log
14619{
14620 echo
14621 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14622## Running $as_me. ##
14623_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014625} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014626
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014628cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014632
14633# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014634for ac_config_target in $ac_config_targets
14635do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636 case $ac_config_target in
14637 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14638 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14639 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14640 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014641 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14642 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14644 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014645 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014646 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647
Matthias Klose3cef2a92012-03-14 23:39:33 +010014648 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014649 esac
14650done
14651
Martin v. Löwiseba40652007-08-30 20:10:57 +000014652
Martin v. Löwis11437992002-04-12 09:54:03 +000014653# If the user did not use the arguments to specify the items to instantiate,
14654# then the envvar interface is used. Set only those that are not.
14655# We use the long form for the default assignment because of an extremely
14656# bizarre bug on SunOS 4.1.3.
14657if $ac_need_defaults; then
14658 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14659 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14660fi
14661
Skip Montanaro6dead952003-09-25 14:50:04 +000014662# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014663# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014664# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014665# Hook for its removal unless debugging.
14666# Note that there is a small window in which the directory will not be cleaned:
14667# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014668$debug ||
14669{
Matthias Klose3cef2a92012-03-14 23:39:33 +010014670 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014671 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010014672 : "${ac_tmp:=$tmp}"
14673 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014674' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014675 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014676}
Martin v. Löwis11437992002-04-12 09:54:03 +000014677# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014678
Martin v. Löwis11437992002-04-12 09:54:03 +000014679{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014680 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010014681 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014682} ||
14683{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014684 tmp=./conf$$-$RANDOM
14685 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014686} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010014687ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689# Set up the scripts for CONFIG_FILES section.
14690# No need to generate them if there are no CONFIG_FILES.
14691# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014692if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014694
14695ac_cr=`echo X | tr X '\015'`
14696# On cygwin, bash can eat \r inside `` if the user requested igncr.
14697# But we know of no other shell where ac_cr would be empty at this
14698# point, so we can use a bashism as a fallback.
14699if test "x$ac_cr" = x; then
14700 eval ac_cr=\$\'\\r\'
14701fi
14702ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14703if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014704 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705else
14706 ac_cs_awk_cr=$ac_cr
14707fi
14708
Matthias Klose3cef2a92012-03-14 23:39:33 +010014709echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014710_ACEOF
14711
Martin v. Löwiseba40652007-08-30 20:10:57 +000014712
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014713{
14714 echo "cat >conf$$subs.awk <<_ACEOF" &&
14715 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14716 echo "_ACEOF"
14717} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014718 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14719ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014720ac_delim='%!_!# '
14721for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014722 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014723 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14726 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014727 break
14728 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014729 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730 else
14731 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014733done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014734rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014736cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010014737cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014739sed -n '
14740h
14741s/^/S["/; s/!.*/"]=/
14742p
14743g
14744s/^[^!]*!//
14745:repl
14746t repl
14747s/'"$ac_delim"'$//
14748t delim
14749:nl
14750h
14751s/\(.\{148\}\)..*/\1/
14752t more1
14753s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14754p
14755n
14756b repl
14757:more1
14758s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14759p
14760g
14761s/.\{148\}//
14762t nl
14763:delim
14764h
14765s/\(.\{148\}\)..*/\1/
14766t more2
14767s/["\\]/\\&/g; s/^/"/; s/$/"/
14768p
14769b
14770:more2
14771s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14772p
14773g
14774s/.\{148\}//
14775t delim
14776' <conf$$subs.awk | sed '
14777/^[^""]/{
14778 N
14779 s/\n//
14780}
14781' >>$CONFIG_STATUS || ac_write_fail=1
14782rm -f conf$$subs.awk
14783cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14784_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010014785cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014786 for (key in S) S_is_set[key] = 1
14787 FS = ""
14788
14789}
14790{
14791 line = $ 0
14792 nfields = split(line, field, "@")
14793 substed = 0
14794 len = length(field[1])
14795 for (i = 2; i < nfields; i++) {
14796 key = field[i]
14797 keylen = length(key)
14798 if (S_is_set[key]) {
14799 value = S[key]
14800 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14801 len += length(value) + length(field[++i])
14802 substed = 1
14803 } else
14804 len += 1 + keylen
14805 }
14806
14807 print line
14808}
14809
14810_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014812cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14813if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14814 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14815else
14816 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010014817fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014818 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014819_ACEOF
14820
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014821# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14822# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014823# trailing colons and then remove the whole line if VPATH becomes empty
14824# (actually we leave an empty line to preserve line numbers).
14825if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014826 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14827h
14828s///
14829s/^/:/
14830s/[ ]*$/:/
14831s/:\$(srcdir):/:/g
14832s/:\${srcdir}:/:/g
14833s/:@srcdir@:/:/g
14834s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014835s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014836x
14837s/\(=[ ]*\).*/\1/
14838G
14839s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014840s/^[^=]*=[ ]*$//
14841}'
14842fi
14843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014844cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014845fi # test -n "$CONFIG_FILES"
14846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014847# Set up the scripts for CONFIG_HEADERS section.
14848# No need to generate them if there are no CONFIG_HEADERS.
14849# This happens for instance with `./config.status Makefile'.
14850if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014851cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014852BEGIN {
14853_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014855# Transform confdefs.h into an awk script `defines.awk', embedded as
14856# here-document in config.status, that substitutes the proper values into
14857# config.h.in to produce config.h.
14858
14859# Create a delimiter string that does not exist in confdefs.h, to ease
14860# handling of long lines.
14861ac_delim='%!_!# '
14862for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010014863 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14864 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014865 break
14866 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014867 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014868 else
14869 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14870 fi
14871done
14872
14873# For the awk script, D is an array of macro values keyed by name,
14874# likewise P contains macro parameters if any. Preserve backslash
14875# newline sequences.
14876
14877ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14878sed -n '
14879s/.\{148\}/&'"$ac_delim"'/g
14880t rset
14881:rset
14882s/^[ ]*#[ ]*define[ ][ ]*/ /
14883t def
14884d
14885:def
14886s/\\$//
14887t bsnl
14888s/["\\]/\\&/g
14889s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14890D["\1"]=" \3"/p
14891s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14892d
14893:bsnl
14894s/["\\]/\\&/g
14895s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14896D["\1"]=" \3\\\\\\n"\\/p
14897t cont
14898s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14899t cont
14900d
14901:cont
14902n
14903s/.\{148\}/&'"$ac_delim"'/g
14904t clear
14905:clear
14906s/\\$//
14907t bsnlc
14908s/["\\]/\\&/g; s/^/"/; s/$/"/p
14909d
14910:bsnlc
14911s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14912b cont
14913' <confdefs.h | sed '
14914s/'"$ac_delim"'/"\\\
14915"/g' >>$CONFIG_STATUS || ac_write_fail=1
14916
14917cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14918 for (key in D) D_is_set[key] = 1
14919 FS = ""
14920}
14921/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14922 line = \$ 0
14923 split(line, arg, " ")
14924 if (arg[1] == "#") {
14925 defundef = arg[2]
14926 mac1 = arg[3]
14927 } else {
14928 defundef = substr(arg[1], 2)
14929 mac1 = arg[2]
14930 }
14931 split(mac1, mac2, "(") #)
14932 macro = mac2[1]
14933 prefix = substr(line, 1, index(line, defundef) - 1)
14934 if (D_is_set[macro]) {
14935 # Preserve the white space surrounding the "#".
14936 print prefix "define", macro P[macro] D[macro]
14937 next
14938 } else {
14939 # Replace #undef with comments. This is necessary, for example,
14940 # in the case of _POSIX_SOURCE, which is predefined and required
14941 # on some systems where configure will not decide to define it.
14942 if (defundef == "undef") {
14943 print "/*", prefix defundef, macro, "*/"
14944 next
14945 }
14946 }
14947}
14948{ print }
14949_ACAWK
14950_ACEOF
14951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014952 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953fi # test -n "$CONFIG_HEADERS"
14954
14955
14956eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14957shift
14958for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959do
14960 case $ac_tag in
14961 :[FHLC]) ac_mode=$ac_tag; continue;;
14962 esac
14963 case $ac_mode$ac_tag in
14964 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010014965 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966 :[FH]-) ac_tag=-:-;;
14967 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14968 esac
14969 ac_save_IFS=$IFS
14970 IFS=:
14971 set x $ac_tag
14972 IFS=$ac_save_IFS
14973 shift
14974 ac_file=$1
14975 shift
14976
14977 case $ac_mode in
14978 :L) ac_source=$1;;
14979 :[FH])
14980 ac_file_inputs=
14981 for ac_f
14982 do
14983 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010014984 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014985 *) # Look for the file first in the build tree, then in the source tree
14986 # (if the path is not absolute). The absolute path cannot be DOS-style,
14987 # because $ac_f cannot contain `:'.
14988 test -f "$ac_f" ||
14989 case $ac_f in
14990 [\\/$]*) false;;
14991 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14992 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010014993 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014995 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14996 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997 done
14998
14999 # Let's still pretend it is `configure' which instantiates (i.e., don't
15000 # use $as_me), people would be surprised to read:
15001 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015002 configure_input='Generated from '`
15003 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15004 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005 if test x"$ac_file" != x-; then
15006 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015007 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15008$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015009 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015010 # Neutralize special characters interpreted by sed in replacement strings.
15011 case $configure_input in #(
15012 *\&* | *\|* | *\\* )
15013 ac_sed_conf_input=`$as_echo "$configure_input" |
15014 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15015 *) ac_sed_conf_input=$configure_input;;
15016 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017
15018 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015019 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15020 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021 esac
15022 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015023 esac
15024
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015026$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015027 X"$ac_file" : 'X\(//\)[^/]' \| \
15028 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015029 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015030$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015031 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15032 s//\1/
15033 q
15034 }
15035 /^X\(\/\/\)[^/].*/{
15036 s//\1/
15037 q
15038 }
15039 /^X\(\/\/\)$/{
15040 s//\1/
15041 q
15042 }
15043 /^X\(\/\).*/{
15044 s//\1/
15045 q
15046 }
15047 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015048 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_builddir=.
15050
Martin v. Löwiseba40652007-08-30 20:10:57 +000015051case "$ac_dir" in
15052.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15053*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015055 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015056 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015057 case $ac_top_builddir_sub in
15058 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15059 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15060 esac ;;
15061esac
15062ac_abs_top_builddir=$ac_pwd
15063ac_abs_builddir=$ac_pwd$ac_dir_suffix
15064# for backward compatibility:
15065ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015066
15067case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070 ac_top_srcdir=$ac_top_builddir_sub
15071 ac_abs_top_srcdir=$ac_pwd ;;
15072 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015074 ac_top_srcdir=$srcdir
15075 ac_abs_top_srcdir=$srcdir ;;
15076 *) # Relative name.
15077 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15078 ac_top_srcdir=$ac_top_build_prefix$srcdir
15079 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015080esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015081ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015082
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084 case $ac_mode in
15085 :F)
15086 #
15087 # CONFIG_FILE
15088 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015089
15090 case $INSTALL in
15091 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015094 ac_MKDIR_P=$MKDIR_P
15095 case $MKDIR_P in
15096 [\\/$]* | ?:[\\/]* ) ;;
15097 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15098 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015099_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102# If the template does not know about datarootdir, expand it.
15103# FIXME: This hack should be removed a few years after 2.60.
15104ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105ac_sed_dataroot='
15106/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 p
15108 q
15109}
15110/@datadir@/p
15111/@docdir@/p
15112/@infodir@/p
15113/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015114/@mandir@/p'
15115case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015116*datarootdir*) ac_datarootdir_seen=yes;;
15117*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15119$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122 ac_datarootdir_hack='
15123 s&@datadir@&$datadir&g
15124 s&@docdir@&$docdir&g
15125 s&@infodir@&$infodir&g
15126 s&@localedir@&$localedir&g
15127 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015129esac
15130_ACEOF
15131
15132# Neutralize VPATH when `$srcdir' = `.'.
15133# Shell code in configure.ac might set extrasub.
15134# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15136ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015137$extrasub
15138_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015140:t
15141/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015142s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015143s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015144s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145s&@srcdir@&$ac_srcdir&;t t
15146s&@abs_srcdir@&$ac_abs_srcdir&;t t
15147s&@top_srcdir@&$ac_top_srcdir&;t t
15148s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15149s&@builddir@&$ac_builddir&;t t
15150s&@abs_builddir@&$ac_abs_builddir&;t t
15151s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15152s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015153s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015154$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015155"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015156eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15157 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015158
Martin v. Löwiseba40652007-08-30 20:10:57 +000015159test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015160 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15161 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15162 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015164which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015165$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015166which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015167
Matthias Klose3cef2a92012-03-14 23:39:33 +010015168 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015170 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15171 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015172 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015173 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174 ;;
15175 :H)
15176 #
15177 # CONFIG_HEADER
15178 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015180 {
15181 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015182 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15183 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015184 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015185 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015186 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15187$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015189 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015190 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015191 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 fi
15193 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015194 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015195 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015196 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015199
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200
15201 esac
15202
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015203
15204 case $ac_file$ac_mode in
15205 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15206
15207 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208done # for ac_tag
15209
Guido van Rossum627b2d71993-12-24 10:39:16 +000015210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015212_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015213ac_clean_files=$ac_clean_files_save
15214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015215test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015216 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015217
Martin v. Löwis11437992002-04-12 09:54:03 +000015218
15219# configure is writing to config.log, and then calls config.status.
15220# config.status does its own redirection, appending to config.log.
15221# Unfortunately, on DOS this fails, as config.log is still kept open
15222# by configure, so config.status won't be able to write to it; its
15223# output is simply discarded. So we exec the FD to /dev/null,
15224# effectively closing config.log, so it can be properly (re)opened and
15225# appended to by config.status. When coming back to configure, we
15226# need to make the FD available again.
15227if test "$no_create" != yes; then
15228 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015229 ac_config_status_args=
15230 test "$silent" = yes &&
15231 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015233 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015234 exec 5>>config.log
15235 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15236 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015237 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238fi
15239if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15241$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015242fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015243
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015244
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015245echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015246if test ! -f Modules/Setup
15247then
15248 cp $srcdir/Modules/Setup.dist Modules/Setup
15249fi
15250
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015251echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015252if test ! -f Modules/Setup.local
15253then
15254 echo "# Edit this file for local setup changes" >Modules/Setup.local
15255fi
15256
15257echo "creating Makefile"
15258$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15259 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015260 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015261
15262case $ac_sys_system in
15263BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015264 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015265
15266 Support for BeOS is deprecated as of Python 2.6.
15267 See PEP 11 for the gory details.
15268 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015269$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015270
15271 Support for BeOS is deprecated as of Python 2.6.
15272 See PEP 11 for the gory details.
15273 " >&2;}
15274 ;;
15275*) ;;
15276esac
15277
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015278mv config.c Modules