blob: b17097c73b7187c8b74eaba5654b5963d9a00b98 [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
Trent Nelsond86ceec2012-10-16 09:42:45 -0400651BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000652SVNVERSION
653ARFLAGS
654AR
655RANLIB
656GNULD
657LINKCC
658RUNSHARED
659INSTSONAME
660LDLIBRARYDIR
661BLDLIBRARY
662DLLLIBRARY
663LDLIBRARY
664LIBRARY
665BUILDEXEEXT
666EGREP
667GREP
668CPP
669MAINCC
670CXX
671OBJEXT
672EXEEXT
673ac_ct_CC
674CPPFLAGS
675LDFLAGS
676CFLAGS
677CC
678EXPORT_MACOSX_DEPLOYMENT_TARGET
679CONFIGURE_MACOSX_DEPLOYMENT_TARGET
680EXTRAMACHDEPPATH
681EXTRAPLATDIR
682SGI_ABI
683MACHDEP
684FRAMEWORKINSTALLAPPSPREFIX
685FRAMEWORKUNIXTOOLSPREFIX
686FRAMEWORKALTINSTALLLAST
687FRAMEWORKALTINSTALLFIRST
688FRAMEWORKINSTALLLAST
689FRAMEWORKINSTALLFIRST
690PYTHONFRAMEWORKINSTALLDIR
691PYTHONFRAMEWORKPREFIX
692PYTHONFRAMEWORKDIR
693PYTHONFRAMEWORKIDENTIFIER
694PYTHONFRAMEWORK
695LIPO_32BIT_FLAGS
696ARCH_RUN_32BIT
697UNIVERSALSDK
698CONFIG_ARGS
699SOVERSION
700VERSION
701target_alias
702host_alias
703build_alias
704LIBS
705ECHO_T
706ECHO_N
707ECHO_C
708DEFS
709mandir
710localedir
711libdir
712psdir
713pdfdir
714dvidir
715htmldir
716infodir
717docdir
718oldincludedir
719includedir
720localstatedir
721sharedstatedir
722sysconfdir
723datadir
724datarootdir
725libexecdir
726sbindir
727bindir
728program_transform_name
729prefix
730exec_prefix
731PACKAGE_URL
732PACKAGE_BUGREPORT
733PACKAGE_STRING
734PACKAGE_VERSION
735PACKAGE_TARNAME
736PACKAGE_NAME
737PATH_SEPARATOR
738SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000739ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000740ac_user_opts='
741enable_option_checking
742enable_universalsdk
743with_universal_archs
744with_framework_name
745enable_framework
746with_gcc
747with_cxx_main
748with_suffix
749enable_shared
750enable_profiling
751with_pydebug
752enable_toolbox_glue
753with_libs
754with_system_expat
755with_system_ffi
756with_dbmliborder
757with_signal_module
758with_dec_threads
759with_threads
760with_thread
761with_pth
762enable_ipv6
763with_doc_strings
764with_tsc
765with_pymalloc
766with_valgrind
767with_wctype_functions
768with_fpectl
769with_libm
770with_libc
771enable_big_digits
772enable_unicode
773'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000774 ac_precious_vars='build_alias
775host_alias
776target_alias
777CC
778CFLAGS
779LDFLAGS
780LIBS
781CPPFLAGS
782CPP'
783
Guido van Rossum627b2d71993-12-24 10:39:16 +0000784
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000786ac_init_help=
787ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000788ac_unrecognized_opts=
789ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000790# The variables have the same names as the options, with
791# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000792cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795no_recursion=
796prefix=NONE
797program_prefix=NONE
798program_suffix=NONE
799program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000804x_includes=NONE
805x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000806
807# Installation directory options.
808# These are left unexpanded so users can "make install exec_prefix=/foo"
809# and all the variables that are supposed to be based on exec_prefix
810# by default will actually change.
811# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000813bindir='${exec_prefix}/bin'
814sbindir='${exec_prefix}/sbin'
815libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816datarootdir='${prefix}/share'
817datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818sysconfdir='${prefix}/etc'
819sharedstatedir='${prefix}/com'
820localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821includedir='${prefix}/include'
822oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000823docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
824infodir='${datarootdir}/info'
825htmldir='${docdir}'
826dvidir='${docdir}'
827pdfdir='${docdir}'
828psdir='${docdir}'
829libdir='${exec_prefix}/lib'
830localedir='${datarootdir}/locale'
831mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000834ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837 # If the previous option needs an argument, assign it.
838 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000839 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840 ac_prev=
841 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843
Martin v. Löwiseba40652007-08-30 20:10:57 +0000844 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000845 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
846 *=) ac_optarg= ;;
847 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000848 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 # Accept the important Cygnus configure options, so we can diagnose typos.
851
Martin v. Löwiseba40652007-08-30 20:10:57 +0000852 case $ac_dashdash$ac_option in
853 --)
854 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856 -bindir | --bindir | --bindi | --bind | --bin | --bi)
857 ac_prev=bindir ;;
858 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860
861 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000862 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000864 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 -cache-file | --cache-file | --cache-fil | --cache-fi \
867 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
868 ac_prev=cache_file ;;
869 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
870 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 cache_file=$ac_optarg ;;
872
873 --config-cache | -C)
874 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
882 | --dataroo | --dataro | --datar)
883 ac_prev=datarootdir ;;
884 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
885 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
886 datarootdir=$ac_optarg ;;
887
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000889 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000891 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000892 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000893 ac_useropt_orig=$ac_useropt
894 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
895 case $ac_user_opts in
896 *"
897"enable_$ac_useropt"
898"*) ;;
899 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
900 ac_unrecognized_sep=', ';;
901 esac
902 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903
904 -docdir | --docdir | --docdi | --doc | --do)
905 ac_prev=docdir ;;
906 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907 docdir=$ac_optarg ;;
908
909 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910 ac_prev=dvidir ;;
911 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
914 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000915 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000917 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000918 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000919 ac_useropt_orig=$ac_useropt
920 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
921 case $ac_user_opts in
922 *"
923"enable_$ac_useropt"
924"*) ;;
925 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
926 ac_unrecognized_sep=', ';;
927 esac
928 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
931 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
932 | --exec | --exe | --ex)
933 ac_prev=exec_prefix ;;
934 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
935 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
936 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
939 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Obsolete; use --with-gas.
941 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 -help | --help | --hel | --he | -h)
944 ac_init_help=long ;;
945 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
946 ac_init_help=recursive ;;
947 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
948 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
950 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
Martin v. Löwiseba40652007-08-30 20:10:57 +0000955 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
956 ac_prev=htmldir ;;
957 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
958 | --ht=*)
959 htmldir=$ac_optarg ;;
960
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 -includedir | --includedir | --includedi | --included | --include \
962 | --includ | --inclu | --incl | --inc)
963 ac_prev=includedir ;;
964 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
965 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
968 -infodir | --infodir | --infodi | --infod | --info | --inf)
969 ac_prev=infodir ;;
970 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
973 -libdir | --libdir | --libdi | --libd)
974 ac_prev=libdir ;;
975 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977
978 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
979 | --libexe | --libex | --libe)
980 ac_prev=libexecdir ;;
981 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
982 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
Martin v. Löwiseba40652007-08-30 20:10:57 +0000985 -localedir | --localedir | --localedi | --localed | --locale)
986 ac_prev=localedir ;;
987 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
988 localedir=$ac_optarg ;;
989
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000991 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992 ac_prev=localstatedir ;;
993 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000994 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
998 ac_prev=mandir ;;
999 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001001
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 # Obsolete; use --without-fp.
1004 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 no_create=yes ;;
1009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1011 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1012 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1015 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1016 | --oldin | --oldi | --old | --ol | --o)
1017 ac_prev=oldincludedir ;;
1018 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1019 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1020 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1024 ac_prev=prefix ;;
1025 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1029 | --program-pre | --program-pr | --program-p)
1030 ac_prev=program_prefix ;;
1031 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1032 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
1035 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1036 | --program-suf | --program-su | --program-s)
1037 ac_prev=program_suffix ;;
1038 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1039 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -program-transform-name | --program-transform-name \
1043 | --program-transform-nam | --program-transform-na \
1044 | --program-transform-n | --program-transform- \
1045 | --program-transform | --program-transfor \
1046 | --program-transfo | --program-transf \
1047 | --program-trans | --program-tran \
1048 | --progr-tra | --program-tr | --program-t)
1049 ac_prev=program_transform_name ;;
1050 -program-transform-name=* | --program-transform-name=* \
1051 | --program-transform-nam=* | --program-transform-na=* \
1052 | --program-transform-n=* | --program-transform-=* \
1053 | --program-transform=* | --program-transfor=* \
1054 | --program-transfo=* | --program-transf=* \
1055 | --program-trans=* | --program-tran=* \
1056 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058
Martin v. Löwiseba40652007-08-30 20:10:57 +00001059 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1060 ac_prev=pdfdir ;;
1061 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1062 pdfdir=$ac_optarg ;;
1063
1064 -psdir | --psdir | --psdi | --psd | --ps)
1065 ac_prev=psdir ;;
1066 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1067 psdir=$ac_optarg ;;
1068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1070 | -silent | --silent | --silen | --sile | --sil)
1071 silent=yes ;;
1072
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1074 ac_prev=sbindir ;;
1075 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1076 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
1079 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1080 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1081 | --sharedst | --shareds | --shared | --share | --shar \
1082 | --sha | --sh)
1083 ac_prev=sharedstatedir ;;
1084 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1085 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1086 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1087 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001090 -site | --site | --sit)
1091 ac_prev=site ;;
1092 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1096 ac_prev=srcdir ;;
1097 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1101 | --syscon | --sysco | --sysc | --sys | --sy)
1102 ac_prev=sysconfdir ;;
1103 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1104 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1113 verbose=yes ;;
1114
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 -version | --version | --versio | --versi | --vers | -V)
1116 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001119 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001121 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001122 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001123 ac_useropt_orig=$ac_useropt
1124 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1125 case $ac_user_opts in
1126 *"
1127"with_$ac_useropt"
1128"*) ;;
1129 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1130 ac_unrecognized_sep=', ';;
1131 esac
1132 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001135 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001137 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001138 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143"with_$ac_useropt"
1144"*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
1147 esac
1148 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150 --x)
1151 # Obsolete; use --with-x.
1152 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1155 | --x-incl | --x-inc | --x-in | --x-i)
1156 ac_prev=x_includes ;;
1157 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1158 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1162 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1163 ac_prev=x_libraries ;;
1164 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1165 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001168 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1169Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 ;;
1171
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 *=*)
1173 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1174 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001175 case $ac_envvar in #(
1176 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001177 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001178 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001179 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 export $ac_envvar ;;
1181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001184 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001186 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001187 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 ;;
1189
1190 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001191done
1192
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001195 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196fi
1197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001198if test -n "$ac_unrecognized_opts"; then
1199 case $enable_option_checking in
1200 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001201 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001202 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1203 esac
1204fi
1205
1206# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1208 datadir sysconfdir sharedstatedir localstatedir includedir \
1209 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1210 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001213 # Remove trailing slashes.
1214 case $ac_val in
1215 */ )
1216 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1217 eval $ac_var=\$ac_val;;
1218 esac
1219 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221 [\\/$]* | ?:[\\/]* ) continue;;
1222 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001224 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001225done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226
Martin v. Löwis11437992002-04-12 09:54:03 +00001227# There might be people who depend on the old broken behavior: `$host'
1228# used to hold the argument of --host etc.
1229# FIXME: To remove some day.
1230build=$build_alias
1231host=$host_alias
1232target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234# FIXME: To remove some day.
1235if test "x$host_alias" != x; then
1236 if test "x$build_alias" = x; then
1237 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001238 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1239 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 elif test "x$build_alias" != "x$host_alias"; then
1241 cross_compiling=yes
1242 fi
1243fi
1244
1245ac_tool_prefix=
1246test -n "$host_alias" && ac_tool_prefix=$host_alias-
1247
1248test "$silent" = yes && exec 6>/dev/null
1249
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Martin v. Löwiseba40652007-08-30 20:10:57 +00001251ac_pwd=`pwd` && test -n "$ac_pwd" &&
1252ac_ls_di=`ls -di .` &&
1253ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001254 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001255test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001256 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001257
1258
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259# Find the source files, if location was not specified.
1260if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001262 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001263 ac_confdir=`$as_dirname -- "$as_myself" ||
1264$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1265 X"$as_myself" : 'X\(//\)[^/]' \| \
1266 X"$as_myself" : 'X\(//\)$' \| \
1267 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1268$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1270 s//\1/
1271 q
1272 }
1273 /^X\(\/\/\)[^/].*/{
1274 s//\1/
1275 q
1276 }
1277 /^X\(\/\/\)$/{
1278 s//\1/
1279 q
1280 }
1281 /^X\(\/\).*/{
1282 s//\1/
1283 q
1284 }
1285 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288 srcdir=..
1289 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290else
1291 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293if test ! -r "$srcdir/$ac_unique_file"; then
1294 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001295 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001297ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1298ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001299 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001300 pwd)`
1301# When building in place, set srcdir=.
1302if test "$ac_abs_confdir" = "$ac_pwd"; then
1303 srcdir=.
1304fi
1305# Remove unnecessary trailing slashes from srcdir.
1306# Double slashes in file names in object file debugging info
1307# mess up M-x gdb in Emacs.
1308case $srcdir in
1309*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1310esac
1311for ac_var in $ac_precious_vars; do
1312 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_env_${ac_var}_value=\$${ac_var}
1314 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1315 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1316done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318#
1319# Report the --help message.
1320#
1321if test "$ac_init_help" = "long"; then
1322 # Omit some internal or obsolete options to make the list less imposing.
1323 # This message is too long to be a string in the A/UX 3.1 sh.
1324 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001325\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Usage: $0 [OPTION]... [VAR=VALUE]...
1328
1329To assign environment variables (e.g., CC, CFLAGS...), specify them as
1330VAR=VALUE. See below for descriptions of some of the useful variables.
1331
1332Defaults for the options are specified in brackets.
1333
1334Configuration:
1335 -h, --help display this help and exit
1336 --help=short display options specific to this package
1337 --help=recursive display the short help of all the included packages
1338 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001339 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001340 --cache-file=FILE cache test results in FILE [disabled]
1341 -C, --config-cache alias for \`--cache-file=config.cache'
1342 -n, --no-create do not create output files
1343 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1344
Martin v. Löwis11437992002-04-12 09:54:03 +00001345Installation directories:
1346 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001347 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001348 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001349 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001350
1351By default, \`make install' will install all the files in
1352\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1353an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1354for instance \`--prefix=\$HOME'.
1355
1356For better control, use the options below.
1357
1358Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001359 --bindir=DIR user executables [EPREFIX/bin]
1360 --sbindir=DIR system admin executables [EPREFIX/sbin]
1361 --libexecdir=DIR program executables [EPREFIX/libexec]
1362 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1363 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1364 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1365 --libdir=DIR object code libraries [EPREFIX/lib]
1366 --includedir=DIR C header files [PREFIX/include]
1367 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1368 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1369 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1370 --infodir=DIR info documentation [DATAROOTDIR/info]
1371 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1372 --mandir=DIR man documentation [DATAROOTDIR/man]
1373 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1374 --htmldir=DIR html documentation [DOCDIR]
1375 --dvidir=DIR dvi documentation [DOCDIR]
1376 --pdfdir=DIR pdf documentation [DOCDIR]
1377 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001378_ACEOF
1379
1380 cat <<\_ACEOF
1381_ACEOF
1382fi
1383
1384if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001385 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001386 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001387 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 cat <<\_ACEOF
1389
1390Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001391 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1393 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001394 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001395 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001396 --enable-framework[=INSTALLDIR]
1397 Build (MacOSX|Darwin) framework
1398 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001399 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001400 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1401 --enable-ipv6 Enable ipv6 (with ipv4) support
1402 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001403 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001404 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001405 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001406 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408Optional Packages:
1409 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1410 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001411 --with-universal-archs=ARCH
1412 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001413 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001414 --with-framework-name=FRAMEWORK
1415 specify an alternate name of the framework built
1416 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001417 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001418 --with-cxx-main=<compiler>
1419 compile main() and link python executable with C++
1420 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --with-suffix=.exe set executable suffix
1422 --with-pydebug build with Py_DEBUG defined
1423 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001424 --with-system-expat build pyexpat module using an installed expat
1425 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001426 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001427 --with-dbmliborder=db1:db2:...
1428 order to check db backends for dbm. Valid value is a
1429 colon separated string with the backend names
1430 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001431 --with-signal-module disable/enable signal module
1432 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1433 --with(out)-threads[=DIRECTORY]
1434 disable/enable thread support
1435 --with(out)-thread[=DIRECTORY]
1436 deprecated; use --with(out)-threads
1437 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001439 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001441 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --with-fpectl enable SIGFPE catching
1444 --with-libm=STRING math library
1445 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Some influential environment variables:
1448 CC C compiler command
1449 CFLAGS C compiler flags
1450 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1451 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001453 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001455 CPP C preprocessor
1456
1457Use these variables to override the choices made by `configure' or to help
1458it to find libraries and programs with nonstandard names/locations.
1459
Georg Brandl464432d2009-05-20 18:24:08 +00001460Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001462ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001463fi
1464
1465if test "$ac_init_help" = "recursive"; then
1466 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001468 test -d "$ac_dir" ||
1469 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1470 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 ac_builddir=.
1472
Martin v. Löwiseba40652007-08-30 20:10:57 +00001473case "$ac_dir" in
1474.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1475*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001476 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001477 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001478 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001479 case $ac_top_builddir_sub in
1480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1482 esac ;;
1483esac
1484ac_abs_top_builddir=$ac_pwd
1485ac_abs_builddir=$ac_pwd$ac_dir_suffix
1486# for backward compatibility:
1487ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001490 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001492 ac_top_srcdir=$ac_top_builddir_sub
1493 ac_abs_top_srcdir=$ac_pwd ;;
1494 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001495 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001496 ac_top_srcdir=$srcdir
1497 ac_abs_top_srcdir=$srcdir ;;
1498 *) # Relative name.
1499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1500 ac_top_srcdir=$ac_top_build_prefix$srcdir
1501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001502esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001503ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001504
Martin v. Löwiseba40652007-08-30 20:10:57 +00001505 cd "$ac_dir" || { ac_status=$?; continue; }
1506 # Check for guested configure.
1507 if test -f "$ac_srcdir/configure.gnu"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1510 elif test -f "$ac_srcdir/configure"; then
1511 echo &&
1512 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001514 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001515 fi || ac_status=$?
1516 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001517 done
1518fi
1519
Martin v. Löwiseba40652007-08-30 20:10:57 +00001520test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001521if $ac_init_version; then
1522 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001523python configure 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +01001524generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001525
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001526Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001527This configure script is free software; the Free Software Foundation
1528gives unlimited permission to copy, distribute and modify it.
1529_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001530 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001531fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001532
1533## ------------------------ ##
1534## Autoconf initialization. ##
1535## ------------------------ ##
1536
1537# ac_fn_c_try_compile LINENO
1538# --------------------------
1539# Try to compile conftest.$ac_ext, and return whether this succeeded.
1540ac_fn_c_try_compile ()
1541{
1542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1543 rm -f conftest.$ac_objext
1544 if { { ac_try="$ac_compile"
1545case "(($ac_try" in
1546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1547 *) ac_try_echo=$ac_try;;
1548esac
1549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1550$as_echo "$ac_try_echo"; } >&5
1551 (eval "$ac_compile") 2>conftest.err
1552 ac_status=$?
1553 if test -s conftest.err; then
1554 grep -v '^ *+' conftest.err >conftest.er1
1555 cat conftest.er1 >&5
1556 mv -f conftest.er1 conftest.err
1557 fi
1558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1559 test $ac_status = 0; } && {
1560 test -z "$ac_c_werror_flag" ||
1561 test ! -s conftest.err
1562 } && test -s conftest.$ac_objext; then :
1563 ac_retval=0
1564else
1565 $as_echo "$as_me: failed program was:" >&5
1566sed 's/^/| /' conftest.$ac_ext >&5
1567
1568 ac_retval=1
1569fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001571 as_fn_set_status $ac_retval
1572
1573} # ac_fn_c_try_compile
1574
1575# ac_fn_c_try_cpp LINENO
1576# ----------------------
1577# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_cpp ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 if { { ac_try="$ac_cpp conftest.$ac_ext"
1582case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585esac
1586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587$as_echo "$ac_try_echo"; } >&5
1588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001596 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1598 test ! -s conftest.err
1599 }; then :
1600 ac_retval=0
1601else
1602 $as_echo "$as_me: failed program was:" >&5
1603sed 's/^/| /' conftest.$ac_ext >&5
1604
1605 ac_retval=1
1606fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001607 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001608 as_fn_set_status $ac_retval
1609
1610} # ac_fn_c_try_cpp
1611
1612# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1613# -------------------------------------------------------
1614# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1615# the include files in INCLUDES and setting the cache variable VAR
1616# accordingly.
1617ac_fn_c_check_header_mongrel ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001620 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1622$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001623if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001624 $as_echo_n "(cached) " >&6
1625fi
1626eval ac_res=\$$3
1627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1628$as_echo "$ac_res" >&6; }
1629else
1630 # Is the header compilable?
1631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1632$as_echo_n "checking $2 usability... " >&6; }
1633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1634/* end confdefs.h. */
1635$4
1636#include <$2>
1637_ACEOF
1638if ac_fn_c_try_compile "$LINENO"; then :
1639 ac_header_compiler=yes
1640else
1641 ac_header_compiler=no
1642fi
1643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1645$as_echo "$ac_header_compiler" >&6; }
1646
1647# Is the header present?
1648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1649$as_echo_n "checking $2 presence... " >&6; }
1650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1651/* end confdefs.h. */
1652#include <$2>
1653_ACEOF
1654if ac_fn_c_try_cpp "$LINENO"; then :
1655 ac_header_preproc=yes
1656else
1657 ac_header_preproc=no
1658fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001659rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1661$as_echo "$ac_header_preproc" >&6; }
1662
1663# So? What about this header?
1664case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1665 yes:no: )
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1667$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1669$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1670 ;;
1671 no:yes:* )
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1673$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1675$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1677$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1679$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1681$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001682( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001683## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001684## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001685 ) | sed "s/^/$as_me: WARNING: /" >&2
1686 ;;
1687esac
1688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1689$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001690if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001691 $as_echo_n "(cached) " >&6
1692else
1693 eval "$3=\$ac_header_compiler"
1694fi
1695eval ac_res=\$$3
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1697$as_echo "$ac_res" >&6; }
1698fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001699 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001700
1701} # ac_fn_c_check_header_mongrel
1702
1703# ac_fn_c_try_run LINENO
1704# ----------------------
1705# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1706# that executables *can* be run.
1707ac_fn_c_try_run ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 if { { ac_try="$ac_link"
1711case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_link") 2>&5
1718 ac_status=$?
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1721 { { case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_try") 2>&5
1728 ac_status=$?
1729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1730 test $ac_status = 0; }; }; then :
1731 ac_retval=0
1732else
1733 $as_echo "$as_me: program exited with status $ac_status" >&5
1734 $as_echo "$as_me: failed program was:" >&5
1735sed 's/^/| /' conftest.$ac_ext >&5
1736
1737 ac_retval=$ac_status
1738fi
1739 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001741 as_fn_set_status $ac_retval
1742
1743} # ac_fn_c_try_run
1744
1745# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1746# -------------------------------------------------------
1747# Tests whether HEADER exists and can be compiled using the include files in
1748# INCLUDES, setting the cache variable VAR accordingly.
1749ac_fn_c_check_header_compile ()
1750{
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1753$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001754if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001755 $as_echo_n "(cached) " >&6
1756else
1757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759$4
1760#include <$2>
1761_ACEOF
1762if ac_fn_c_try_compile "$LINENO"; then :
1763 eval "$3=yes"
1764else
1765 eval "$3=no"
1766fi
1767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768fi
1769eval ac_res=\$$3
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1771$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001773
1774} # ac_fn_c_check_header_compile
1775
1776# ac_fn_c_try_link LINENO
1777# -----------------------
1778# Try to link conftest.$ac_ext, and return whether this succeeded.
1779ac_fn_c_try_link ()
1780{
1781 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1782 rm -f conftest.$ac_objext conftest$ac_exeext
1783 if { { ac_try="$ac_link"
1784case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_link") 2>conftest.err
1791 ac_status=$?
1792 if test -s conftest.err; then
1793 grep -v '^ *+' conftest.err >conftest.er1
1794 cat conftest.er1 >&5
1795 mv -f conftest.er1 conftest.err
1796 fi
1797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1798 test $ac_status = 0; } && {
1799 test -z "$ac_c_werror_flag" ||
1800 test ! -s conftest.err
1801 } && test -s conftest$ac_exeext && {
1802 test "$cross_compiling" = yes ||
1803 $as_test_x conftest$ac_exeext
1804 }; then :
1805 ac_retval=0
1806else
1807 $as_echo "$as_me: failed program was:" >&5
1808sed 's/^/| /' conftest.$ac_ext >&5
1809
1810 ac_retval=1
1811fi
1812 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1813 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1814 # interfere with the next link command; also delete a directory that is
1815 # left behind by Apple's compiler. We do this before executing the actions.
1816 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_c_try_link
1821
1822# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1823# -------------------------------------------
1824# Tests whether TYPE exists after having included INCLUDES, setting cache
1825# variable VAR accordingly.
1826ac_fn_c_check_type ()
1827{
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001831if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001832 $as_echo_n "(cached) " >&6
1833else
1834 eval "$3=no"
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h. */
1837$4
1838int
1839main ()
1840{
1841if (sizeof ($2))
1842 return 0;
1843 ;
1844 return 0;
1845}
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849/* end confdefs.h. */
1850$4
1851int
1852main ()
1853{
1854if (sizeof (($2)))
1855 return 0;
1856 ;
1857 return 0;
1858}
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861
1862else
1863 eval "$3=yes"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1868fi
1869eval ac_res=\$$3
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1871$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001873
1874} # ac_fn_c_check_type
1875
1876# ac_fn_c_find_uintX_t LINENO BITS VAR
1877# ------------------------------------
1878# Finds an unsigned integer type with width BITS, setting cache variable VAR
1879# accordingly.
1880ac_fn_c_find_uintX_t ()
1881{
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1884$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001885if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001886 $as_echo_n "(cached) " >&6
1887else
1888 eval "$3=no"
1889 # Order is important - never check a type that is potentially smaller
1890 # than half of the expected target width.
1891 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1892 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$ac_includes_default
1896int
1897main ()
1898{
1899static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1900test_array [0] = 0
1901
1902 ;
1903 return 0;
1904}
1905_ACEOF
1906if ac_fn_c_try_compile "$LINENO"; then :
1907 case $ac_type in #(
1908 uint$2_t) :
1909 eval "$3=yes" ;; #(
1910 *) :
1911 eval "$3=\$ac_type" ;;
1912esac
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001915 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916
1917else
1918 break
1919fi
1920 done
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001926
1927} # ac_fn_c_find_uintX_t
1928
1929# ac_fn_c_find_intX_t LINENO BITS VAR
1930# -----------------------------------
1931# Finds a signed integer type with width BITS, setting cache variable VAR
1932# accordingly.
1933ac_fn_c_find_intX_t ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1937$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001938if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 # Order is important - never check a type that is potentially smaller
1943 # than half of the expected target width.
1944 for ac_type in int$2_t 'int' 'long int' \
1945 'long long int' 'short int' 'signed char'; do
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001949 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001950int
1951main ()
1952{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001953static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001954test_array [0] = 0
1955
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001964 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001965int
1966main ()
1967{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001968static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001969 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1970test_array [0] = 0
1971
1972 ;
1973 return 0;
1974}
1975_ACEOF
1976if ac_fn_c_try_compile "$LINENO"; then :
1977
1978else
1979 case $ac_type in #(
1980 int$2_t) :
1981 eval "$3=yes" ;; #(
1982 *) :
1983 eval "$3=\$ac_type" ;;
1984esac
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001989 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001990
1991else
1992 break
1993fi
1994 done
1995fi
1996eval ac_res=\$$3
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001999 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001} # ac_fn_c_find_intX_t
2002
2003# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2004# --------------------------------------------
2005# Tries to find the compile-time value of EXPR in a program that includes
2006# INCLUDES, setting VAR accordingly. Returns whether the value could be
2007# computed
2008ac_fn_c_compute_int ()
2009{
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if test "$cross_compiling" = yes; then
2012 # Depending upon the size, compute the lo and hi bounds.
2013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) >= 0)];
2020test_array [0] = 0
2021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_lo=0 ac_mid=0
2028 while :; do
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030/* end confdefs.h. */
2031$4
2032int
2033main ()
2034{
2035static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2036test_array [0] = 0
2037
2038 ;
2039 return 0;
2040}
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"; then :
2043 ac_hi=$ac_mid; break
2044else
2045 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2046 if test $ac_lo -le $ac_mid; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
2050 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053 done
2054else
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) < 0)];
2062test_array [0] = 0
2063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_hi=-1 ac_mid=-1
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2078test_array [0] = 0
2079
2080 ;
2081 return 0;
2082}
2083_ACEOF
2084if ac_fn_c_try_compile "$LINENO"; then :
2085 ac_lo=$ac_mid; break
2086else
2087 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2088 if test $ac_mid -le $ac_hi; then
2089 ac_lo= ac_hi=
2090 break
2091 fi
2092 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095 done
2096else
2097 ac_lo= ac_hi=
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100fi
2101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2102# Binary search between lo and hi bounds.
2103while test "x$ac_lo" != "x$ac_hi"; do
2104 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2112test_array [0] = 0
2113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_hi=$ac_mid
2120else
2121 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2122fi
2123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124done
2125case $ac_lo in #((
2126?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2127'') ac_retval=1 ;;
2128esac
2129 else
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131/* end confdefs.h. */
2132$4
2133static long int longval () { return $2; }
2134static unsigned long int ulongval () { return $2; }
2135#include <stdio.h>
2136#include <stdlib.h>
2137int
2138main ()
2139{
2140
2141 FILE *f = fopen ("conftest.val", "w");
2142 if (! f)
2143 return 1;
2144 if (($2) < 0)
2145 {
2146 long int i = longval ();
2147 if (i != ($2))
2148 return 1;
2149 fprintf (f, "%ld", i);
2150 }
2151 else
2152 {
2153 unsigned long int i = ulongval ();
2154 if (i != ($2))
2155 return 1;
2156 fprintf (f, "%lu", i);
2157 }
2158 /* Do not output a trailing newline, as this causes \r\n confusion
2159 on some platforms. */
2160 return ferror (f) || fclose (f) != 0;
2161
2162 ;
2163 return 0;
2164}
2165_ACEOF
2166if ac_fn_c_try_run "$LINENO"; then :
2167 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2168else
2169 ac_retval=1
2170fi
2171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2172 conftest.$ac_objext conftest.beam conftest.$ac_ext
2173rm -f conftest.val
2174
2175 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002176 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002177 as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_compute_int
2180
2181# ac_fn_c_check_func LINENO FUNC VAR
2182# ----------------------------------
2183# Tests whether FUNC exists, setting the cache variable VAR accordingly
2184ac_fn_c_check_func ()
2185{
2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2188$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002189if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002190 $as_echo_n "(cached) " >&6
2191else
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193/* end confdefs.h. */
2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2196#define $2 innocuous_$2
2197
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $2 (); below.
2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2201 <limits.h> exists even on freestanding compilers. */
2202
2203#ifdef __STDC__
2204# include <limits.h>
2205#else
2206# include <assert.h>
2207#endif
2208
2209#undef $2
2210
2211/* Override any GCC internal prototype to avoid an error.
2212 Use char because int might match the return type of a GCC
2213 builtin and then its argument prototype would still apply. */
2214#ifdef __cplusplus
2215extern "C"
2216#endif
2217char $2 ();
2218/* The GNU C library defines this for functions which it implements
2219 to always fail with ENOSYS. Some functions are actually named
2220 something starting with __ and the normal name is an alias. */
2221#if defined __stub_$2 || defined __stub___$2
2222choke me
2223#endif
2224
2225int
2226main ()
2227{
2228return $2 ();
2229 ;
2230 return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_link "$LINENO"; then :
2234 eval "$3=yes"
2235else
2236 eval "$3=no"
2237fi
2238rm -f core conftest.err conftest.$ac_objext \
2239 conftest$ac_exeext conftest.$ac_ext
2240fi
2241eval ac_res=\$$3
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2243$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002245
2246} # ac_fn_c_check_func
2247
2248# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2249# ----------------------------------------------------
2250# Tries to find if the field MEMBER exists in type AGGR, after including
2251# INCLUDES, setting cache variable VAR accordingly.
2252ac_fn_c_check_member ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2256$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002257if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262$5
2263int
2264main ()
2265{
2266static $2 ac_aggr;
2267if (ac_aggr.$3)
2268return 0;
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"; then :
2274 eval "$4=yes"
2275else
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278$5
2279int
2280main ()
2281{
2282static $2 ac_aggr;
2283if (sizeof ac_aggr.$3)
2284return 0;
2285 ;
2286 return 0;
2287}
2288_ACEOF
2289if ac_fn_c_try_compile "$LINENO"; then :
2290 eval "$4=yes"
2291else
2292 eval "$4=no"
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295fi
2296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2297fi
2298eval ac_res=\$$4
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2300$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002301 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002302
2303} # ac_fn_c_check_member
2304
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002305# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2306# ---------------------------------------------
2307# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2308# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002309ac_fn_c_check_decl ()
2310{
2311 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002312 as_decl_name=`echo $2|sed 's/ *(.*//'`
2313 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2315$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002316if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002317 $as_echo_n "(cached) " >&6
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$4
2322int
2323main ()
2324{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002325#ifndef $as_decl_name
2326#ifdef __cplusplus
2327 (void) $as_decl_use;
2328#else
2329 (void) $as_decl_name;
2330#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002331#endif
2332
2333 ;
2334 return 0;
2335}
2336_ACEOF
2337if ac_fn_c_try_compile "$LINENO"; then :
2338 eval "$3=yes"
2339else
2340 eval "$3=no"
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344eval ac_res=\$$3
2345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2346$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002347 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002348
2349} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002350cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002351This file contains any messages produced by compilers while
2352running configure, to aid debugging if configure makes a mistake.
2353
Martin v. Löwis174440b2008-10-03 08:59:41 +00002354It was created by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +01002355generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002356
2357 $ $0 $@
2358
2359_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002360exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002361{
2362cat <<_ASUNAME
2363## --------- ##
2364## Platform. ##
2365## --------- ##
2366
2367hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2368uname -m = `(uname -m) 2>/dev/null || echo unknown`
2369uname -r = `(uname -r) 2>/dev/null || echo unknown`
2370uname -s = `(uname -s) 2>/dev/null || echo unknown`
2371uname -v = `(uname -v) 2>/dev/null || echo unknown`
2372
2373/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2374/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2375
2376/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2377/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2378/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002379/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002380/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2381/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2382/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383
2384_ASUNAME
2385
2386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387for as_dir in $PATH
2388do
2389 IFS=$as_save_IFS
2390 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002391 $as_echo "PATH: $as_dir"
2392 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002394
2395} >&5
2396
2397cat >&5 <<_ACEOF
2398
2399
2400## ----------- ##
2401## Core tests. ##
2402## ----------- ##
2403
2404_ACEOF
2405
2406
2407# Keep a trace of the command line.
2408# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002409# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002410# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002411# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002412ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002413ac_configure_args0=
2414ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002415ac_must_keep_next=false
2416for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002417do
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 for ac_arg
2419 do
2420 case $ac_arg in
2421 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2422 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2423 | -silent | --silent | --silen | --sile | --sil)
2424 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002425 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002426 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 esac
2428 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002429 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002431 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002433 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002435 case $ac_arg in
2436 *=* | --config-cache | -C | -disable-* | --disable-* \
2437 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2438 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2439 | -with-* | --with-* | -without-* | --without-* | --x)
2440 case "$ac_configure_args0 " in
2441 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2442 esac
2443 ;;
2444 -* ) ac_must_keep_next=true ;;
2445 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002447 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 ;;
2449 esac
2450 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002451done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002452{ ac_configure_args0=; unset ac_configure_args0;}
2453{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455# When interrupted or exit'd, cleanup temporary files, and complete
2456# config.log. We remove comments because anyway the quotes in there
2457# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002458# WARNING: Use '\'' to represent an apostrophe within the trap.
2459# 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 +00002460trap 'exit_status=$?
2461 # Save into config.log some information that might help in debugging.
2462 {
2463 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002464
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002465 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002466## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002467## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002468 echo
2469 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002470(
2471 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2472 eval ac_val=\$$ac_var
2473 case $ac_val in #(
2474 *${as_nl}*)
2475 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002476 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478 esac
2479 case $ac_var in #(
2480 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002481 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2482 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002483 esac ;;
2484 esac
2485 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002490 "s/'\''/'\''\\\\'\'''\''/g;
2491 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2492 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002493 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002495 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002496 esac |
2497 sort
2498)
Martin v. Löwis11437992002-04-12 09:54:03 +00002499 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002500
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002501 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002502## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002503## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_vars
2506 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002510 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514
2515 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002516 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002517## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002518## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 echo
2520 for ac_var in $ac_subst_files
2521 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002522 eval ac_val=\$$ac_var
2523 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002526 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 done | sort
2528 echo
2529 fi
2530
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002532 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002533## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002534## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002536 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 fi
2539 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002540 $as_echo "$as_me: caught signal $ac_signal"
2541 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543 rm -f core *.core core.conftest.* &&
2544 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002546' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002547for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002548 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
2550ac_signal=0
2551
2552# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002555$as_echo "/* confdefs.h */" > confdefs.h
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557# Predefined preprocessor variables.
2558
2559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_NAME "$PACKAGE_NAME"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_VERSION "$PACKAGE_VERSION"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571cat >>confdefs.h <<_ACEOF
2572#define PACKAGE_STRING "$PACKAGE_STRING"
2573_ACEOF
2574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575cat >>confdefs.h <<_ACEOF
2576#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2577_ACEOF
2578
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_URL "$PACKAGE_URL"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583
2584# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002585# Prefer an explicitly selected file to automatically selected ones.
2586ac_site_file1=NONE
2587ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002589 # We do not want a PATH search for config.site.
2590 case $CONFIG_SITE in #((
2591 -*) ac_site_file1=./$CONFIG_SITE;;
2592 */*) ac_site_file1=$CONFIG_SITE;;
2593 *) ac_site_file1=./$CONFIG_SITE;;
2594 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002596 ac_site_file1=$prefix/share/config.site
2597 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002599 ac_site_file1=$ac_default_prefix/share/config.site
2600 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002602for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002604 test "x$ac_site_file" = xNONE && continue
2605 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2607$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609 . "$ac_site_file" \
2610 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2612as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002613See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002614 fi
2615done
2616
2617if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002618 # Some versions of bash will fail to source /dev/null (special files
2619 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2620 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2621 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2622$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002624 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2625 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 esac
2627 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2630$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 >$cache_file
2632fi
2633
2634# Check that the precious variables saved in the cache have kept the same
2635# value.
2636ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2639 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2641 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $ac_old_set,$ac_new_set in
2643 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002644 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2645$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 +00002646 ac_cache_corrupted=: ;;
2647 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2649$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 ac_cache_corrupted=: ;;
2651 ,);;
2652 *)
2653 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002654 # differences in whitespace do not lead to failure.
2655 ac_old_val_w=`echo x $ac_old_val`
2656 ac_new_val_w=`echo x $ac_new_val`
2657 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2659$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2660 ac_cache_corrupted=:
2661 else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2663$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2664 eval $ac_var=\$ac_old_val
2665 fi
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2667$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2669$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 fi;;
2671 esac
2672 # Pass precious variables to config.status.
2673 if test "$ac_new_set" = set; then
2674 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002675 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 *) ac_arg=$ac_var=$ac_new_val ;;
2677 esac
2678 case " $ac_configure_args " in
2679 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 esac
2682 fi
2683done
2684if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2688$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002689 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002691## -------------------- ##
2692## Main body of script. ##
2693## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002694
Guido van Rossum7f43da71994-08-01 12:15:30 +00002695ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002697ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2698ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700
Guido van Rossum627b2d71993-12-24 10:39:16 +00002701
Michael W. Hudson54241132001-12-07 15:38:26 +00002702
Martin v. Löwiseba40652007-08-30 20:10:57 +00002703ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002704
2705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706
Georg Brandlbcd64a32009-03-31 21:45:18 +00002707if test "$prefix" != "/"; then
2708 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2709fi
2710
2711
Martin v. Löwis11437992002-04-12 09:54:03 +00002712
2713
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002714# We don't use PACKAGE_ variables, and they cause conflicts
2715# with other autoconf-based packages that include Python.h
2716grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2717rm confdefs.h
2718mv confdefs.h.new confdefs.h
2719
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002720
Martin v. Löwis174440b2008-10-03 08:59:41 +00002721VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002722
Martin v. Löwis1142de32002-03-29 16:28:31 +00002723
2724SOVERSION=1.0
2725
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002726# The later defininition of _XOPEN_SOURCE disables certain features
2727# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2728
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002729$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002730
2731
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002732# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2733# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2734# them.
2735
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002737
2738
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002739# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2740# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2741# them.
2742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002743$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002744
2745
Martin v. Löwisd6320502004-08-12 13:45:08 +00002746# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2747# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002749$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002750
2751
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002752# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2753# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2754# them.
2755
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002756$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002757
2758
2759
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002760define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002761
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002762# Arguments passed to configure.
2763
2764CONFIG_ARGS="$ac_configure_args"
2765
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2767$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002769if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002770 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002771 case $enableval in
2772 yes)
2773 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002774 if test ! -d "${enableval}"
2775 then
2776 enableval=/
2777 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002778 ;;
2779 esac
2780 case $enableval in
2781 no)
2782 UNIVERSALSDK=
2783 enable_universalsdk=
2784 ;;
2785 *)
2786 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002787 if test ! -d "${UNIVERSALSDK}"
2788 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002789 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002790 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002791 ;;
2792 esac
2793
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002794
Ronald Oussoren988117f2006-04-29 11:31:35 +00002795else
2796
2797 UNIVERSALSDK=
2798 enable_universalsdk=
2799
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002801
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002802if test -n "${UNIVERSALSDK}"
2803then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2805$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002809fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002810
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002812
2813
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002814UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2817$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002818
2819# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002820if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002821 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2823$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002824 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002825 if test "${enable_universalsdk}" ; then
2826 :
2827 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002828 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002829 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002830
2831else
2832
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2834$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002835
2836fi
2837
2838
2839
2840
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002841
2842# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002843if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002844 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002845 if test "${enable_framework}"; then
2846 :
2847 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002848 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002849 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002850 PYTHONFRAMEWORK=${withval}
2851 PYTHONFRAMEWORKDIR=${withval}.framework
2852 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2853
2854else
2855
2856 PYTHONFRAMEWORK=Python
2857 PYTHONFRAMEWORKDIR=Python.framework
2858 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2859
2860fi
2861
Martin v. Löwiseba40652007-08-30 20:10:57 +00002862# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002863if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002865 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002866 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002867 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002868 esac
2869 case $enableval in
2870 no)
2871 PYTHONFRAMEWORK=
2872 PYTHONFRAMEWORKDIR=no-framework
2873 PYTHONFRAMEWORKPREFIX=
2874 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002875 FRAMEWORKINSTALLFIRST=
2876 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002877 FRAMEWORKALTINSTALLFIRST=
2878 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002879 if test "x${prefix}" = "xNONE"; then
2880 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2881 else
2882 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2883 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002884 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002885 ;;
2886 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002887 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002888 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002889 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002890 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002891 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2892 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002893 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002894
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002895 if test "x${prefix}" = "xNONE" ; then
2896 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002897
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002898 else
2899 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2900 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002901
2902 case "${enableval}" in
2903 /System*)
2904 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2905 if test "${prefix}" = "NONE" ; then
2906 # See below
2907 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2908 fi
2909 ;;
2910
2911 /Library*)
2912 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2913 ;;
2914
2915 */Library/Frameworks)
2916 MDIR="`dirname "${enableval}"`"
2917 MDIR="`dirname "${MDIR}"`"
2918 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2919
2920 if test "${prefix}" = "NONE"; then
2921 # User hasn't specified the
2922 # --prefix option, but wants to install
2923 # the framework in a non-default location,
2924 # ensure that the compatibility links get
2925 # installed relative to that prefix as well
2926 # instead of in /usr/local.
2927 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2928 fi
2929 ;;
2930
2931 *)
2932 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2933 ;;
2934 esac
2935
Jack Jansen127e56e2001-09-11 14:41:54 +00002936 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002937
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002938 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002939 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002940 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002941
Martin v. Löwiseba40652007-08-30 20:10:57 +00002942 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002943
Martin v. Löwiseba40652007-08-30 20:10:57 +00002944 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002945
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002946 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2947
2948 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2949
Jack Jansene578a632001-08-15 01:27:14 +00002950 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
Guido van Rossum563e7081996-09-10 18:20:48 +00002952else
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
Jack Jansene578a632001-08-15 01:27:14 +00002954 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002955 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002956 PYTHONFRAMEWORKPREFIX=
2957 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002958 FRAMEWORKINSTALLFIRST=
2959 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002960 FRAMEWORKALTINSTALLFIRST=
2961 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002962 if test "x${prefix}" = "xNONE" ; then
2963 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2964 else
2965 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2966 fi
Jack Jansene578a632001-08-15 01:27:14 +00002967 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002968
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002969
Martin v. Löwiseba40652007-08-30 20:10:57 +00002970fi
2971
Michael W. Hudson54241132001-12-07 15:38:26 +00002972
2973
2974
2975
Jack Jansene578a632001-08-15 01:27:14 +00002976
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002977
2978
Ronald Oussoren5b787322006-06-06 19:50:24 +00002979
2980
2981
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002982
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002983
Jack Jansene578a632001-08-15 01:27:14 +00002984##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002985## AS_HELP_STRING([--with-dyld],
2986## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002987##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002988# Set name for machine-dependent library files
2989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2991$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002992if test -z "$MACHDEP"
2993then
Guido van Rossum563e7081996-09-10 18:20:48 +00002994 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002995 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002996 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002997 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002998 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002999 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003000 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003001 ac_md_system=`echo $ac_sys_system |
3002 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3003 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003004 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003005 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003006
Guido van Rossum07397971997-04-29 21:49:50 +00003007 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003008 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003009 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003010 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003011 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003012 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003013 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003014 esac
3015fi
Guido van Rossum91922671997-10-09 20:24:13 +00003016
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003017# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3018# disable features if it is defined, without any means to access these
3019# features as extensions. For these systems, we skip the definition of
3020# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3021# some feature, make sure there is no alternative way to access this
3022# feature. Also, when using wildcards, make sure you have verified the
3023# need for not defining _XOPEN_SOURCE on all systems matching the
3024# wildcard, and that the wildcard does not include future systems
3025# (which may remove their limitations).
3026case $ac_sys_system/$ac_sys_release in
3027 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3028 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003029 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003030 # In addition, Stefan Krah confirms that issue #1244610 exists through
3031 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003032 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003033 define_xopen_source=no
3034 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3035 # also defined. This can be overridden by defining _BSD_SOURCE
3036 # As this has a different meaning on Linux, only define it on OpenBSD
3037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003038$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003039
3040 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003041 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003042 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3043 # also defined. This can be overridden by defining _BSD_SOURCE
3044 # As this has a different meaning on Linux, only define it on OpenBSD
3045
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003046$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003047
3048 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003049 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3050 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3051 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003052 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 +00003053 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003054 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3055 # request to enable features supported by the standard as a request
3056 # to disable features not supported by the standard. The best way
3057 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3058 # entirely and define __EXTENSIONS__ instead.
3059 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003060 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003061 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3062 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003063 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003064 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003065 define_xopen_source=no;;
3066 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003067 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003068 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003069 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003070 # On FreeBSD 4, the math functions C89 does not cover are never defined
3071 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3072 FreeBSD/4.*)
3073 define_xopen_source=no;;
3074 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3075 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3076 # identifies itself as Darwin/7.*
3077 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3078 # disables platform specific features beyond repair.
3079 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3080 # has no effect, don't bother defining them
3081 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003082 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003083 Darwin/1[0-9].*)
3084 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003085 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3086 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3087 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003088 AIX/4)
3089 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003090 AIX/5)
3091 if test `uname -r` -eq 1; then
3092 define_xopen_source=no
3093 fi
3094 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003095 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3096 # defining NI_NUMERICHOST.
3097 QNX/6.3.2)
3098 define_xopen_source=no
3099 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003100
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003101esac
3102
3103if test $define_xopen_source = yes
3104then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003105
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003106$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003107
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003108
3109 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3110 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3111 # several APIs are not declared. Since this is also needed in some
3112 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003113
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003114$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003115
3116
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003118$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003119
3120
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003121fi
3122
Guido van Rossum91922671997-10-09 20:24:13 +00003123#
3124# SGI compilers allow the specification of the both the ABI and the
3125# ISA on the command line. Depending on the values of these switches,
3126# different and often incompatable code will be generated.
3127#
3128# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3129# thus supply support for various ABI/ISA combinations. The MACHDEP
3130# variable is also adjusted.
3131#
3132
3133if test ! -z "$SGI_ABI"
3134then
3135 CC="cc $SGI_ABI"
3136 LDFLAGS="$SGI_ABI $LDFLAGS"
3137 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3140$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003141
Jack Jansen83f898c2002-12-30 22:23:40 +00003142# And add extra plat-mac for darwin
3143
Jack Jansen7b59b422003-03-17 15:44:10 +00003144
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3146$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003147if test -z "$EXTRAPLATDIR"
3148then
3149 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003150 darwin)
3151 EXTRAPLATDIR="\$(PLATMACDIRS)"
3152 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3153 ;;
3154 *)
3155 EXTRAPLATDIR=""
3156 EXTRAMACHDEPPATH=""
3157 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003158 esac
3159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3161$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003162
Jack Jansen6b08a402004-06-03 12:41:45 +00003163# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3164# it may influence the way we can build extensions, so distutils
3165# needs to check it
3166
Ronald Oussoren988117f2006-04-29 11:31:35 +00003167
Jack Jansen6b08a402004-06-03 12:41:45 +00003168CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003169EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003170
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3172$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003173ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3175$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003176
Guido van Rossum627b2d71993-12-24 10:39:16 +00003177# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003178
3179# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3180# for debug/optimization stuff. BASECFLAGS is for flags that are required
3181# just to get things to compile and link. Users are free to override OPT
3182# when running configure or make. The build should not break if they do.
3183# BASECFLAGS should generally not be messed with, however.
3184
3185# XXX shouldn't some/most/all of this code be merged with the stuff later
3186# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3188$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003189
Martin v. Löwiseba40652007-08-30 20:10:57 +00003190# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003191if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003192 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003194 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003195 without_gcc=yes;;
3196 yes) CC=gcc
3197 without_gcc=no;;
3198 *) CC=$withval
3199 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003200 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003201else
Martin v. Löwis11437992002-04-12 09:54:03 +00003202
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003203 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003204 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003205 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003206 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 case $BE_HOST_CPU in
3208 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003209 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003210 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003211 BASECFLAGS="$BASECFLAGS -export pragma"
3212 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003213 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003214 ;;
3215 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003216 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003217 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003218 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003219 ;;
3220 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003221 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003222 ;;
3223 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003224 AR="\$(srcdir)/Modules/ar_beos"
3225 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003226 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003227 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003228 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003229fi
3230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3232$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003233
Guido van Rossum8b131c51995-03-09 14:10:13 +00003234# If the user switches compilers, we can't believe the cache
3235if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3236then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003237 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003238(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003239fi
3240
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003241# If the user set CFLAGS, use this instead of the automatically
3242# determined setting
3243preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003244ac_ext=c
3245ac_cpp='$CPP $CPPFLAGS'
3246ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3247ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3248ac_compiler_gnu=$ac_cv_c_compiler_gnu
3249if test -n "$ac_tool_prefix"; then
3250 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3251set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3253$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003254if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003255 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003256else
3257 if test -n "$CC"; then
3258 ac_cv_prog_CC="$CC" # Let the user override the test.
3259else
Martin v. Löwis11437992002-04-12 09:54:03 +00003260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3261for as_dir in $PATH
3262do
3263 IFS=$as_save_IFS
3264 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003265 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266 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 +00003267 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003268 $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 +00003269 break 2
3270 fi
3271done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003272 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003274
Jack Jansendd19cf82001-12-06 22:36:17 +00003275fi
3276fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003277CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003278if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3280$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3283$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003284fi
3285
Martin v. Löwiseba40652007-08-30 20:10:57 +00003286
Martin v. Löwis11437992002-04-12 09:54:03 +00003287fi
3288if test -z "$ac_cv_prog_CC"; then
3289 ac_ct_CC=$CC
3290 # Extract the first word of "gcc", so it can be a program name with args.
3291set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3293$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003294if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003295 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003296else
3297 if test -n "$ac_ct_CC"; then
3298 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3299else
3300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3301for as_dir in $PATH
3302do
3303 IFS=$as_save_IFS
3304 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003305 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 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 +00003307 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003308 $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 +00003309 break 2
3310 fi
3311done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003312 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003314
3315fi
3316fi
3317ac_ct_CC=$ac_cv_prog_ac_ct_CC
3318if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3320$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003321else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3323$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003324fi
3325
Martin v. Löwiseba40652007-08-30 20:10:57 +00003326 if test "x$ac_ct_CC" = x; then
3327 CC=""
3328 else
3329 case $cross_compiling:$ac_tool_warned in
3330yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003333ac_tool_warned=yes ;;
3334esac
3335 CC=$ac_ct_CC
3336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003337else
3338 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003339fi
3340
Jack Jansendd19cf82001-12-06 22:36:17 +00003341if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003342 if test -n "$ac_tool_prefix"; then
3343 # 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 +00003344set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3346$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003347if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003348 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003349else
3350 if test -n "$CC"; then
3351 ac_cv_prog_CC="$CC" # Let the user override the test.
3352else
Martin v. Löwis11437992002-04-12 09:54:03 +00003353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3354for as_dir in $PATH
3355do
3356 IFS=$as_save_IFS
3357 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003358 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003359 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 +00003360 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003361 $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 +00003362 break 2
3363 fi
3364done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003365 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003366IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003367
3368fi
3369fi
3370CC=$ac_cv_prog_CC
3371if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3373$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3376$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003377fi
3378
Martin v. Löwiseba40652007-08-30 20:10:57 +00003379
Martin v. Löwis11437992002-04-12 09:54:03 +00003380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003381fi
3382if test -z "$CC"; then
3383 # Extract the first word of "cc", so it can be a program name with args.
3384set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3386$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003387if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003388 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003389else
3390 if test -n "$CC"; then
3391 ac_cv_prog_CC="$CC" # Let the user override the test.
3392else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003393 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3395for as_dir in $PATH
3396do
3397 IFS=$as_save_IFS
3398 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003400 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 +00003401 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3402 ac_prog_rejected=yes
3403 continue
3404 fi
3405 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003407 break 2
3408 fi
3409done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003410 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003411IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003412
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003413if test $ac_prog_rejected = yes; then
3414 # We found a bogon in the path, so make sure we never use it.
3415 set dummy $ac_cv_prog_CC
3416 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003417 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003418 # We chose a different compiler from the bogus one.
3419 # However, it has the same basename, so the bogon will be chosen
3420 # first if we set CC to just the basename; use the full file name.
3421 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003422 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003423 fi
3424fi
3425fi
3426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003427CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3430$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003434fi
3435
Martin v. Löwiseba40652007-08-30 20:10:57 +00003436
Martin v. Löwis11437992002-04-12 09:54:03 +00003437fi
3438if test -z "$CC"; then
3439 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003440 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003441 do
3442 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3443set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3445$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003446if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003447 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003448else
3449 if test -n "$CC"; then
3450 ac_cv_prog_CC="$CC" # Let the user override the test.
3451else
Martin v. Löwis11437992002-04-12 09:54:03 +00003452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3453for as_dir in $PATH
3454do
3455 IFS=$as_save_IFS
3456 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003457 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003458 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 +00003459 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003460 $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 +00003461 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003463done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
3467fi
3468fi
3469CC=$ac_cv_prog_CC
3470if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3472$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3475$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003476fi
3477
Martin v. Löwiseba40652007-08-30 20:10:57 +00003478
Martin v. Löwis11437992002-04-12 09:54:03 +00003479 test -n "$CC" && break
3480 done
3481fi
3482if test -z "$CC"; then
3483 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003484 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003485do
3486 # Extract the first word of "$ac_prog", so it can be a program name with args.
3487set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3489$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003490if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003492else
3493 if test -n "$ac_ct_CC"; then
3494 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3495else
3496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3497for as_dir in $PATH
3498do
3499 IFS=$as_save_IFS
3500 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 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 +00003503 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003504 $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 +00003505 break 2
3506 fi
3507done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003510
Martin v. Löwis11437992002-04-12 09:54:03 +00003511fi
3512fi
3513ac_ct_CC=$ac_cv_prog_ac_ct_CC
3514if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3516$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3519$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003520fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003521
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 test -n "$ac_ct_CC" && break
3524done
Michael W. Hudson54241132001-12-07 15:38:26 +00003525
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526 if test "x$ac_ct_CC" = x; then
3527 CC=""
3528 else
3529 case $cross_compiling:$ac_tool_warned in
3530yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003533ac_tool_warned=yes ;;
3534esac
3535 CC=$ac_ct_CC
3536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003537fi
3538
3539fi
3540
3541
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003542test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003544as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003545See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003546
3547# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003548$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3549set X $ac_compile
3550ac_compiler=$2
3551for ac_option in --version -v -V -qversion; do
3552 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003553case "(($ac_try" in
3554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555 *) ac_try_echo=$ac_try;;
3556esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003557eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3558$as_echo "$ac_try_echo"; } >&5
3559 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003561 if test -s conftest.err; then
3562 sed '10a\
3563... rest of stderr output deleted ...
3564 10q' conftest.err >conftest.er1
3565 cat conftest.er1 >&5
3566 fi
3567 rm -f conftest.er1 conftest.err
3568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }
3570done
Martin v. Löwis11437992002-04-12 09:54:03 +00003571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003573/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003574
Martin v. Löwis11437992002-04-12 09:54:03 +00003575int
3576main ()
3577{
3578
3579 ;
3580 return 0;
3581}
3582_ACEOF
3583ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003584ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003585# Try to create an executable without -o first, disregard a.out.
3586# It will help us diagnose broken compilers, and finding out an intuition
3587# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3589$as_echo_n "checking whether the C compiler works... " >&6; }
3590ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3591
3592# The possible output files:
3593ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3594
Martin v. Löwiseba40652007-08-30 20:10:57 +00003595ac_rmfiles=
3596for ac_file in $ac_files
3597do
3598 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003599 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3601 esac
3602done
3603rm -f $ac_rmfiles
3604
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003605if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606case "(($ac_try" in
3607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3608 *) ac_try_echo=$ac_try;;
3609esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3611$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003614 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3615 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3617# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3618# in a Makefile. We should not override ac_cv_exeext if it was cached,
3619# so that the user can short-circuit this test for compilers unknown to
3620# Autoconf.
3621for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003622do
3623 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003627 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003628 # We found the default executable, but exeext='' is most
3629 # certainly right.
3630 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003631 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003632 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633 then :; else
3634 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3635 fi
3636 # We set ac_cv_exeext here because the later test for it is not
3637 # safe: cross compilers may not add the suffix if given an `-o'
3638 # argument, so we may need to know it at that point already.
3639 # Even if this section looks crufty: it has the advantage of
3640 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003641 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003642 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003643 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 esac
3645done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003646test "$ac_cv_exeext" = no && ac_cv_exeext=
3647
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003648else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003649 ac_file=''
3650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651if test -z "$ac_file"; then :
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
3654$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003655sed 's/^/| /' conftest.$ac_ext >&5
3656
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003659as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003660See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661else
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3663$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3666$as_echo_n "checking for C compiler default output file name... " >&6; }
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3668$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003669ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003670
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003672ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3674$as_echo_n "checking for suffix of executables... " >&6; }
3675if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003676case "(($ac_try" in
3677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3678 *) ac_try_echo=$ac_try;;
3679esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3681$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3685 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3687# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3688# work properly (i.e., refer to `conftest.exe'), while it won't with
3689# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003690for ac_file in conftest.exe conftest conftest.*; do
3691 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003693 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003695 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 * ) break;;
3697 esac
3698done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003702as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003703See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003704fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705rm -f conftest conftest$ac_cv_exeext
3706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3707$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003708
3709rm -f conftest.$ac_ext
3710EXEEXT=$ac_cv_exeext
3711ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3713/* end confdefs.h. */
3714#include <stdio.h>
3715int
3716main ()
3717{
3718FILE *f = fopen ("conftest.out", "w");
3719 return ferror (f) || fclose (f) != 0;
3720
3721 ;
3722 return 0;
3723}
Skip Montanaro6dead952003-09-25 14:50:04 +00003724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003725ac_clean_files="$ac_clean_files conftest.out"
3726# Check that the compiler produces executables we can run. If not, either
3727# the compiler is broken, or we cross compile.
3728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3729$as_echo_n "checking whether we are cross compiling... " >&6; }
3730if test "$cross_compiling" != yes; then
3731 { { ac_try="$ac_link"
3732case "(($ac_try" in
3733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3734 *) ac_try_echo=$ac_try;;
3735esac
3736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3737$as_echo "$ac_try_echo"; } >&5
3738 (eval "$ac_link") 2>&5
3739 ac_status=$?
3740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3741 test $ac_status = 0; }
3742 if { ac_try='./conftest$ac_cv_exeext'
3743 { { case "(($ac_try" in
3744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3745 *) ac_try_echo=$ac_try;;
3746esac
3747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3748$as_echo "$ac_try_echo"; } >&5
3749 (eval "$ac_try") 2>&5
3750 ac_status=$?
3751 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3752 test $ac_status = 0; }; }; then
3753 cross_compiling=no
3754 else
3755 if test "$cross_compiling" = maybe; then
3756 cross_compiling=yes
3757 else
3758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003760as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003761If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01003762See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003763 fi
3764 fi
3765fi
3766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3767$as_echo "$cross_compiling" >&6; }
3768
3769rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3770ac_clean_files=$ac_clean_files_save
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3772$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003773if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003774 $as_echo_n "(cached) " >&6
3775else
3776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Martin v. Löwis11437992002-04-12 09:54:03 +00003779int
3780main ()
3781{
3782
3783 ;
3784 return 0;
3785}
3786_ACEOF
3787rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003788if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789case "(($ac_try" in
3790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3791 *) ac_try_echo=$ac_try;;
3792esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003793eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3794$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003795 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3798 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 for ac_file in conftest.o conftest.obj conftest.*; do
3800 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003802 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003803 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3804 break;;
3805 esac
3806done
3807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003808 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003809sed 's/^/| /' conftest.$ac_ext >&5
3810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003811{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003813as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01003814See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003816rm -f conftest.$ac_cv_objext conftest.$ac_ext
3817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3819$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003820OBJEXT=$ac_cv_objext
3821ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3823$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003824if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830int
3831main ()
3832{
3833#ifndef __GNUC__
3834 choke me
3835#endif
3836
3837 ;
3838 return 0;
3839}
3840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_compiler_gnu=yes
3843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003844 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003847ac_cv_c_compiler_gnu=$ac_compiler_gnu
3848
3849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3851$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3852if test $ac_compiler_gnu = yes; then
3853 GCC=yes
3854else
3855 GCC=
3856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857ac_test_CFLAGS=${CFLAGS+set}
3858ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3860$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003861if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003862 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003863else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864 ac_save_c_werror_flag=$ac_c_werror_flag
3865 ac_c_werror_flag=yes
3866 ac_cv_prog_cc_g=no
3867 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871int
3872main ()
3873{
3874
3875 ;
3876 return 0;
3877}
3878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003879if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003880 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003882 CFLAGS=""
3883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884/* end confdefs.h. */
3885
3886int
3887main ()
3888{
3889
3890 ;
3891 return 0;
3892}
3893_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003895
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896else
3897 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003900/* end confdefs.h. */
3901
3902int
3903main ()
3904{
3905
3906 ;
3907 return 0;
3908}
3909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003911 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3918 ac_c_werror_flag=$ac_save_c_werror_flag
3919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3921$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003922if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924elif test $ac_cv_prog_cc_g = yes; then
3925 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003926 CFLAGS="-g -O2"
3927 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003928 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003929 fi
3930else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003931 if test "$GCC" = yes; then
3932 CFLAGS="-O2"
3933 else
3934 CFLAGS=
3935 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3938$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003939if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003940 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003941else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003942 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003943ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003945/* end confdefs.h. */
3946#include <stdarg.h>
3947#include <stdio.h>
3948#include <sys/types.h>
3949#include <sys/stat.h>
3950/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3951struct buf { int x; };
3952FILE * (*rcsopen) (struct buf *, struct stat *, int);
3953static char *e (p, i)
3954 char **p;
3955 int i;
3956{
3957 return p[i];
3958}
3959static char *f (char * (*g) (char **, int), char **p, ...)
3960{
3961 char *s;
3962 va_list v;
3963 va_start (v,p);
3964 s = g (p, va_arg (v,int));
3965 va_end (v);
3966 return s;
3967}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003968
3969/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3970 function prototypes and stuff, but not '\xHH' hex character constants.
3971 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003973 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3974 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003976int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3977
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3979 inside strings and character constants. */
3980#define FOO(x) 'x'
3981int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3982
Skip Montanaro6dead952003-09-25 14:50:04 +00003983int test (int i, double x);
3984struct s1 {int (*f) (int a);};
3985struct s2 {int (*f) (double a);};
3986int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3987int argc;
3988char **argv;
3989int
3990main ()
3991{
3992return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3993 ;
3994 return 0;
3995}
3996_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003997for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3998 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003999do
4000 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004001 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004002 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004rm -f core conftest.err conftest.$ac_objext
4005 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004006done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004007rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004008CC=$ac_save_CC
4009
4010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004011# AC_CACHE_VAL
4012case "x$ac_cv_prog_cc_c89" in
4013 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4015$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004016 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4018$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004019 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004020 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4022$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004023esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004024if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004025
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004026fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004027
Martin v. Löwis11437992002-04-12 09:54:03 +00004028ac_ext=c
4029ac_cpp='$CPP $CPPFLAGS'
4030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4032ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004034if test ! -z "$preset_cflags"
4035then
4036 CFLAGS=$preset_cflags
4037fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004038
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004039
4040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4042$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004043
Martin v. Löwiseba40652007-08-30 20:10:57 +00004044# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004045if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004046 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004047
4048 case $withval in
4049 no) with_cxx_main=no
4050 MAINCC='$(CC)';;
4051 yes) with_cxx_main=yes
4052 MAINCC='$(CXX)';;
4053 *) with_cxx_main=yes
4054 MAINCC=$withval
4055 if test -z "$CXX"
4056 then
4057 CXX=$withval
4058 fi;;
4059 esac
4060else
4061
4062 with_cxx_main=no
4063 MAINCC='$(CC)'
4064
Martin v. Löwiseba40652007-08-30 20:10:57 +00004065fi
4066
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4068$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004069
4070preset_cxx="$CXX"
4071if test -z "$CXX"
4072then
4073 case "$CC" in
4074 gcc) # Extract the first word of "g++", so it can be a program name with args.
4075set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4077$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004078if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004079 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004080else
4081 case $CXX in
4082 [\\/]* | ?:[\\/]*)
4083 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4084 ;;
4085 *)
4086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4087for as_dir in notfound
4088do
4089 IFS=$as_save_IFS
4090 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004092 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 +00004093 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094 $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 +00004095 break 2
4096 fi
4097done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004098 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004099IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004100
4101 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4102 ;;
4103esac
4104fi
4105CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004106if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4108$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4111$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004113
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004114 ;;
4115 cc) # Extract the first word of "c++", so it can be a program name with args.
4116set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004119if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004120 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004121else
4122 case $CXX in
4123 [\\/]* | ?:[\\/]*)
4124 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4125 ;;
4126 *)
4127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in notfound
4129do
4130 IFS=$as_save_IFS
4131 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133 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 +00004134 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135 $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 +00004136 break 2
4137 fi
4138done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004139 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004141
4142 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4143 ;;
4144esac
4145fi
4146CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004147if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4149$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004150else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4152$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004154
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004155 ;;
4156 esac
4157 if test "$CXX" = "notfound"
4158 then
4159 CXX=""
4160 fi
4161fi
4162if test -z "$CXX"
4163then
4164 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4165do
4166 # Extract the first word of "$ac_prog", so it can be a program name with args.
4167set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4169$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004170if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004171 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004172else
4173 if test -n "$CXX"; then
4174 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4175else
4176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 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 +00004183 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004184 $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 +00004185 break 2
4186 fi
4187done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004190
4191fi
4192fi
4193CXX=$ac_cv_prog_CXX
4194if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4196$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4199$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004200fi
4201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004203 test -n "$CXX" && break
4204done
4205test -n "$CXX" || CXX="notfound"
4206
4207 if test "$CXX" = "notfound"
4208 then
4209 CXX=""
4210 fi
4211fi
4212if test "$preset_cxx" != "$CXX"
4213then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004215
4216 By default, distutils will build C++ extension modules with \"$CXX\".
4217 If this is not intended, then set CXX on the configure command line.
4218 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004219$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004220
4221 By default, distutils will build C++ extension modules with \"$CXX\".
4222 If this is not intended, then set CXX on the configure command line.
4223 " >&2;}
4224fi
4225
4226
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004227# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004228
4229ac_ext=c
4230ac_cpp='$CPP $CPPFLAGS'
4231ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4232ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4233ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4235$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004236# On Suns, sometimes $CPP names a directory.
4237if test -n "$CPP" && test -d "$CPP"; then
4238 CPP=
4239fi
4240if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004241 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004242 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004243else
Martin v. Löwis11437992002-04-12 09:54:03 +00004244 # Double quotes because CPP needs to be expanded
4245 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4246 do
4247 ac_preproc_ok=false
4248for ac_c_preproc_warn_flag in '' yes
4249do
4250 # Use a header file that comes with gcc, so configuring glibc
4251 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004252 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4253 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004254 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004255 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#ifdef __STDC__
4259# include <limits.h>
4260#else
4261# include <assert.h>
4262#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004263 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004264_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004267else
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 # Broken: fails on valid input.
4269continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004270fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004271rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004272
Martin v. Löwiseba40652007-08-30 20:10:57 +00004273 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004277#include <ac_nonexistent.h>
4278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004279if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004280 # Broken: success on invalid input.
4281continue
4282else
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 # Passes both tests.
4284ac_preproc_ok=:
4285break
4286fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004287rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004288
4289done
4290# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004291rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004292if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 break
4294fi
4295
4296 done
4297 ac_cv_prog_CPP=$CPP
4298
4299fi
4300 CPP=$ac_cv_prog_CPP
4301else
4302 ac_cv_prog_CPP=$CPP
4303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4305$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004306ac_preproc_ok=false
4307for ac_c_preproc_warn_flag in '' yes
4308do
4309 # Use a header file that comes with gcc, so configuring glibc
4310 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004311 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4312 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004313 # On the NeXT, cc -E runs the code through the compiler's parser,
4314 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004316/* end confdefs.h. */
4317#ifdef __STDC__
4318# include <limits.h>
4319#else
4320# include <assert.h>
4321#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004322 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004326else
Martin v. Löwis11437992002-04-12 09:54:03 +00004327 # Broken: fails on valid input.
4328continue
4329fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004330rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004331
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004333 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004336#include <ac_nonexistent.h>
4337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004338if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004339 # Broken: success on invalid input.
4340continue
4341else
Martin v. Löwis11437992002-04-12 09:54:03 +00004342 # Passes both tests.
4343ac_preproc_ok=:
4344break
4345fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004346rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004347
4348done
4349# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004350rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351if $ac_preproc_ok; then :
4352
Martin v. Löwis11437992002-04-12 09:54:03 +00004353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004356as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004357See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004358fi
4359
4360ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
4365
4366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4368$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004369if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004370 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004373 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004374 # Loop through the user's path and test for each of PROGNAME-LIST
4375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004376for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4377do
4378 IFS=$as_save_IFS
4379 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004380 for ac_prog in grep ggrep; do
4381 for ac_exec_ext in '' $ac_executable_extensions; do
4382 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4383 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4384# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004385 # Check for GNU $ac_path_GREP
4386case `"$ac_path_GREP" --version 2>&1` in
4387*GNU*)
4388 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4389*)
4390 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004392 while :
4393 do
4394 cat "conftest.in" "conftest.in" >"conftest.tmp"
4395 mv "conftest.tmp" "conftest.in"
4396 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004397 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004398 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4399 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004400 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004401 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4402 # Best one so far, save it but keep looking for a better one
4403 ac_cv_path_GREP="$ac_path_GREP"
4404 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004405 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 # 10*(2^10) chars as input seems more than enough
4407 test $ac_count -gt 10 && break
4408 done
4409 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4410esac
4411
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004412 $ac_path_GREP_found && break 3
4413 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004414 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004415 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004416IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004417 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004418 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 +00004419 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004420else
4421 ac_cv_path_GREP=$GREP
4422fi
4423
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4426$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004427 GREP="$ac_cv_path_GREP"
4428
4429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4431$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004432if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004433 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004434else
4435 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4436 then ac_cv_path_EGREP="$GREP -E"
4437 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004438 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004439 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004440 # Loop through the user's path and test for each of PROGNAME-LIST
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004442for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004446 for ac_prog in egrep; do
4447 for ac_exec_ext in '' $ac_executable_extensions; do
4448 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4449 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4450# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004451 # Check for GNU $ac_path_EGREP
4452case `"$ac_path_EGREP" --version 2>&1` in
4453*GNU*)
4454 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4455*)
4456 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004458 while :
4459 do
4460 cat "conftest.in" "conftest.in" >"conftest.tmp"
4461 mv "conftest.tmp" "conftest.in"
4462 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004463 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004464 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4465 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004466 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004467 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4468 # Best one so far, save it but keep looking for a better one
4469 ac_cv_path_EGREP="$ac_path_EGREP"
4470 ac_path_EGREP_max=$ac_count
4471 fi
4472 # 10*(2^10) chars as input seems more than enough
4473 test $ac_count -gt 10 && break
4474 done
4475 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4476esac
4477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004478 $ac_path_EGREP_found && break 3
4479 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004481 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004482IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004483 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004484 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 +00004485 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486else
4487 ac_cv_path_EGREP=$EGREP
4488fi
4489
Martin v. Löwiseba40652007-08-30 20:10:57 +00004490 fi
4491fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4493$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004495
4496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4498$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004499if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004500 $as_echo_n "(cached) " >&6
4501else
4502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004503/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004504#include <stdlib.h>
4505#include <stdarg.h>
4506#include <string.h>
4507#include <float.h>
4508
4509int
4510main ()
4511{
4512
4513 ;
4514 return 0;
4515}
4516_ACEOF
4517if ac_fn_c_try_compile "$LINENO"; then :
4518 ac_cv_header_stdc=yes
4519else
4520 ac_cv_header_stdc=no
4521fi
4522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4523
4524if test $ac_cv_header_stdc = yes; then
4525 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4527/* end confdefs.h. */
4528#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004529
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004530_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004533
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004536fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004537rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004539fi
4540
4541if test $ac_cv_header_stdc = yes; then
4542 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h. */
4545#include <stdlib.h>
4546
4547_ACEOF
4548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4549 $EGREP "free" >/dev/null 2>&1; then :
4550
4551else
4552 ac_cv_header_stdc=no
4553fi
4554rm -f conftest*
4555
4556fi
4557
4558if test $ac_cv_header_stdc = yes; then
4559 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4560 if test "$cross_compiling" = yes; then :
4561 :
4562else
4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4564/* end confdefs.h. */
4565#include <ctype.h>
4566#include <stdlib.h>
4567#if ((' ' & 0x0FF) == 0x020)
4568# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4569# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4570#else
4571# define ISLOWER(c) \
4572 (('a' <= (c) && (c) <= 'i') \
4573 || ('j' <= (c) && (c) <= 'r') \
4574 || ('s' <= (c) && (c) <= 'z'))
4575# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4576#endif
4577
4578#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4579int
4580main ()
4581{
4582 int i;
4583 for (i = 0; i < 256; i++)
4584 if (XOR (islower (i), ISLOWER (i))
4585 || toupper (i) != TOUPPER (i))
4586 return 2;
4587 return 0;
4588}
4589_ACEOF
4590if ac_fn_c_try_run "$LINENO"; then :
4591
4592else
4593 ac_cv_header_stdc=no
4594fi
4595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4596 conftest.$ac_objext conftest.beam conftest.$ac_ext
4597fi
4598
4599fi
4600fi
4601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4602$as_echo "$ac_cv_header_stdc" >&6; }
4603if test $ac_cv_header_stdc = yes; then
4604
4605$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4606
4607fi
4608
4609# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4610for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4611 inttypes.h stdint.h unistd.h
4612do :
4613 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4614ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4615"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004616if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004617 cat >>confdefs.h <<_ACEOF
4618#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4619_ACEOF
4620
4621fi
4622
4623done
4624
4625
4626
4627 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 +01004628if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004629 MINIX=yes
4630else
4631 MINIX=
4632fi
4633
4634
4635 if test "$MINIX" = yes; then
4636
4637$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4638
4639
4640$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4641
4642
4643$as_echo "#define _MINIX 1" >>confdefs.h
4644
4645 fi
4646
4647
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4649$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004650if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004651 $as_echo_n "(cached) " >&6
4652else
4653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4654/* end confdefs.h. */
4655
4656# define __EXTENSIONS__ 1
4657 $ac_includes_default
4658int
4659main ()
4660{
4661
4662 ;
4663 return 0;
4664}
4665_ACEOF
4666if ac_fn_c_try_compile "$LINENO"; then :
4667 ac_cv_safe_to_define___extensions__=yes
4668else
4669 ac_cv_safe_to_define___extensions__=no
4670fi
4671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4672fi
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4674$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4675 test $ac_cv_safe_to_define___extensions__ = yes &&
4676 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4677
4678 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4679
4680 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4681
4682 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4683
4684 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4685
4686
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004687
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004688# Check for unsupported systems
4689case $ac_sys_system/$ac_sys_release in
4690atheos*|Linux*/1*)
4691 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4692 echo See README for details.
4693 exit 1;;
4694esac
4695
4696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4698$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004699
4700# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004701if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004702 withval=$with_suffix;
4703 case $withval in
4704 no) EXEEXT=;;
4705 yes) EXEEXT=.exe;;
4706 *) EXEEXT=$withval;;
4707 esac
4708fi
4709
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4711$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004712
4713# Test whether we're running on a non-case-sensitive system, in which
4714# case we give a warning if no ext is given
4715
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4717$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004718if test ! -d CaseSensitiveTestDir; then
4719mkdir CaseSensitiveTestDir
4720fi
4721
4722if test -d casesensitivetestdir
4723then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4725$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004726 BUILDEXEEXT=.exe
4727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4729$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004730 BUILDEXEEXT=$EXEEXT
4731fi
4732rmdir CaseSensitiveTestDir
4733
4734case $MACHDEP in
4735bsdos*)
4736 case $CC in
4737 gcc) CC="$CC -D_HAVE_BSDI";;
4738 esac;;
4739esac
4740
4741case $ac_sys_system in
4742hp*|HP*)
4743 case $CC in
4744 cc|*/cc) CC="$CC -Ae";;
4745 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004746SunOS*)
4747 # Some functions have a prototype only with that define, e.g. confstr
4748
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004749$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004750
4751 ;;
4752esac
4753
4754
4755
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4757$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004758if test -z "$LIBRARY"
4759then
4760 LIBRARY='libpython$(VERSION).a'
4761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4763$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004764
4765# LDLIBRARY is the name of the library to link against (as opposed to the
4766# name of the library into which to insert object files). BLDLIBRARY is also
4767# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4768# is blank as the main program is not linked directly against LDLIBRARY.
4769# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4770# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4771# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4772# DLLLIBRARY is the shared (i.e., DLL) library.
4773#
4774# RUNSHARED is used to run shared python without installed libraries
4775#
4776# INSTSONAME is the name of the shared library that will be use to install
4777# on the system - some systems like version suffix, others don't
4778
4779
4780
4781
4782
4783
4784LDLIBRARY="$LIBRARY"
4785BLDLIBRARY='$(LDLIBRARY)'
4786INSTSONAME='$(LDLIBRARY)'
4787DLLLIBRARY=''
4788LDLIBRARYDIR=''
4789RUNSHARED=''
4790
4791# LINKCC is the command that links the python executable -- default is $(CC).
4792# If CXX is set, and if it is needed to link a main function that was
4793# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4794# python might then depend on the C++ runtime
4795# This is altered for AIX in order to build the export list before
4796# linking.
4797
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4799$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004800if test -z "$LINKCC"
4801then
4802 LINKCC='$(PURIFY) $(MAINCC)'
4803 case $ac_sys_system in
4804 AIX*)
4805 exp_extra="\"\""
4806 if test $ac_sys_release -ge 5 -o \
4807 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4808 exp_extra="."
4809 fi
4810 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004811 QNX*)
4812 # qcc must be used because the other compilers do not
4813 # support -N.
4814 LINKCC=qcc;;
4815 esac
4816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4818$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004819
4820# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4821# make sure we default having it set to "no": this is used by
4822# distutils.unixccompiler to know if it should add --enable-new-dtags
4823# to linker command lines, and failing to detect GNU ld simply results
4824# in the same bahaviour as before.
4825
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4827$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828ac_prog=ld
4829if test "$GCC" = yes; then
4830 ac_prog=`$CC -print-prog-name=ld`
4831fi
4832case `"$ac_prog" -V 2>&1 < /dev/null` in
4833 *GNU*)
4834 GNULD=yes;;
4835 *)
4836 GNULD=no;;
4837esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4839$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4842$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004843# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004844if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004845 enableval=$enable_shared;
4846fi
4847
4848
4849if test -z "$enable_shared"
4850then
4851 case $ac_sys_system in
4852 CYGWIN* | atheos*)
4853 enable_shared="yes";;
4854 *)
4855 enable_shared="no";;
4856 esac
4857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4859$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4862$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004864if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004865 enableval=$enable_profiling; ac_save_cc="$CC"
4866 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004867 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004868 ac_enable_profiling="no"
4869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004871/* end confdefs.h. */
4872int main() { return 0; }
4873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004875 ac_enable_profiling="yes"
4876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004881fi
4882
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004883 CC="$ac_save_cc"
4884fi
4885
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4887$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004888
4889case "$ac_enable_profiling" in
4890 "yes")
4891 BASECFLAGS="-pg $BASECFLAGS"
4892 LDFLAGS="-pg $LDFLAGS"
4893 ;;
4894esac
4895
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4897$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004898
4899# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4900# library that we build, but we do not want to link against it (we
4901# will find it with a -framework option). For this reason there is an
4902# extra variable BLDLIBRARY against which Python and the extension
4903# modules are linked, BLDLIBRARY. This is normally the same as
4904# LDLIBRARY, but empty for MacOSX framework builds.
4905if test "$enable_framework"
4906then
4907 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4908 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4909 BLDLIBRARY=''
4910else
4911 BLDLIBRARY='$(LDLIBRARY)'
4912fi
4913
4914# Other platforms follow
4915if test $enable_shared = "yes"; then
4916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004917$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004918
4919 case $ac_sys_system in
4920 BeOS*)
4921 LDLIBRARY='libpython$(VERSION).so'
4922 ;;
4923 CYGWIN*)
4924 LDLIBRARY='libpython$(VERSION).dll.a'
4925 DLLLIBRARY='libpython$(VERSION).dll'
4926 ;;
4927 SunOS*)
4928 LDLIBRARY='libpython$(VERSION).so'
4929 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4930 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4931 INSTSONAME="$LDLIBRARY".$SOVERSION
4932 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004933 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004934 LDLIBRARY='libpython$(VERSION).so'
4935 BLDLIBRARY='-L. -lpython$(VERSION)'
4936 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4937 case $ac_sys_system in
4938 FreeBSD*)
4939 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4940 ;;
4941 esac
4942 INSTSONAME="$LDLIBRARY".$SOVERSION
4943 ;;
4944 hp*|HP*)
4945 case `uname -m` in
4946 ia64)
4947 LDLIBRARY='libpython$(VERSION).so'
4948 ;;
4949 *)
4950 LDLIBRARY='libpython$(VERSION).sl'
4951 ;;
4952 esac
4953 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4954 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4955 ;;
4956 OSF*)
4957 LDLIBRARY='libpython$(VERSION).so'
4958 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4959 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4960 ;;
4961 atheos*)
4962 LDLIBRARY='libpython$(VERSION).so'
4963 BLDLIBRARY='-L. -lpython$(VERSION)'
4964 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4965 ;;
4966 Darwin*)
4967 LDLIBRARY='libpython$(VERSION).dylib'
4968 BLDLIBRARY='-L. -lpython$(VERSION)'
4969 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4970 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004971 AIX*)
4972 LDLIBRARY='libpython$(VERSION).so'
4973 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4974 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004975
4976 esac
4977else # shared is disabled
4978 case $ac_sys_system in
4979 CYGWIN*)
4980 BLDLIBRARY='$(LIBRARY)'
4981 LDLIBRARY='libpython$(VERSION).dll.a'
4982 ;;
4983 esac
4984fi
4985
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4987$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988
4989if test -n "$ac_tool_prefix"; then
4990 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4991set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004994if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004996else
4997 if test -n "$RANLIB"; then
4998 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4999else
5000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5001for as_dir in $PATH
5002do
5003 IFS=$as_save_IFS
5004 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005006 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5007 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005009 break 2
5010 fi
5011done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005013IFS=$as_save_IFS
5014
5015fi
5016fi
5017RANLIB=$ac_cv_prog_RANLIB
5018if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5020$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5023$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005024fi
5025
5026
5027fi
5028if test -z "$ac_cv_prog_RANLIB"; then
5029 ac_ct_RANLIB=$RANLIB
5030 # Extract the first word of "ranlib", so it can be a program name with args.
5031set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005034if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005035 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005036else
5037 if test -n "$ac_ct_RANLIB"; then
5038 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5039else
5040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in $PATH
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005045 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5047 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005049 break 2
5050 fi
5051done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005052 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005053IFS=$as_save_IFS
5054
5055fi
5056fi
5057ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5058if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5060$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005064fi
5065
5066 if test "x$ac_ct_RANLIB" = x; then
5067 RANLIB=":"
5068 else
5069 case $cross_compiling:$ac_tool_warned in
5070yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005071{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5072$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005073ac_tool_warned=yes ;;
5074esac
5075 RANLIB=$ac_ct_RANLIB
5076 fi
5077else
5078 RANLIB="$ac_cv_prog_RANLIB"
5079fi
5080
5081
5082for ac_prog in ar aal
5083do
5084 # Extract the first word of "$ac_prog", so it can be a program name with args.
5085set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005088if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005089 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005090else
5091 if test -n "$AR"; then
5092 ac_cv_prog_AR="$AR" # Let the user override the test.
5093else
5094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in $PATH
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005099 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005100 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5101 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005103 break 2
5104 fi
5105done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005106 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005107IFS=$as_save_IFS
5108
5109fi
5110fi
5111AR=$ac_cv_prog_AR
5112if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5114$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005118fi
5119
5120
5121 test -n "$AR" && break
5122done
5123test -n "$AR" || AR="ar"
5124
5125
5126# tweak ARFLAGS only if the user didn't set it on the command line
5127
5128if test -z "$ARFLAGS"
5129then
5130 ARFLAGS="rc"
5131fi
5132
5133
5134# Extract the first word of "svnversion", so it can be a program name with args.
5135set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5137$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005138if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140else
5141 if test -n "$SVNVERSION"; then
5142 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5143else
5144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5145for as_dir in $PATH
5146do
5147 IFS=$as_save_IFS
5148 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005149 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005150 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5151 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005153 break 2
5154 fi
5155done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005157IFS=$as_save_IFS
5158
5159 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5160fi
5161fi
5162SVNVERSION=$ac_cv_prog_SVNVERSION
5163if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5165$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005169fi
5170
5171
5172if test $SVNVERSION = found
5173then
5174 SVNVERSION="svnversion \$(srcdir)"
5175else
5176 SVNVERSION="echo Unversioned directory"
5177fi
5178
Trent Nelsond86ceec2012-10-16 09:42:45 -04005179
Trent Nelsonabf20512012-10-17 04:32:49 -04005180if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005181 # If we're building out-of-tree make sure Include (in the current dir)
5182 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5183 # and graminit.h to get picked up from the correct directory.
5184 # (A side effect of this is that these resources will automatically be
5185 # regenerated when building out-of-tree, regardless of whether or not
5186 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5187 # off.)
5188 BASECPPFLAGS="-IInclude"
5189else
5190 BASECPPFLAGS=""
5191fi
5192
Georg Brandl3a5508e2011-03-06 10:42:21 +01005193
5194
5195
5196# Extract the first word of "hg", so it can be a program name with args.
5197set dummy hg; ac_word=$2
5198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5199$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005200if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005201 $as_echo_n "(cached) " >&6
5202else
5203 if test -n "$HAS_HG"; then
5204 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5205else
5206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5207for as_dir in $PATH
5208do
5209 IFS=$as_save_IFS
5210 test -z "$as_dir" && as_dir=.
5211 for ac_exec_ext in '' $ac_executable_extensions; do
5212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5213 ac_cv_prog_HAS_HG="found"
5214 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5215 break 2
5216 fi
5217done
5218 done
5219IFS=$as_save_IFS
5220
5221 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5222fi
5223fi
5224HAS_HG=$ac_cv_prog_HAS_HG
5225if test -n "$HAS_HG"; then
5226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5227$as_echo "$HAS_HG" >&6; }
5228else
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5230$as_echo "no" >&6; }
5231fi
5232
5233
5234if test $HAS_HG = found
5235then
5236 HGVERSION="hg id -i \$(srcdir)"
5237 HGTAG="hg id -t \$(srcdir)"
5238 HGBRANCH="hg id -b \$(srcdir)"
5239else
5240 HGVERSION=""
5241 HGTAG=""
5242 HGBRANCH=""
5243fi
5244
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005245case $MACHDEP in
5246bsdos*|hp*|HP*)
5247 # install -d does not work on BSDI or HP-UX
5248 if test -z "$INSTALL"
5249 then
5250 INSTALL="${srcdir}/install-sh -c"
5251 fi
5252esac
5253ac_aux_dir=
5254for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005255 if test -f "$ac_dir/install-sh"; then
5256 ac_aux_dir=$ac_dir
5257 ac_install_sh="$ac_aux_dir/install-sh -c"
5258 break
5259 elif test -f "$ac_dir/install.sh"; then
5260 ac_aux_dir=$ac_dir
5261 ac_install_sh="$ac_aux_dir/install.sh -c"
5262 break
5263 elif test -f "$ac_dir/shtool"; then
5264 ac_aux_dir=$ac_dir
5265 ac_install_sh="$ac_aux_dir/shtool install -c"
5266 break
5267 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005268done
5269if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005270 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271fi
5272
5273# These three variables are undocumented and unsupported,
5274# and are intended to be withdrawn in a future Autoconf release.
5275# They can cause serious problems if a builder's source tree is in a directory
5276# whose full name contains unusual characters.
5277ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5278ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5279ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5280
5281
5282# Find a good install program. We prefer a C program (faster),
5283# so one script is as good as another. But avoid the broken or
5284# incompatible versions:
5285# SysV /etc/install, /usr/sbin/install
5286# SunOS /usr/etc/install
5287# IRIX /sbin/install
5288# AIX /bin/install
5289# AmigaOS /C/install, which installs bootblocks on floppy discs
5290# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5291# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5292# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5293# OS/2's system install, which has a completely different semantic
5294# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005295# Reject install programs that cannot install multiple files.
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5297$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005299if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005300 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301else
5302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305 IFS=$as_save_IFS
5306 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005307 # Account for people who put trailing slashes in PATH elements.
5308case $as_dir/ in #((
5309 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005310 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005311 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312 /usr/ucb/* ) ;;
5313 *)
5314 # OSF1 and SCO ODT 3.0 have their own names for install.
5315 # Don't use installbsd from OSF since it installs stuff as root
5316 # by default.
5317 for ac_prog in ginstall scoinst install; do
5318 for ac_exec_ext in '' $ac_executable_extensions; do
5319 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5320 if test $ac_prog = install &&
5321 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5322 # AIX install. It has an incompatible calling convention.
5323 :
5324 elif test $ac_prog = install &&
5325 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5326 # program-specific install script used by HP pwplus--don't use.
5327 :
5328 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329 rm -rf conftest.one conftest.two conftest.dir
5330 echo one > conftest.one
5331 echo two > conftest.two
5332 mkdir conftest.dir
5333 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5334 test -s conftest.one && test -s conftest.two &&
5335 test -s conftest.dir/conftest.one &&
5336 test -s conftest.dir/conftest.two
5337 then
5338 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5339 break 3
5340 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341 fi
5342 fi
5343 done
5344 done
5345 ;;
5346esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005347
5348 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005349IFS=$as_save_IFS
5350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005351rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352
5353fi
5354 if test "${ac_cv_path_install+set}" = set; then
5355 INSTALL=$ac_cv_path_install
5356 else
5357 # As a last resort, use the slow shell script. Don't cache a
5358 # value for INSTALL within a source directory, because that will
5359 # break other packages using the cache if that directory is
5360 # removed, or if the value is a relative name.
5361 INSTALL=$ac_install_sh
5362 fi
5363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5365$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366
5367# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5368# It thinks the first close brace ends the variable substitution.
5369test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5370
5371test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5372
5373test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5374
Trent Nelsonf6407a12012-08-30 14:56:13 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5376$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5377if test -z "$MKDIR_P"; then
5378 if ${ac_cv_path_mkdir+:} false; then :
5379 $as_echo_n "(cached) " >&6
5380else
5381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5382for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5383do
5384 IFS=$as_save_IFS
5385 test -z "$as_dir" && as_dir=.
5386 for ac_prog in mkdir gmkdir; do
5387 for ac_exec_ext in '' $ac_executable_extensions; do
5388 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5389 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5390 'mkdir (GNU coreutils) '* | \
5391 'mkdir (coreutils) '* | \
5392 'mkdir (fileutils) '4.1*)
5393 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5394 break 3;;
5395 esac
5396 done
5397 done
5398 done
5399IFS=$as_save_IFS
5400
5401fi
5402
5403 test -d ./--version && rmdir ./--version
5404 if test "${ac_cv_path_mkdir+set}" = set; then
5405 MKDIR_P="$ac_cv_path_mkdir -p"
5406 else
5407 # As a last resort, use the slow shell script. Don't cache a
5408 # value for MKDIR_P within a source directory, because that will
5409 # break other packages using the cache if that directory is
5410 # removed, or if the value is a relative name.
5411 MKDIR_P="$ac_install_sh -d"
5412 fi
5413fi
5414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5415$as_echo "$MKDIR_P" >&6; }
5416
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417
5418# Not every filesystem supports hard links
5419
5420if test -z "$LN" ; then
5421 case $ac_sys_system in
5422 BeOS*) LN="ln -s";;
5423 CYGWIN*) LN="ln -s";;
5424 atheos*) LN="ln -s";;
5425 *) LN=ln;;
5426 esac
5427fi
5428
5429# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5431$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005432
5433# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005434if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435 withval=$with_pydebug;
5436if test "$withval" != no
5437then
5438
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005439$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5442$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005444else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5445$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446fi
5447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005450fi
5451
5452
5453# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5454# merged with this chunk of code?
5455
5456# Optimizer/debugger flags
5457# ------------------------
5458# (The following bit of code is complicated enough - please keep things
5459# indented properly. Just pretend you're editing Python code. ;-)
5460
5461# There are two parallel sets of case statements below, one that checks to
5462# see if OPT was set and one that does BASECFLAGS setting based upon
5463# compiler and platform. BASECFLAGS tweaks need to be made even if the
5464# user set OPT.
5465
5466# tweak OPT based on compiler and platform, only if the user didn't set
5467# it on the command line
5468
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005469if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470then
5471 case $GCC in
5472 yes)
5473 if test "$CC" != 'g++' ; then
5474 STRICT_PROTO="-Wstrict-prototypes"
5475 fi
5476 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5477 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5478 WRAP="-fwrapv"
5479 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005480
5481 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005482 case $CC in
5483 *clang*) WRAP="-fwrapv"
5484 ;;
5485 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005486
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 case $ac_cv_prog_cc_g in
5488 yes)
5489 if test "$Py_DEBUG" = 'true' ; then
5490 # Optimization messes up debuggers, so turn it off for
5491 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005492 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005493 else
5494 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5495 fi
5496 ;;
5497 *)
5498 OPT="-O3 -Wall $STRICT_PROTO"
5499 ;;
5500 esac
5501 case $ac_sys_system in
5502 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5503 ;;
5504 esac
5505 ;;
5506
5507 *)
5508 OPT="-O"
5509 ;;
5510 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005511fi
5512
5513
5514
5515# The -arch flags for universal builds on OSX
5516UNIVERSAL_ARCH_FLAGS=
5517
5518
5519# tweak BASECFLAGS based on compiler and platform
5520case $GCC in
5521yes)
5522 # Python violates C99 rules, by casting between incompatible
5523 # pointer types. GCC may generate bad code as a result of that,
5524 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5526$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005527 ac_save_cc="$CC"
5528 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005529 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005530 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005534
5535int
5536main ()
5537{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005538
Gregory P. Smith373469a2009-11-01 21:03:38 +00005539 ;
5540 return 0;
5541}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005543if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544 ac_cv_no_strict_aliasing_ok=yes
5545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005549fi
5550
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5553$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005554 if test $ac_cv_no_strict_aliasing_ok = yes
5555 then
5556 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5557 fi
5558
5559 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5560 # support. Without this, treatment of subnormals doesn't follow
5561 # the standard.
5562 case $ac_sys_machine in
5563 alpha*)
5564 BASECFLAGS="$BASECFLAGS -mieee"
5565 ;;
5566 esac
5567
5568 case $ac_sys_system in
5569 SCO_SV*)
5570 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5571 ;;
5572 # is there any other compiler on Darwin besides gcc?
5573 Darwin*)
5574 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5575 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005576 if test "${CC}" = gcc
5577 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5579$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005580 case "${UNIVERSALSDK}" in
5581 */MacOSX10.4u.sdk)
5582 # Build using 10.4 SDK, force usage of gcc when the
5583 # compiler is gcc, otherwise the user will get very
5584 # confusing error messages when building on OSX 10.6
5585 CC=gcc-4.0
5586 CPP=cpp-4.0
5587 ;;
5588 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5590$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591 fi
5592
5593 # Calculate the right deployment target for this build.
5594 #
5595 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5596 if test ${cur_target} '>' 10.2; then
5597 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005598 if test ${enable_universalsdk}; then
5599 if test "${UNIVERSAL_ARCHS}" = "all"; then
5600 # Ensure that the default platform for a
5601 # 4-way universal build is OSX 10.5,
5602 # that's the first OS release where
5603 # 4-way builds make sense.
5604 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005605
5606 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5607 cur_target='10.5'
5608
5609 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5610 cur_target='10.5'
5611
5612 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5613 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005614 fi
5615 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005616 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005617 # On Intel macs default to a deployment
5618 # target of 10.4, that's the first OSX
5619 # release with Intel support.
5620 cur_target="10.4"
5621 fi
5622 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005623 fi
5624 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5625
5626 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5627 # environment with a value that is the same as what we'll use
5628 # in the Makefile to ensure that we'll get the same compiler
5629 # environment during configure and build time.
5630 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5631 export MACOSX_DEPLOYMENT_TARGET
5632 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5633
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005634 if test "${enable_universalsdk}"; then
5635 UNIVERSAL_ARCH_FLAGS=""
5636 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5637 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5638 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005639 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005640
5641 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5642 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5643 LIPO_32BIT_FLAGS=""
5644 ARCH_RUN_32BIT="true"
5645
5646 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5647 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5648 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005649 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005650
5651 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5652 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5653 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005654 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005655
5656 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5657 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5658 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005659 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005660
5661 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005662 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 +00005663
5664 fi
5665
5666
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005667 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5668 if test "${UNIVERSALSDK}" != "/"
5669 then
5670 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5671 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5672 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005673 fi
5674
5675 fi
5676
5677
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005678 ;;
5679 OSF*)
5680 BASECFLAGS="$BASECFLAGS -mieee"
5681 ;;
5682 esac
5683 ;;
5684
5685*)
5686 case $ac_sys_system in
5687 OpenUNIX*|UnixWare*)
5688 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5689 ;;
5690 OSF*)
5691 BASECFLAGS="$BASECFLAGS -ieee -std"
5692 ;;
5693 SCO_SV*)
5694 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5695 ;;
5696 esac
5697 ;;
5698esac
5699
5700if test "$Py_DEBUG" = 'true'; then
5701 :
5702else
5703 OPT="-DNDEBUG $OPT"
5704fi
5705
5706if test "$ac_arch_flags"
5707then
5708 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5709fi
5710
5711# disable check for icc since it seems to pass, but generates a warning
5712if test "$CC" = icc
5713then
5714 ac_cv_opt_olimit_ok=no
5715fi
5716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5718$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005719if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721else
5722 ac_save_cc="$CC"
5723CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005725/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005726
5727int
5728main ()
5729{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005730
Gregory P. Smith373469a2009-11-01 21:03:38 +00005731 ;
5732 return 0;
5733}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005735if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736 ac_cv_opt_olimit_ok=yes
5737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005738 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005739
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005742CC="$ac_save_cc"
5743fi
5744
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5746$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005747if test $ac_cv_opt_olimit_ok = yes; then
5748 case $ac_sys_system in
5749 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5750 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5751 # environment?
5752 Darwin*)
5753 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04005754 # XXX thankfully this useless troublemaker of a flag has been
5755 # eradicated in the 3.x line. For now, make sure it isn't picked
5756 # up by any of our other platforms that use CC.
5757 AIX*|SunOS*|HP-UX*|IRIX*)
5758 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005759 *)
5760 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5761 ;;
5762 esac
5763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5765$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005766 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005767 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005768else
5769 ac_save_cc="$CC"
5770 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005773
5774int
5775main ()
5776{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005777
Gregory P. Smith373469a2009-11-01 21:03:38 +00005778 ;
5779 return 0;
5780}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005781_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005782if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783 ac_cv_olimit_ok=yes
5784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005785 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005786
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005787fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789 CC="$ac_save_cc"
5790fi
5791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5793$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005794 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01005795 case $ac_sys_system in
5796 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
5797 HP-UX*)
5798 ;;
5799 *)
5800 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5801 ;;
5802 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005803 fi
5804fi
5805
5806# Check whether GCC supports PyArg_ParseTuple format
5807if test "$GCC" = "yes"
5808then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5810$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005811 save_CFLAGS=$CFLAGS
5812 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005814/* end confdefs.h. */
5815
5816 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005817int
5818main ()
5819{
5820
5821 ;
5822 return 0;
5823}
Matthias Klosec511b472010-05-08 11:01:39 +00005824
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827
Matthias Klosec511b472010-05-08 11:01:39 +00005828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005829$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830
Matthias Klosec511b472010-05-08 11:01:39 +00005831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005832$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005833
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005834else
Matthias Klosec511b472010-05-08 11:01:39 +00005835
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005837$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005838
5839fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5841 CFLAGS=$save_CFLAGS
5842fi
5843
5844# On some compilers, pthreads are available without further options
5845# (e.g. MacOS X). On some of these systems, the compiler will not
5846# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5847# So we have to see first whether pthreads are available without
5848# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5850$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005851if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005852 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005854 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005855 ac_cv_pthread_is_default=no
5856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005858/* end confdefs.h. */
5859
Stefan Krahae66ca62012-11-22 22:36:57 +01005860#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005861#include <pthread.h>
5862
5863void* routine(void* p){return NULL;}
5864
5865int main(){
5866 pthread_t p;
5867 if(pthread_create(&p,NULL,routine,NULL)!=0)
5868 return 1;
5869 (void)pthread_detach(p);
5870 return 0;
5871}
5872
5873_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005874if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005875
5876 ac_cv_pthread_is_default=yes
5877 ac_cv_kthread=no
5878 ac_cv_pthread=no
5879
5880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005881 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005882fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885fi
5886
5887
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888fi
5889
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5891$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005892
5893
5894if test $ac_cv_pthread_is_default = yes
5895then
5896 ac_cv_kpthread=no
5897else
5898# -Kpthread, if available, provides the right #defines
5899# and linker options to make pthread_create available
5900# Some compilers won't report that they do not support -Kpthread,
5901# so we need to run a program to see whether it really made the
5902# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5904$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005905if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005906 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005907else
5908 ac_save_cc="$CC"
5909CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005910if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005911 ac_cv_kpthread=no
5912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005914/* end confdefs.h. */
5915
Stefan Krahae66ca62012-11-22 22:36:57 +01005916#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005917#include <pthread.h>
5918
5919void* routine(void* p){return NULL;}
5920
5921int main(){
5922 pthread_t p;
5923 if(pthread_create(&p,NULL,routine,NULL)!=0)
5924 return 1;
5925 (void)pthread_detach(p);
5926 return 0;
5927}
5928
5929_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005930if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005931 ac_cv_kpthread=yes
5932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005933 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005937fi
5938
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005939CC="$ac_save_cc"
5940fi
5941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5943$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005944fi
5945
5946if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5947then
5948# -Kthread, if available, provides the right #defines
5949# and linker options to make pthread_create available
5950# Some compilers won't report that they do not support -Kthread,
5951# so we need to run a program to see whether it really made the
5952# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5954$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005955if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957else
5958 ac_save_cc="$CC"
5959CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005960if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961 ac_cv_kthread=no
5962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964/* end confdefs.h. */
5965
Stefan Krahae66ca62012-11-22 22:36:57 +01005966#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005967#include <pthread.h>
5968
5969void* routine(void* p){return NULL;}
5970
5971int main(){
5972 pthread_t p;
5973 if(pthread_create(&p,NULL,routine,NULL)!=0)
5974 return 1;
5975 (void)pthread_detach(p);
5976 return 0;
5977}
5978
5979_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981 ac_cv_kthread=yes
5982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005984fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005987fi
5988
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005989CC="$ac_save_cc"
5990fi
5991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5993$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005994fi
5995
5996if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5997then
5998# -pthread, if available, provides the right #defines
5999# and linker options to make pthread_create available
6000# Some compilers won't report that they do not support -pthread,
6001# so we need to run a program to see whether it really made the
6002# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6004$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006005if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006006 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006007else
6008 ac_save_cc="$CC"
6009CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006010if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006011 ac_cv_pthread=no
6012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006014/* end confdefs.h. */
6015
Stefan Krahae66ca62012-11-22 22:36:57 +01006016#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006017#include <pthread.h>
6018
6019void* routine(void* p){return NULL;}
6020
6021int main(){
6022 pthread_t p;
6023 if(pthread_create(&p,NULL,routine,NULL)!=0)
6024 return 1;
6025 (void)pthread_detach(p);
6026 return 0;
6027}
6028
6029_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006030if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031 ac_cv_pthread=yes
6032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006033 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006037fi
6038
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006039CC="$ac_save_cc"
6040fi
6041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6043$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006044fi
6045
6046# If we have set a CC compiler flag for thread support then
6047# check if it works for CXX, too.
6048ac_cv_cxx_thread=no
6049if test ! -z "$CXX"
6050then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6052$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053ac_save_cxx="$CXX"
6054
6055if test "$ac_cv_kpthread" = "yes"
6056then
6057 CXX="$CXX -Kpthread"
6058 ac_cv_cxx_thread=yes
6059elif test "$ac_cv_kthread" = "yes"
6060then
6061 CXX="$CXX -Kthread"
6062 ac_cv_cxx_thread=yes
6063elif test "$ac_cv_pthread" = "yes"
6064then
6065 CXX="$CXX -pthread"
6066 ac_cv_cxx_thread=yes
6067fi
6068
6069if test $ac_cv_cxx_thread = yes
6070then
6071 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6072 $CXX -c conftest.$ac_ext 2>&5
6073 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6074 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6075 then
6076 ac_cv_cxx_thread=yes
6077 else
6078 ac_cv_cxx_thread=no
6079 fi
6080 rm -fr conftest*
6081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6083$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006084fi
6085CXX="$ac_save_cxx"
6086
6087
6088# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6090$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006091if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006092 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006095/* end confdefs.h. */
6096#include <stdlib.h>
6097#include <stdarg.h>
6098#include <string.h>
6099#include <float.h>
6100
6101int
6102main ()
6103{
6104
6105 ;
6106 return 0;
6107}
6108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006109if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006110 ac_cv_header_stdc=yes
6111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006112 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006113fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6115
6116if test $ac_cv_header_stdc = yes; then
6117 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006119/* end confdefs.h. */
6120#include <string.h>
6121
6122_ACEOF
6123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006124 $EGREP "memchr" >/dev/null 2>&1; then :
6125
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006126else
6127 ac_cv_header_stdc=no
6128fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006129rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006130
6131fi
6132
6133if test $ac_cv_header_stdc = yes; then
6134 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006136/* end confdefs.h. */
6137#include <stdlib.h>
6138
6139_ACEOF
6140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006141 $EGREP "free" >/dev/null 2>&1; then :
6142
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006143else
6144 ac_cv_header_stdc=no
6145fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006146rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006147
6148fi
6149
6150if test $ac_cv_header_stdc = yes; then
6151 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006152 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006153 :
6154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006156/* end confdefs.h. */
6157#include <ctype.h>
6158#include <stdlib.h>
6159#if ((' ' & 0x0FF) == 0x020)
6160# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6161# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6162#else
6163# define ISLOWER(c) \
6164 (('a' <= (c) && (c) <= 'i') \
6165 || ('j' <= (c) && (c) <= 'r') \
6166 || ('s' <= (c) && (c) <= 'z'))
6167# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6168#endif
6169
6170#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6171int
6172main ()
6173{
6174 int i;
6175 for (i = 0; i < 256; i++)
6176 if (XOR (islower (i), ISLOWER (i))
6177 || toupper (i) != TOUPPER (i))
6178 return 2;
6179 return 0;
6180}
6181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006182if ac_fn_c_try_run "$LINENO"; then :
6183
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006185 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006189fi
6190
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006191fi
6192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6194$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006195if test $ac_cv_header_stdc = yes; then
6196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006197$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006198
6199fi
6200
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006201for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6202fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006203ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006204shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006205unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006206sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6207sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006208sys/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 +00006209sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006210sys/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 +00006211sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006212bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006213do :
6214 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6215ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006216if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006217 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006218#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006219_ACEOF
6220
6221fi
6222
Guido van Rossum627b2d71993-12-24 10:39:16 +00006223done
6224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006226for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006227 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6229$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006230if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006231 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006235#include <sys/types.h>
6236#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006237
Martin v. Löwis11437992002-04-12 09:54:03 +00006238int
6239main ()
6240{
6241if ((DIR *) 0)
6242return 0;
6243 ;
6244 return 0;
6245}
6246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006248 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006250 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006254eval ac_res=\$$as_ac_Header
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6256$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006257if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006258 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006260_ACEOF
6261
6262ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006263fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006265done
6266# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6267if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6269$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006270if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006271 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272else
Martin v. Löwis11437992002-04-12 09:54:03 +00006273 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
Martin v. Löwiseba40652007-08-30 20:10:57 +00006277/* Override any GCC internal prototype to avoid an error.
6278 Use char because int might match the return type of a GCC
6279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006280#ifdef __cplusplus
6281extern "C"
6282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006283char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006284int
6285main ()
6286{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006288 ;
6289 return 0;
6290}
6291_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292for ac_lib in '' dir; do
6293 if test -z "$ac_lib"; then
6294 ac_res="none required"
6295 else
6296 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006297 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006298 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006300 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006301fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006302rm -f core conftest.err conftest.$ac_objext \
6303 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006304 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006305 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006307done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006308if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309
Martin v. Löwiseba40652007-08-30 20:10:57 +00006310else
6311 ac_cv_search_opendir=no
6312fi
6313rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006314LIBS=$ac_func_search_save_LIBS
6315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6317$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006318ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006322fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006323
Michael W. Hudson54241132001-12-07 15:38:26 +00006324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6326$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006327if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006328 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006329else
6330 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006333
Martin v. Löwiseba40652007-08-30 20:10:57 +00006334/* Override any GCC internal prototype to avoid an error.
6335 Use char because int might match the return type of a GCC
6336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006337#ifdef __cplusplus
6338extern "C"
6339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006340char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006341int
6342main ()
6343{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006344return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006345 ;
6346 return 0;
6347}
6348_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006349for ac_lib in '' x; do
6350 if test -z "$ac_lib"; then
6351 ac_res="none required"
6352 else
6353 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006354 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006355 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006356 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006359rm -f core conftest.err conftest.$ac_objext \
6360 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006361 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006364done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006365if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006366
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367else
6368 ac_cv_search_opendir=no
6369fi
6370rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006371LIBS=$ac_func_search_save_LIBS
6372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6374$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006375ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006376if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006377 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006379fi
6380
6381fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6384$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006385if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006387else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006389/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006390#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006391int
6392main ()
6393{
6394return makedev(0, 0);
6395 ;
6396 return 0;
6397}
6398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006400 ac_cv_header_sys_types_h_makedev=yes
6401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006402 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006404rm -f core conftest.err conftest.$ac_objext \
6405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006406
6407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6409$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006410
6411if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006412ac_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 +01006413if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006414
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006415$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006416
6417fi
6418
6419
6420
6421 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006422 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 +01006423if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006424
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006425$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006426
6427fi
6428
6429
6430 fi
6431fi
6432
Michael W. Hudson54241132001-12-07 15:38:26 +00006433
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006434# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006436do :
6437 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006438#ifdef HAVE_CURSES_H
6439#include <curses.h>
6440#endif
6441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006443if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006444 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006445#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006446_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006447
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006448fi
6449
6450done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006451
6452
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006454for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006455do :
6456 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 +00006457#ifdef HAVE_ASM_TYPES_H
6458#include <asm/types.h>
6459#endif
6460#ifdef HAVE_SYS_SOCKET_H
6461#include <sys/socket.h>
6462#endif
6463
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006465if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006466 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006467#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006468_ACEOF
6469
6470fi
6471
6472done
6473
6474
Guido van Rossum627b2d71993-12-24 10:39:16 +00006475# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006476was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6478$as_echo_n "checking for clock_t in time.h... " >&6; }
6479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006482
6483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006485 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006486 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006487else
Martin v. Löwis11437992002-04-12 09:54:03 +00006488
6489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006490$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006491
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006492
Guido van Rossum627b2d71993-12-24 10:39:16 +00006493fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006494rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006495
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6497$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006498
Neal Norwitz11690112002-07-30 01:08:28 +00006499# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6501$as_echo_n "checking for makedev... " >&6; }
6502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006503/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006504
6505#if defined(MAJOR_IN_MKDEV)
6506#include <sys/mkdev.h>
6507#elif defined(MAJOR_IN_SYSMACROS)
6508#include <sys/sysmacros.h>
6509#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006510#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006511#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006512int
6513main ()
6514{
6515 makedev(0, 0)
6516 ;
6517 return 0;
6518}
6519_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006520if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006521 ac_cv_has_makedev=yes
6522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006523 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006525rm -f core conftest.err conftest.$ac_objext \
6526 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006527if test "$ac_cv_has_makedev" = "no"; then
6528 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006530/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006531
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006532#define _OSF_SOURCE 1
6533#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006534
Neal Norwitz11690112002-07-30 01:08:28 +00006535int
6536main ()
6537{
6538 makedev(0, 0)
6539 ;
6540 return 0;
6541}
6542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006543if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006544 ac_cv_has_makedev=yes
6545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006546 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006547fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006548rm -f core conftest.err conftest.$ac_objext \
6549 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006550 if test "$ac_cv_has_makedev" = "yes"; then
6551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006552$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006553
6554 fi
6555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6557$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006558if test "$ac_cv_has_makedev" = "yes"; then
6559
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006560$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006561
6562fi
6563
Martin v. Löwis399a6892002-10-04 10:22:02 +00006564# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6565# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6566# defined, but the compiler does not support pragma redefine_extname,
6567# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6568# structures (such as rlimit64) without declaring them. As a
6569# work-around, disable LFS on such configurations
6570
6571use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6573$as_echo_n "checking Solaris LFS bug... " >&6; }
6574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006576
6577#define _LARGEFILE_SOURCE 1
6578#define _FILE_OFFSET_BITS 64
6579#include <sys/resource.h>
6580
Martin v. Löwis399a6892002-10-04 10:22:02 +00006581int
6582main ()
6583{
6584struct rlimit foo;
6585 ;
6586 return 0;
6587}
6588_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006590 sol_lfs_bug=no
6591else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006592 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6596$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006597if test "$sol_lfs_bug" = "yes"; then
6598 use_lfs=no
6599fi
6600
6601if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006602# Two defines needed to enable largefile support on various platforms
6603# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006604case $ac_sys_system/$ac_sys_release in
6605AIX*)
6606
6607$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6608
6609 ;;
6610esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006612$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006613
6614
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006615$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006616
Martin v. Löwis399a6892002-10-04 10:22:02 +00006617fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006618
Guido van Rossum84e7b241996-08-19 21:59:00 +00006619# Add some code to confdefs.h so that the test for off_t works on SCO
6620cat >> confdefs.h <<\EOF
6621#if defined(SCO_DS)
6622#undef _OFF_T
6623#endif
6624EOF
6625
Guido van Rossumef2255b2000-03-10 22:30:29 +00006626# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006627ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006628if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006630else
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632cat >>confdefs.h <<_ACEOF
6633#define mode_t int
6634_ACEOF
6635
6636fi
6637
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006639if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006640
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006641else
Martin v. Löwis11437992002-04-12 09:54:03 +00006642
6643cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006644#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006645_ACEOF
6646
6647fi
6648
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006649ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006650if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006652else
Martin v. Löwis11437992002-04-12 09:54:03 +00006653
6654cat >>confdefs.h <<_ACEOF
6655#define pid_t int
6656_ACEOF
6657
6658fi
6659
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006660
Martin v. Löwis11437992002-04-12 09:54:03 +00006661cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006662#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006664
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006665ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006666if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006667
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006668else
Martin v. Löwis11437992002-04-12 09:54:03 +00006669
6670cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006671#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006672_ACEOF
6673
6674fi
6675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6677$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006678if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006679 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006682/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006683#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006684
6685_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006687 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006688 ac_cv_type_uid_t=yes
6689else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006690 ac_cv_type_uid_t=no
6691fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006692rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006693
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6696$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006697if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006700
6701
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006702$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006703
6704fi
6705
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006706
6707# There are two separate checks for each of the exact-width integer types we
6708# need. First we check whether the type is available using the usual
6709# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
6710# and <stdint.h> where available). We then also use the special type checks of
6711# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
6712# directly, #define's uint32_t to be a suitable type.
6713
6714ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
6715if test "x$ac_cv_type_uint32_t" = xyes; then :
6716
6717$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
6718
6719fi
6720
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6722case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006723 no|yes) ;; #(
6724 *)
6725
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006727
6728
6729cat >>confdefs.h <<_ACEOF
6730#define uint32_t $ac_cv_c_uint32_t
6731_ACEOF
6732;;
6733 esac
6734
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006735
6736ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
6737if test "x$ac_cv_type_uint64_t" = xyes; then :
6738
6739$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
6740
6741fi
6742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6744case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006745 no|yes) ;; #(
6746 *)
6747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006749
6750
6751cat >>confdefs.h <<_ACEOF
6752#define uint64_t $ac_cv_c_uint64_t
6753_ACEOF
6754;;
6755 esac
6756
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006757
6758ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
6759if test "x$ac_cv_type_int32_t" = xyes; then :
6760
6761$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
6762
6763fi
6764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6766case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006767 no|yes) ;; #(
6768 *)
6769
6770cat >>confdefs.h <<_ACEOF
6771#define int32_t $ac_cv_c_int32_t
6772_ACEOF
6773;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006774esac
6775
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006776
6777ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
6778if test "x$ac_cv_type_int64_t" = xyes; then :
6779
6780$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
6781
6782fi
6783
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6785case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006786 no|yes) ;; #(
6787 *)
6788
6789cat >>confdefs.h <<_ACEOF
6790#define int64_t $ac_cv_c_int64_t
6791_ACEOF
6792;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006793esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006794
Mark Dickinson17c50cd2012-12-02 13:13:56 +00006795
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006797if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006799$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006800
6801fi
6802
Jack Jansendd19cf82001-12-06 22:36:17 +00006803
Michael W. Hudson54241132001-12-07 15:38:26 +00006804# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006805# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006806# The cast to long int works around a bug in the HP C Compiler
6807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6809# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6811$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006812if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006815 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 +00006816
Martin v. Löwis11437992002-04-12 09:54:03 +00006817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818 if test "$ac_cv_type_int" = yes; then
6819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006821as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006822See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006823 else
6824 ac_cv_sizeof_int=0
6825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6830$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006831
6832
6833
Martin v. Löwis11437992002-04-12 09:54:03 +00006834cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006835#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006836_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006837
6838
Martin v. Löwiseba40652007-08-30 20:10:57 +00006839# The cast to long int works around a bug in the HP C Compiler
6840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6842# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6844$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006845if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848 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 +00006849
Martin v. Löwis11437992002-04-12 09:54:03 +00006850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006851 if test "$ac_cv_type_long" = yes; then
6852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006854as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006855See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006856 else
6857 ac_cv_sizeof_long=0
6858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860
Martin v. Löwis11437992002-04-12 09:54:03 +00006861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6863$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006864
6865
6866
Martin v. Löwis11437992002-04-12 09:54:03 +00006867cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006868#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006869_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006870
6871
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872# The cast to long int works around a bug in the HP C Compiler
6873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6875# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6877$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006878if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006881 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 +00006882
Martin v. Löwis11437992002-04-12 09:54:03 +00006883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006884 if test "$ac_cv_type_void_p" = yes; then
6885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006887as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006888See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889 else
6890 ac_cv_sizeof_void_p=0
6891 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893
Martin v. Löwis11437992002-04-12 09:54:03 +00006894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6896$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006897
6898
6899
Martin v. Löwis11437992002-04-12 09:54:03 +00006900cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006901#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006902_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006903
6904
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905# The cast to long int works around a bug in the HP C Compiler
6906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6908# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6910$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006911if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006912 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006914 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 +00006915
Martin v. Löwis11437992002-04-12 09:54:03 +00006916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917 if test "$ac_cv_type_short" = yes; then
6918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006920as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006921See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922 else
6923 ac_cv_sizeof_short=0
6924 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926
Martin v. Löwis11437992002-04-12 09:54:03 +00006927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6929$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930
6931
6932
Martin v. Löwis11437992002-04-12 09:54:03 +00006933cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006934#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006936
6937
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938# The cast to long int works around a bug in the HP C Compiler
6939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6941# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6943$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006944if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006945 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006947 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 +00006948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006950 if test "$ac_cv_type_float" = yes; then
6951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006953as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006954See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955 else
6956 ac_cv_sizeof_float=0
6957 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959
Martin v. Löwis11437992002-04-12 09:54:03 +00006960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6962$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963
6964
6965
Martin v. Löwis11437992002-04-12 09:54:03 +00006966cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006967#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006968_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006969
6970
Martin v. Löwiseba40652007-08-30 20:10:57 +00006971# The cast to long int works around a bug in the HP C Compiler
6972# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6973# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6974# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6976$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006977if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006980 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 +00006981
Martin v. Löwis11437992002-04-12 09:54:03 +00006982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983 if test "$ac_cv_type_double" = yes; then
6984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006986as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006987See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006988 else
6989 ac_cv_sizeof_double=0
6990 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992
Martin v. Löwis11437992002-04-12 09:54:03 +00006993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6995$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006996
6997
6998
Martin v. Löwis11437992002-04-12 09:54:03 +00006999cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007000#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007001_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007002
7003
Martin v. Löwiseba40652007-08-30 20:10:57 +00007004# The cast to long int works around a bug in the HP C Compiler
7005# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7006# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7007# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7009$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007010if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007011 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007013 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 +00007014
Martin v. Löwis11437992002-04-12 09:54:03 +00007015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007016 if test "$ac_cv_type_fpos_t" = yes; then
7017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007019as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007020See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021 else
7022 ac_cv_sizeof_fpos_t=0
7023 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007025
Martin v. Löwis11437992002-04-12 09:54:03 +00007026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7028$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007029
7030
7031
Martin v. Löwis11437992002-04-12 09:54:03 +00007032cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007033#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007034_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007035
Michael W. Hudson54241132001-12-07 15:38:26 +00007036
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037# The cast to long int works around a bug in the HP C Compiler
7038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7040# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7042$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007043if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007044 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046 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 +00007047
Martin v. Löwis18e16552006-02-15 17:27:45 +00007048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049 if test "$ac_cv_type_size_t" = yes; then
7050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007052as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007053See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007054 else
7055 ac_cv_sizeof_size_t=0
7056 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058
Martin v. Löwis18e16552006-02-15 17:27:45 +00007059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7061$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062
7063
7064
Martin v. Löwis18e16552006-02-15 17:27:45 +00007065cat >>confdefs.h <<_ACEOF
7066#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7067_ACEOF
7068
7069
Christian Heimes951cc0f2008-01-31 23:08:23 +00007070# The cast to long int works around a bug in the HP C Compiler
7071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7073# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7075$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007076if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007079 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 +00007080
Christian Heimes951cc0f2008-01-31 23:08:23 +00007081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007082 if test "$ac_cv_type_pid_t" = yes; then
7083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007085as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007086See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007087 else
7088 ac_cv_sizeof_pid_t=0
7089 fi
7090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091
Christian Heimes951cc0f2008-01-31 23:08:23 +00007092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7094$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007095
7096
7097
7098cat >>confdefs.h <<_ACEOF
7099#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7100_ACEOF
7101
7102
Michael W. Hudson54241132001-12-07 15:38:26 +00007103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7105$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007106have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007108/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007109
Martin v. Löwis11437992002-04-12 09:54:03 +00007110int
7111main ()
7112{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007113long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007114 ;
7115 return 0;
7116}
7117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007119
7120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007122
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007123 have_long_long=yes
7124
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7128$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007129if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130# The cast to long int works around a bug in the HP C Compiler
7131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7133# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7135$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007136if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 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 +00007140
Martin v. Löwis11437992002-04-12 09:54:03 +00007141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142 if test "$ac_cv_type_long_long" = yes; then
7143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007145as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007146See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147 else
7148 ac_cv_sizeof_long_long=0
7149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007151
Martin v. Löwis11437992002-04-12 09:54:03 +00007152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7154$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155
7156
7157
Martin v. Löwis11437992002-04-12 09:54:03 +00007158cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007159#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007160_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007161
Michael W. Hudson54241132001-12-07 15:38:26 +00007162
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007163fi
7164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7166$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007167have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007169/* end confdefs.h. */
7170
7171int
7172main ()
7173{
Matthias Klosec511b472010-05-08 11:01:39 +00007174long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007175 ;
7176 return 0;
7177}
7178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007180
7181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007183
7184 have_long_double=yes
7185
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007186fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7189$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007190if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007191# The cast to long int works around a bug in the HP C Compiler
7192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7194# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7196$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007197if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200 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 +00007201
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007202else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203 if test "$ac_cv_type_long_double" = yes; then
7204 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7205$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007206as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007207See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007208 else
7209 ac_cv_sizeof_long_double=0
7210 fi
7211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007212
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007213fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7215$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007216
7217
7218
7219cat >>confdefs.h <<_ACEOF
7220#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7221_ACEOF
7222
7223
7224fi
7225
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7227$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007228have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007230/* end confdefs.h. */
7231
7232int
7233main ()
7234{
7235_Bool x; x = (_Bool)0;
7236 ;
7237 return 0;
7238}
7239_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007241
7242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007243$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007244
7245 have_c99_bool=yes
7246
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7250$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007251if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007252# The cast to long int works around a bug in the HP C Compiler
7253# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7254# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7255# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7257$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007258if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261 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 +00007262
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007263else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264 if test "$ac_cv_type__Bool" = yes; then
7265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007267as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007268See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007269 else
7270 ac_cv_sizeof__Bool=0
7271 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7276$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007277
7278
7279
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007280cat >>confdefs.h <<_ACEOF
7281#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7282_ACEOF
7283
7284
7285fi
7286
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287ac_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 +00007288 #include <stdint.h>
7289 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007290 #ifdef HAVE_INTTYPES_H
7291 #include <inttypes.h>
7292 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007293"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007294if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007295
7296cat >>confdefs.h <<_ACEOF
7297#define HAVE_UINTPTR_T 1
7298_ACEOF
7299
Martin v. Löwiseba40652007-08-30 20:10:57 +00007300# The cast to long int works around a bug in the HP C Compiler
7301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7303# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7305$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007306if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007307 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007309 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 +00007310
Martin v. Löwis11437992002-04-12 09:54:03 +00007311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007312 if test "$ac_cv_type_uintptr_t" = yes; then
7313 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007315as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007316See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317 else
7318 ac_cv_sizeof_uintptr_t=0
7319 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007320fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321
Martin v. Löwis11437992002-04-12 09:54:03 +00007322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7324$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007325
7326
7327
Martin v. Löwis11437992002-04-12 09:54:03 +00007328cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007329#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007330_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007331
Michael W. Hudson54241132001-12-07 15:38:26 +00007332
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007333fi
7334
Martin v. Löwisebe26702006-10-02 14:55:51 +00007335
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007336# The cast to long int works around a bug in the HP C Compiler
7337# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7338# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7339# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7341$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007342if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007345 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007346#ifdef HAVE_SYS_TYPES_H
7347#include <sys/types.h>
7348#endif
7349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007350"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007351
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353 if test "$ac_cv_type_off_t" = yes; then
7354 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7355$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007356as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007357See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007358 else
7359 ac_cv_sizeof_off_t=0
7360 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7365$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007366
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007367
7368
Martin v. Löwis11437992002-04-12 09:54:03 +00007369cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007370#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007371_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007372
Michael W. Hudson54241132001-12-07 15:38:26 +00007373
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7376$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007377if test "$have_long_long" = yes
7378then
7379if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007380 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007382$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7385$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007389fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007390else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7392$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007393fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007394
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007395# The cast to long int works around a bug in the HP C Compiler
7396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7398# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7400$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007401if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007405#ifdef HAVE_SYS_TYPES_H
7406#include <sys/types.h>
7407#endif
7408#ifdef HAVE_TIME_H
7409#include <time.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_time_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 (time_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_time_t=0
7422 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7427$as_echo "$ac_cv_sizeof_time_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
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007432#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007433_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007434
Michael W. Hudson54241132001-12-07 15:38:26 +00007435
7436
Trent Mick635f6fb2000-08-23 21:33:05 +00007437# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007438ac_save_cc="$CC"
7439if test "$ac_cv_kpthread" = "yes"
7440then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007441elif test "$ac_cv_kthread" = "yes"
7442then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007443elif test "$ac_cv_pthread" = "yes"
7444then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007445fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7447$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007448have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007450/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007451
7452 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007453int
7454main ()
7455{
Guido van Rossum12580492000-09-24 16:47:19 +00007456pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 ;
7458 return 0;
7459}
Matthias Klosec511b472010-05-08 11:01:39 +00007460
Martin v. Löwis11437992002-04-12 09:54:03 +00007461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007462if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007463 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7467$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007468if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007470# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7471# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7472# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7474$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007475if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007476 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007478 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007479#ifdef HAVE_PTHREAD_H
7480#include <pthread.h>
7481#endif
7482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007484
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007485else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486 if test "$ac_cv_type_pthread_t" = yes; then
7487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007489as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007490See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007491 else
7492 ac_cv_sizeof_pthread_t=0
7493 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007494fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007495
Trent Mick635f6fb2000-08-23 21:33:05 +00007496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7498$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007500
7501
Martin v. Löwis11437992002-04-12 09:54:03 +00007502cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007503#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007504_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007505
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007506
Trent Mick635f6fb2000-08-23 21:33:05 +00007507fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007508CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7511$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007514 enableval=$enable_toolbox_glue;
7515fi
Jack Jansene578a632001-08-15 01:27:14 +00007516
7517
7518if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007519then
Jack Jansene578a632001-08-15 01:27:14 +00007520 case $ac_sys_system/$ac_sys_release in
7521 Darwin/*)
7522 enable_toolbox_glue="yes";;
7523 *)
7524 enable_toolbox_glue="no";;
7525 esac
7526fi
7527case "$enable_toolbox_glue" in
7528yes)
Jack Jansene578a632001-08-15 01:27:14 +00007529 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007530 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007533
7534 ;;
7535*)
Jack Jansene578a632001-08-15 01:27:14 +00007536 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007537 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007538 ;;
7539esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7541$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007542
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007543
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007544
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007545case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007546 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007547 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7548 ;;
7549 Darwin/*)
7550 OTHER_LIBTOOL_OPT=""
7551 ;;
7552esac
7553
7554
Ronald Oussoren25967582009-09-06 10:00:26 +00007555ARCH_RUN_32BIT=""
7556
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007557case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007558 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007559 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7560 if test "${enable_universalsdk}"; then
7561 :
7562 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007563 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007564 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007565 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007566 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007567 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007568 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007569 if test ${gcc_version} '<' 4.0
7570 then
7571 LIBTOOL_CRUFT="-lcc_dynamic"
7572 else
7573 LIBTOOL_CRUFT=""
7574 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007575 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007576 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007577else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007579/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007580
Ronald Oussoren25967582009-09-06 10:00:26 +00007581 #include <unistd.h>
7582 int main(int argc, char*argv[])
7583 {
7584 if (sizeof(long) == 4) {
7585 return 0;
7586 } else {
7587 return 1;
7588 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007589 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007590
Ronald Oussoren25967582009-09-06 10:00:26 +00007591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007593 ac_osx_32bit=yes
7594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007596fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7598 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007599fi
7600
7601
Ronald Oussoren25967582009-09-06 10:00:26 +00007602 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007603 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007604 i386)
7605 MACOSX_DEFAULT_ARCH="i386"
7606 ;;
7607 ppc)
7608 MACOSX_DEFAULT_ARCH="ppc"
7609 ;;
7610 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007611 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007612 ;;
7613 esac
7614 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007615 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007616 i386)
7617 MACOSX_DEFAULT_ARCH="x86_64"
7618 ;;
7619 ppc)
7620 MACOSX_DEFAULT_ARCH="ppc64"
7621 ;;
7622 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007623 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007624 ;;
7625 esac
7626
7627 #ARCH_RUN_32BIT="true"
7628 fi
7629
7630 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007631 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007632 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007633esac
7634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7636$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007637if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007638then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007639 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007640 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007641 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007643$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7646$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007647 if test $enable_shared = "yes"
7648 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007649 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 +00007650 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007654fi
7655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7657$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007658case $ac_sys_system/$ac_sys_release in
7659 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7664$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007665 ;;
7666 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7668$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007669 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007670esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007671
Guido van Rossum0a516c91994-09-12 10:58:40 +00007672# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007673
Michael W. Hudson54241132001-12-07 15:38:26 +00007674
7675
7676
7677
Ronald Oussoren75912852010-04-08 08:13:31 +00007678
Guido van Rossum0a516c91994-09-12 10:58:40 +00007679# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007680# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7682$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007683if test -z "$SO"
7684then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007685 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007686 hp*|HP*)
7687 case `uname -m` in
7688 ia64) SO=.so;;
7689 *) SO=.sl;;
7690 esac
7691 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007692 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007693 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007694 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007695else
7696 # this might also be a termcap variable, see #610332
7697 echo
7698 echo '====================================================================='
7699 echo '+ +'
7700 echo '+ WARNING: You have set SO in your environment. +'
7701 echo '+ Do you really mean to change the extension for shared libraries? +'
7702 echo '+ Continuing in 10 seconds to let you to ponder. +'
7703 echo '+ +'
7704 echo '====================================================================='
7705 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007706fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7708$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007709
Ronald Oussoren79f90492009-01-02 10:44:46 +00007710
Neal Norwitz58e28882006-05-19 07:00:58 +00007711cat >>confdefs.h <<_ACEOF
7712#define SHLIB_EXT "$SO"
7713_ACEOF
7714
Guido van Rossum0a516c91994-09-12 10:58:40 +00007715# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007716# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007717# (Shared libraries in this instance are shared modules to be loaded into
7718# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7720$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007721if test -z "$LDSHARED"
7722then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007723 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007724 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007725 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007726 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007727 ;;
7728 BeOS*)
7729 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007730 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007731 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007732 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007733 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007734 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007735 if test "$GCC" = "yes" ; then
7736 LDSHARED='$(CC) -shared'
7737 LDCXXSHARED='$(CXX) -shared'
7738 else
7739 LDSHARED='$(CC) -G'
7740 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007741 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007742 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007743 if test "$GCC" = "yes" ; then
7744 LDSHARED='$(CC) -shared'
7745 LDCXXSHARED='$(CXX) -shared'
7746 else
7747 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007748 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007749 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007750 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007751 LDSHARED='$(CC) -bundle'
7752 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007753 if test "$enable_framework" ; then
7754 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007755 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7756 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007757 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007758 else
7759 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007760 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007761 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007762 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007763 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007764 LDSHARED='$(CC) -bundle'
7765 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007766 if test "$enable_framework" ; then
7767 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007768 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7769 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007770 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007771 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007772 # No framework, use the Python app as bundle-loader
7773 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007774 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007775 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007776 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007777 Darwin/*)
7778 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7779 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007780
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007781 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007782 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007783 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007784 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007785 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007786 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7787 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007788 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007789 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007790 LDSHARED='$(CC) -bundle'
7791 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007792 if test "$enable_framework" ; then
7793 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007794 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7795 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007796 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007797 else
7798 # No framework, use the Python app as bundle-loader
7799 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7800 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007801 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007802 fi
7803 fi
7804 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007805 Linux*|GNU*|QNX*)
7806 LDSHARED='$(CC) -shared'
7807 LDCXXSHARED='$(CXX) -shared';;
7808 BSD/OS*/4*)
7809 LDSHARED="gcc -shared"
7810 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007811 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007812 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007813 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007814 LDSHARED='$(CC) -shared'
7815 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007816 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007817 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007818 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007819 OpenBSD*)
7820 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7821 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007822 LDSHARED='$(CC) -shared $(CCSHARED)'
7823 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007824 else
7825 case `uname -r` in
7826 [01].* | 2.[0-7] | 2.[0-7].*)
7827 LDSHARED="ld -Bshareable ${LDFLAGS}"
7828 ;;
7829 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007830 LDSHARED='$(CC) -shared $(CCSHARED)'
7831 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007832 ;;
7833 esac
7834 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007835 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007836 LDSHARED='$(CC) -shared'
7837 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007838 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007839 if test "$GCC" = "yes" ; then
7840 LDSHARED='$(CC) -shared'
7841 LDCXXSHARED='$(CXX) -shared'
7842 else
7843 LDSHARED='$(CC) -G'
7844 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007845 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007846 SCO_SV*)
7847 LDSHARED='$(CC) -Wl,-G,-Bexport'
7848 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7849 CYGWIN*)
7850 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7851 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7852 atheos*)
7853 LDSHARED="gcc -shared"
7854 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007855 *) LDSHARED="ld";;
7856 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7859$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007860LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007861BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007862# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007863# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7865$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007866if test -z "$CCSHARED"
7867then
Guido van Rossum07397971997-04-29 21:49:50 +00007868 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007869 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007870 then CCSHARED="-fPIC";
7871 elif test `uname -p` = sparc;
7872 then CCSHARED="-xcode=pic32";
7873 else CCSHARED="-Kpic";
7874 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007875 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007876 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007877 else CCSHARED="+z";
7878 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007879 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007880 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007881 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007882 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007883 if test "$GCC" = "yes"
7884 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007885 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007886 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007887 SCO_SV*)
7888 if test "$GCC" = "yes"
7889 then CCSHARED="-fPIC"
7890 else CCSHARED="-Kpic -belf"
7891 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007892 IRIX*/6*) case $CC in
7893 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007894 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007895 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007896 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007897 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7900$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007901# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007902# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7904$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007905if test -z "$LINKFORSHARED"
7906then
Guido van Rossum07397971997-04-29 21:49:50 +00007907 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007908 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007909 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007910 LINKFORSHARED="-Wl,-E -Wl,+s";;
7911# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007912 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007913 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007914 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007916 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7917 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007918 # not used by the core itself but which needs to be in the core so
7919 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007920 # -prebind is no longer used, because it actually seems to give a
7921 # slowdown in stead of a speedup, maybe due to the large number of
7922 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007923
7924 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007925 if test "$enable_framework"
7926 then
Jack Jansenda49e192005-01-07 13:08:22 +00007927 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007928 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007929 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007930 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007931 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007932 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007933 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007934 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7935 then
7936 LINKFORSHARED="-Wl,--export-dynamic"
7937 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007938 SunOS/5*) case $CC in
7939 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007940 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007941 then
7942 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007943 fi;;
7944 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007945 CYGWIN*)
7946 if test $enable_shared = "no"
7947 then
7948 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7949 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007950 QNX*)
7951 # -Wl,-E causes the symbols to be added to the dynamic
7952 # symbol table so that they can be found when a module
7953 # is loaded. -N 2048K causes the stack size to be set
7954 # to 2048 kilobytes so that the stack doesn't overflow
7955 # when running test_compile.py.
7956 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007957 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7960$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007961
Michael W. Hudson54241132001-12-07 15:38:26 +00007962
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7965$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007966if test ! "$LIBRARY" = "$LDLIBRARY"
7967then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007968 case $ac_sys_system in
7969 CYGWIN*)
7970 # Cygwin needs CCSHARED when building extension DLLs
7971 # but not when building the interpreter DLL.
7972 CFLAGSFORSHARED='';;
7973 *)
7974 CFLAGSFORSHARED='$(CCSHARED)'
7975 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7978$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007979
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007980# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7981# library (with --enable-shared).
7982# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007983# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7984# if it is not required, since it creates a dependency of the shared library
7985# to LIBS. This, in turn, means that applications linking the shared libpython
7986# don't need to link LIBS explicitly. The default should be only changed
7987# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7990$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007991case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007992 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007993 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007994esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7996$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007997
7998
Guido van Rossum627b2d71993-12-24 10:39:16 +00007999# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8001$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008002if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008003 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008004else
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008006LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008009
Martin v. Löwiseba40652007-08-30 20:10:57 +00008010/* Override any GCC internal prototype to avoid an error.
8011 Use char because int might match the return type of a GCC
8012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008013#ifdef __cplusplus
8014extern "C"
8015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008016char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008017int
8018main ()
8019{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008021 ;
8022 return 0;
8023}
8024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030rm -f core conftest.err conftest.$ac_objext \
8031 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008032LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8035$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008036if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008037 cat >>confdefs.h <<_ACEOF
8038#define HAVE_LIBDL 1
8039_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008040
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008041 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008043fi
8044 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8046$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008047if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008048 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049else
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008051LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Martin v. Löwiseba40652007-08-30 20:10:57 +00008055/* Override any GCC internal prototype to avoid an error.
8056 Use char because int might match the return type of a GCC
8057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008058#ifdef __cplusplus
8059extern "C"
8060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008061char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008062int
8063main ()
8064{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008066 ;
8067 return 0;
8068}
8069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008070if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008073 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008074fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008075rm -f core conftest.err conftest.$ac_objext \
8076 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008077LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8080$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008081if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 cat >>confdefs.h <<_ACEOF
8083#define HAVE_LIBDLD 1
8084_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008085
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008086 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088fi
8089 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008090
Ronald Oussoren79f90492009-01-02 10:44:46 +00008091# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008092if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8094$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008095if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008096 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008097else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008098 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008101
Martin v. Löwiseba40652007-08-30 20:10:57 +00008102/* Override any GCC internal prototype to avoid an error.
8103 Use char because int might match the return type of a GCC
8104 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008105#ifdef __cplusplus
8106extern "C"
8107#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008108char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008109int
8110main ()
8111{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 ;
8114 return 0;
8115}
8116_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117for ac_lib in '' pthread rt posix4; do
8118 if test -z "$ac_lib"; then
8119 ac_res="none required"
8120 else
8121 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008122 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008125 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008127rm -f core conftest.err conftest.$ac_objext \
8128 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008129 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008132done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008133if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008134
Martin v. Löwiseba40652007-08-30 20:10:57 +00008135else
8136 ac_cv_search_sem_init=no
8137fi
8138rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008139LIBS=$ac_func_search_save_LIBS
8140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8142$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008144if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008146
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008147fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008148 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008149 # posix4 on Solaris 2.6
8150 # pthread (first!) on Linux
8151fi
8152
Martin v. Löwis19d17342003-06-14 21:03:05 +00008153# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8155$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008156if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008157 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008158else
8159 ac_check_lib_save_LIBS=$LIBS
8160LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008162/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008163
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164/* Override any GCC internal prototype to avoid an error.
8165 Use char because int might match the return type of a GCC
8166 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008167#ifdef __cplusplus
8168extern "C"
8169#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008170char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008171int
8172main ()
8173{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008174return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008175 ;
8176 return 0;
8177}
8178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008180 ac_cv_lib_intl_textdomain=yes
8181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008184rm -f core conftest.err conftest.$ac_objext \
8185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008186LIBS=$ac_check_lib_save_LIBS
8187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8189$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008190if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008193
8194fi
8195
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008196
8197# checks for system dependent C++ extensions support
8198case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8200$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008202/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008203
Georg Brandl94800df2011-02-25 11:09:02 +00008204 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008205int
8206main ()
8207{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008208loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008209 ;
8210 return 0;
8211}
Matthias Klosec511b472010-05-08 11:01:39 +00008212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008214if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008215
Matthias Klosec511b472010-05-08 11:01:39 +00008216
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008218
Matthias Klosec511b472010-05-08 11:01:39 +00008219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008221
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008222else
Matthias Klosec511b472010-05-08 11:01:39 +00008223
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008225$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008226
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008227fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008228rm -f core conftest.err conftest.$ac_objext \
8229 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008230 *) ;;
8231esac
8232
Guido van Rossum70c7f481998-03-26 18:44:10 +00008233# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008234# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8236$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008237if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008238 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008239else
Martin v. Löwis11437992002-04-12 09:54:03 +00008240 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008241LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008244
Martin v. Löwiseba40652007-08-30 20:10:57 +00008245/* Override any GCC internal prototype to avoid an error.
8246 Use char because int might match the return type of a GCC
8247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008248#ifdef __cplusplus
8249extern "C"
8250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008251char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008252int
8253main ()
8254{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008255return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008256 ;
8257 return 0;
8258}
8259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008261 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008263 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008264fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008265rm -f core conftest.err conftest.$ac_objext \
8266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008267LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8270$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008271if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008272 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008273fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008274 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8276$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008277if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008278 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008279else
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008281LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285/* Override any GCC internal prototype to avoid an error.
8286 Use char because int might match the return type of a GCC
8287 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008288#ifdef __cplusplus
8289extern "C"
8290#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008291char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008292int
8293main ()
8294{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 ;
8297 return 0;
8298}
8299_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008301 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008305rm -f core conftest.err conftest.$ac_objext \
8306 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008307LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008308fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8310$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008311if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008312 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008313fi
8314 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008315
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008316case "$ac_sys_system" in
8317BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8319$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008320if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008321 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008322else
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008324LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008327
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328/* Override any GCC internal prototype to avoid an error.
8329 Use char because int might match the return type of a GCC
8330 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008331#ifdef __cplusplus
8332extern "C"
8333#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008334char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008335int
8336main ()
8337{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008338return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 ;
8340 return 0;
8341}
8342_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008344 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008346 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008347fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008348rm -f core conftest.err conftest.$ac_objext \
8349 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008350LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008351fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8353$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008354if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008355 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008356fi
8357 # BeOS
8358;;
8359esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8362$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Martin v. Löwiseba40652007-08-30 20:10:57 +00008364# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8368$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008369LIBS="$withval $LIBS"
8370
8371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8373$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374fi
8375
Guido van Rossum7f43da71994-08-01 12:15:30 +00008376
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008377if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008378 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8379set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8381$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008382if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008383 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008384else
8385 case $PKG_CONFIG in
8386 [\\/]* | ?:[\\/]*)
8387 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8388 ;;
8389 *)
8390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8391for as_dir in $PATH
8392do
8393 IFS=$as_save_IFS
8394 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8397 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008399 break 2
8400 fi
8401done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008402 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008403IFS=$as_save_IFS
8404
8405 ;;
8406esac
8407fi
8408PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8409if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8411$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008412else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008415fi
8416
8417
8418fi
8419if test -z "$ac_cv_path_PKG_CONFIG"; then
8420 ac_pt_PKG_CONFIG=$PKG_CONFIG
8421 # Extract the first word of "pkg-config", so it can be a program name with args.
8422set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8424$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008425if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008426 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008427else
8428 case $ac_pt_PKG_CONFIG in
8429 [\\/]* | ?:[\\/]*)
8430 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8431 ;;
8432 *)
8433 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8434for as_dir in $PATH
8435do
8436 IFS=$as_save_IFS
8437 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008438 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008439 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8440 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008441 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008442 break 2
8443 fi
8444done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008445 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008446IFS=$as_save_IFS
8447
8448 ;;
8449esac
8450fi
8451ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8452if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8454$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008458fi
8459
8460 if test "x$ac_pt_PKG_CONFIG" = x; then
8461 PKG_CONFIG=""
8462 else
8463 case $cross_compiling:$ac_tool_warned in
8464yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8466$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008467ac_tool_warned=yes ;;
8468esac
8469 PKG_CONFIG=$ac_pt_PKG_CONFIG
8470 fi
8471else
8472 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8473fi
8474
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008475
8476# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8478$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008479
8480# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008481if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008482 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008483else
8484 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008485fi
8486
8487
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8489$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008490
8491# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8493$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008494
8495# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008496if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008497 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008498else
8499 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008500fi
8501
8502
8503if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008504 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8505else
8506 LIBFFI_INCLUDEDIR=""
8507fi
8508
8509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8511$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008512
Benjamin Peterson867475c2009-04-29 20:36:25 +00008513# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8515$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008516
8517# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008518if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008519 withval=$with_dbmliborder;
8520if test x$with_dbmliborder = xyes
8521then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008522as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008523else
8524 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8525 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8526 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008527 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008528 fi
8529 done
8530fi
8531fi
8532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8534$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008535
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008536# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008537
8538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8540$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008541
Martin v. Löwiseba40652007-08-30 20:10:57 +00008542# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008543if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008544 withval=$with_signal_module;
8545fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008546
8547
8548if test -z "$with_signal_module"
8549then with_signal_module="yes"
8550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8552$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008553
8554if test "${with_signal_module}" = "yes"; then
8555 USE_SIGNAL_MODULE=""
8556 SIGNAL_OBJS=""
8557else
8558 USE_SIGNAL_MODULE="#"
8559 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8560fi
8561
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008562# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008563
Barry Warsawc0d24d82000-06-29 16:12:00 +00008564USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8567$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008568
Guido van Rossumec2f0731997-01-22 20:54:01 +00008569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008571if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8574$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008575LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008576if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008577 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008578fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008579else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8581$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008582fi
8583
Martin v. Löwis11437992002-04-12 09:54:03 +00008584
8585# Templates for things AC_DEFINEd more than once.
8586# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008587
8588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589
8590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8592$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008593
Martin v. Löwiseba40652007-08-30 20:10:57 +00008594# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008595if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008596 withval=$with_threads;
8597fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008598
8599
Barry Warsawc0d24d82000-06-29 16:12:00 +00008600# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008601
Martin v. Löwiseba40652007-08-30 20:10:57 +00008602# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008603if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604 withval=$with_thread; with_threads=$with_thread
8605fi
8606
Barry Warsawc0d24d82000-06-29 16:12:00 +00008607
8608if test -z "$with_threads"
8609then with_threads="yes"
8610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8612$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008613
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008614
Barry Warsawc0d24d82000-06-29 16:12:00 +00008615if test "$with_threads" = "no"
8616then
8617 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008618elif test "$ac_cv_pthread_is_default" = yes
8619then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008621
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008622 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008623 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008624
8625 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008627elif test "$ac_cv_kpthread" = "yes"
8628then
8629 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008630 if test "$ac_cv_cxx_thread" = "yes"; then
8631 CXX="$CXX -Kpthread"
8632 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008634
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008635 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008636 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008637elif test "$ac_cv_kthread" = "yes"
8638then
8639 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008640 if test "$ac_cv_cxx_thread" = "yes"; then
8641 CXX="$CXX -Kthread"
8642 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008643 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008644
8645 posix_threads=yes
8646 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008647elif test "$ac_cv_pthread" = "yes"
8648then
8649 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008650 if test "$ac_cv_cxx_thread" = "yes"; then
8651 CXX="$CXX -pthread"
8652 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008653 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008654
8655 posix_threads=yes
8656 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008657else
8658 if test ! -z "$with_threads" -a -d "$with_threads"
8659 then LDFLAGS="$LDFLAGS -L$with_threads"
8660 fi
8661 if test ! -z "$withval" -a -d "$withval"
8662 then LDFLAGS="$LDFLAGS -L$withval"
8663 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008664
8665 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008666 # define _POSIX_THREADS in unistd.h. Some apparently don't
8667 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8669$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008671/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008672
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008673#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008674#ifdef _POSIX_THREADS
8675yes
8676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008677
8678_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008680 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008681 unistd_defines_pthreads=yes
8682else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008683 unistd_defines_pthreads=no
8684fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008685rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008686
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8688$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008689
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008690 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008691
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008692 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008693if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008694 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008699$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008700
8701 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008702 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008703else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008705 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 +01008706if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008709 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008710
Martin v. Löwis11437992002-04-12 09:54:03 +00008711
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008712$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008713
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008714 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008715else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8718$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008719
Martin v. Löwiseba40652007-08-30 20:10:57 +00008720# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008721if test "${with_pth+set}" = set; then :
8722 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8723$as_echo "$withval" >&6; }
8724 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008725
8726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008728
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008729 LIBS="-lpth $LIBS"
8730 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8733$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008734
8735 # Just looking for pthread_create in libpthread is not enough:
8736 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8737 # So we really have to include pthread.h, and then link.
8738 _libs=$LIBS
8739 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8741$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008743/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01008744
8745#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008746#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008747
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008748void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008749int
8750main ()
8751{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008752
8753pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ;
8755 return 0;
8756}
8757_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8761$as_echo "yes" >&6; }
8762 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008763
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008764 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008765 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008766else
Martin v. Löwis11437992002-04-12 09:54:03 +00008767
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008768 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008770if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008771 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008772
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008773 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008774 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008775else
Guido van Rossumad678af1998-10-02 14:42:15 +00008776
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008777 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 +01008778if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008780
8781
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008782$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008783
8784 THREADOBJ="Python/thread.o"
8785else
8786
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787 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 +01008788if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
8791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008792$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008793
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008794 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008795else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008796
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8798$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008799if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008801else
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008803LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807/* Override any GCC internal prototype to avoid an error.
8808 Use char because int might match the return type of a GCC
8809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810#ifdef __cplusplus
8811extern "C"
8812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008813char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008817return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ;
8819 return 0;
8820}
8821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008822if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008825 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827rm -f core conftest.err conftest.$ac_objext \
8828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008829LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008830fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8832$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008833if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008835
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008836 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008837 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008838 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008839else
Greg Steinadf63d62000-07-05 10:38:09 +00008840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8842$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008843if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008845else
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008847LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008850
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851/* Override any GCC internal prototype to avoid an error.
8852 Use char because int might match the return type of a GCC
8853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008854#ifdef __cplusplus
8855extern "C"
8856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008857char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008858int
8859main ()
8860{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008861return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008862 ;
8863 return 0;
8864}
8865_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008866if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871rm -f core conftest.err conftest.$ac_objext \
8872 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008873LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8876$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008877if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008878 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008879
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008880 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008881 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008882 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008883else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8886$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008887if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008888 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008889else
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008891LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008894
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895/* Override any GCC internal prototype to avoid an error.
8896 Use char because int might match the return type of a GCC
8897 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008898#ifdef __cplusplus
8899extern "C"
8900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008901char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008902int
8903main ()
8904{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008905return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 ;
8907 return 0;
8908}
8909_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008913 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008914fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915rm -f core conftest.err conftest.$ac_objext \
8916 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008917LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8920$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008921if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008923
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008924 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008925 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008926 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008927else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008928
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8930$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008931if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008933else
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008935LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938
Martin v. Löwiseba40652007-08-30 20:10:57 +00008939/* Override any GCC internal prototype to avoid an error.
8940 Use char because int might match the return type of a GCC
8941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942#ifdef __cplusplus
8943extern "C"
8944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008945char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ;
8951 return 0;
8952}
8953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008954if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959rm -f core conftest.err conftest.$ac_objext \
8960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008961LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8964$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008965if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008966 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008967
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008968 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008969 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008970 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008971else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008972
Martin v. Löwis130fb172001-07-19 11:00:41 +00008973 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008974fi
8975
Guido van Rossum627b2d71993-12-24 10:39:16 +00008976
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008977fi
8978
Guido van Rossum0be3e491997-05-22 20:33:33 +00008979fi
8980
Guido van Rossum49545951997-12-02 19:28:29 +00008981fi
8982
Guido van Rossumb93a8621998-05-07 13:27:32 +00008983fi
8984
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008985
Michael W. Hudson54241132001-12-07 15:38:26 +00008986fi
8987
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008988
8989fi
8990
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008992rm -f core conftest.err conftest.$ac_objext \
8993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994fi
8995
Martin v. Löwis11437992002-04-12 09:54:03 +00008996fi
8997
8998
8999fi
9000
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009001
Michael W. Hudson54241132001-12-07 15:38:26 +00009002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9004$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009005if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007else
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009009LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009012
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013/* Override any GCC internal prototype to avoid an error.
9014 Use char because int might match the return type of a GCC
9015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009016#ifdef __cplusplus
9017extern "C"
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009020int
9021main ()
9022{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ;
9025 return 0;
9026}
9027_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009033rm -f core conftest.err conftest.$ac_objext \
9034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009035LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9038$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009039if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009041
Martin v. Löwis130fb172001-07-19 11:00:41 +00009042 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009043 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009044 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009045fi
9046
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009047
Neal Norwitza978ab02002-11-02 16:58:05 +00009048 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9050$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009051if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009053else
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009055LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
Martin v. Löwiseba40652007-08-30 20:10:57 +00009059/* Override any GCC internal prototype to avoid an error.
9060 Use char because int might match the return type of a GCC
9061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009062#ifdef __cplusplus
9063extern "C"
9064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009065char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009066int
9067main ()
9068{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009070 ;
9071 return 0;
9072}
9073_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079rm -f core conftest.err conftest.$ac_objext \
9080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009081LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9084$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009085if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009087
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009088 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009089 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009090 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009091fi
9092
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009093 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009094
Martin v. Löwis130fb172001-07-19 11:00:41 +00009095 if test "$USE_THREAD_MODULE" != "#"
9096 then
9097 # If the above checks didn't disable threads, (at least) OSF1
9098 # needs this '-threads' argument during linking.
9099 case $ac_sys_system in
9100 OSF1) LDLAST=-threads;;
9101 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009102 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009103fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009104
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009105if test "$posix_threads" = "yes"; then
9106 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009109
9110 fi
9111
9112 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9113 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009114 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009116
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009117 ;;
9118 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009120
9121 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009122 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009124
9125 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009126 esac
9127
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9129$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009130 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009131 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009133 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009134 ac_cv_pthread_system_supported=no
9135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009137/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009138
9139 #include <stdio.h>
9140 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009141 void *foo(void *parm) {
9142 return NULL;
9143 }
9144 main() {
9145 pthread_attr_t attr;
9146 pthread_t id;
9147 if (pthread_attr_init(&attr)) exit(-1);
9148 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9149 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9150 exit(0);
9151 }
9152_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009153if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009154 ac_cv_pthread_system_supported=yes
9155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009157fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9159 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009160fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009161
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162
Guido van Rossum627b2d71993-12-24 10:39:16 +00009163fi
9164
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9166$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009167 if test "$ac_cv_pthread_system_supported" = "yes"; then
9168
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009170
9171 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 for ac_func in pthread_sigmask
9173do :
9174 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009175if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009176 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009178_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009179 case $ac_sys_system in
9180 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009181
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009182$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009183
9184 ;;
9185 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009186fi
9187done
9188
9189fi
9190
9191
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9195$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009197if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009199 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009202 ipv6=no
9203 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9205$as_echo "yes" >&6; }
9206 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009207
9208 ipv6=yes
9209 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009211else
Martin v. Löwis11437992002-04-12 09:54:03 +00009212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009214
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009217 ipv6=no
9218
9219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009221/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009222 /* AF_INET6 available check */
9223#include <sys/types.h>
9224#include <sys/socket.h>
9225main()
9226{
9227 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9228 exit(1);
9229 else
9230 exit(0);
9231}
9232
Martin v. Löwis11437992002-04-12 09:54:03 +00009233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009234if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9237$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009238 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009239
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009240else
Matthias Klosec511b472010-05-08 11:01:39 +00009241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009244 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009245
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9248 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009249fi
9250
Martin v. Löwiseba40652007-08-30 20:10:57 +00009251
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009252if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9254$as_echo_n "checking if RFC2553 API is available... " >&6; }
9255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009256/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009257
9258 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009259#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009260int
9261main ()
9262{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009263struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009264 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009265 ;
9266 return 0;
9267}
Matthias Klosec511b472010-05-08 11:01:39 +00009268
Martin v. Löwis11437992002-04-12 09:54:03 +00009269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009271
9272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009274 ipv6=yes
9275
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009276else
Matthias Klosec511b472010-05-08 11:01:39 +00009277
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009279$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009280 ipv6=no
9281
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009284fi
9285
9286if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009287 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009288
9289fi
9290
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291fi
9292
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009293
9294ipv6type=unknown
9295ipv6lib=none
9296ipv6trylibc=no
9297
9298if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9300$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009301 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9302 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009303 case $i in
9304 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009306/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009307
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009308#include <netinet/in.h>
9309#ifdef IPV6_INRIA_VERSION
9310yes
9311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009312_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009315 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009316fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009317rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009318
9319 ;;
9320 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009322/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009323
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009324#include <netinet/in.h>
9325#ifdef __KAME__
9326yes
9327#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009328_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009330 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009331 ipv6type=$i;
9332 ipv6lib=inet6
9333 ipv6libdir=/usr/local/v6/lib
9334 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009335fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009336rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009337
9338 ;;
9339 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009341/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009342
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009343#include <features.h>
9344#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9345yes
9346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009347_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009349 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009350 ipv6type=$i;
9351 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009352fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009353rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009354
9355 ;;
9356 linux-inet6)
9357 if test -d /usr/inet6; then
9358 ipv6type=$i
9359 ipv6lib=inet6
9360 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009361 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009362 fi
9363 ;;
9364 solaris)
9365 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009366 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009367 ipv6type=$i
9368 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009369 fi
9370 fi
9371 ;;
9372 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009374/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009375
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009376#include <sys/param.h>
9377#ifdef _TOSHIBA_INET6
9378yes
9379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009380_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009382 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009383 ipv6type=$i;
9384 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009385 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009386fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009387rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009388
9389 ;;
9390 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009392/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009393
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009394#include </usr/local/v6/include/sys/v6config.h>
9395#ifdef __V6D__
9396yes
9397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009398_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009400 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009401 ipv6type=$i;
9402 ipv6lib=v6;
9403 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009404 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009405fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009406rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009407
9408 ;;
9409 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009411/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009412
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009413#include <sys/param.h>
9414#ifdef _ZETA_MINAMI_INET6
9415yes
9416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009417_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009419 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009420 ipv6type=$i;
9421 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009422 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009423fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009424rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009425
9426 ;;
9427 esac
9428 if test "$ipv6type" != "unknown"; then
9429 break
9430 fi
9431 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9433$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009434fi
9435
9436if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9437 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9438 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9439 echo "using lib$ipv6lib"
9440 else
9441 if test $ipv6trylibc = "yes"; then
9442 echo "using libc"
9443 else
9444 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9445 echo "You need to fetch lib$ipv6lib.a from appropriate"
9446 echo 'ipv6 kit and compile beforehand.'
9447 exit 1
9448 fi
9449 fi
9450fi
9451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9453$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009455/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009456
9457 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009458int
9459main ()
9460{
9461FSIORefNum fRef = 0
9462 ;
9463 return 0;
9464}
Mark Dickinson0712b562010-05-08 19:13:21 +00009465
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009467if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009468
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009469
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009470$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009471
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9473$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009474
Mark Dickinson0712b562010-05-08 19:13:21 +00009475else
9476
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478$as_echo "no" >&6; }
9479
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009480fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9482
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009483# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9485$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009486
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009488if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 withval=$with_doc_strings;
9490fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009491
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009492
9493if test -z "$with_doc_strings"
9494then with_doc_strings="yes"
9495fi
9496if test "$with_doc_strings" != "no"
9497then
9498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009499$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009500
9501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9503$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009504
Neil Schemenauera35c6882001-02-27 04:45:05 +00009505# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9507$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009508
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009511 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009512if test "$withval" != no
9513then
9514
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009515$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9518$as_echo "yes" >&6; }
9519else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009521fi
9522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9524$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525fi
9526
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009527
9528# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9530$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
Martin v. Löwiseba40652007-08-30 20:10:57 +00009532# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009533if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534 withval=$with_pymalloc;
9535fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009536
Neil Schemenauera35c6882001-02-27 04:45:05 +00009537
Neil Schemenauer16c22972002-03-22 15:34:49 +00009538if test -z "$with_pymalloc"
9539then with_pymalloc="yes"
9540fi
9541if test "$with_pymalloc" != "no"
9542then
Martin v. Löwis11437992002-04-12 09:54:03 +00009543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009544$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009545
9546fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9548$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009549
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009550# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9552$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009553
9554# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009555if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009556 withval=$with_valgrind;
9557else
9558 with_valgrind=no
9559fi
9560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9562$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009563if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564 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 +01009565if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009568
9569else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009570 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009571
9572fi
9573
9574
9575fi
9576
Barry Warsawef82cd72000-06-30 16:21:01 +00009577# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9579$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009580
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009584if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009585then
9586
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009587$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9590$as_echo "yes" >&6; }
9591else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9592$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009593fi
9594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009597fi
9598
Barry Warsawef82cd72000-06-30 16:21:01 +00009599
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009600# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009601
Guido van Rossum98935bf2001-09-05 19:13:16 +00009602DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009603
Guido van Rossume97ee181999-12-20 21:27:22 +00009604# the dlopen() function means we might want to use dynload_shlib.o. some
9605# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009606for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607do :
9608 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009609if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009612_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009613
Guido van Rossume97ee181999-12-20 21:27:22 +00009614fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009615done
Guido van Rossume97ee181999-12-20 21:27:22 +00009616
Michael W. Hudson54241132001-12-07 15:38:26 +00009617
Guido van Rossume97ee181999-12-20 21:27:22 +00009618# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9619# loading of modules.
9620
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9622$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009623if test -z "$DYNLOADFILE"
9624then
9625 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009626 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9627 if test "$ac_cv_func_dlopen" = yes
9628 then DYNLOADFILE="dynload_shlib.o"
9629 else DYNLOADFILE="dynload_aix.o"
9630 fi
9631 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009632 BeOS*) DYNLOADFILE="dynload_beos.o";;
9633 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009634 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9635 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009636 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009637 *)
9638 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9639 # out any dynamic loading
9640 if test "$ac_cv_func_dlopen" = yes
9641 then DYNLOADFILE="dynload_shlib.o"
9642 else DYNLOADFILE="dynload_stub.o"
9643 fi
9644 ;;
9645 esac
9646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9648$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009649if test "$DYNLOADFILE" != "dynload_stub.o"
9650then
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009652$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009653
9654fi
9655
Neil Schemenauer4e425612001-06-19 15:44:15 +00009656# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9657
Michael W. Hudson54241132001-12-07 15:38:26 +00009658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9660$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009661if test -z "$MACHDEP_OBJS"
9662then
Jack Jansene578a632001-08-15 01:27:14 +00009663 MACHDEP_OBJS=$extra_machdep_objs
9664else
9665 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9668$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009669
Guido van Rossum627b2d71993-12-24 10:39:16 +00009670# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009671for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9672 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009673 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009674 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009675 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009676 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009677 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009678 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9679 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009680 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009681 setlocale setregid setreuid setresuid setresgid \
9682 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009683 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009684 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009685 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686do :
9687 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9688ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009689if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009692_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009693
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009694fi
9695done
9696
Michael W. Hudson54241132001-12-07 15:38:26 +00009697
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009698# For some functions, having a definition is not sufficient, since
9699# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9701$as_echo_n "checking for chroot... " >&6; }
9702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009704#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009705int
9706main ()
9707{
9708void *x=chroot
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öwisc8ad7cc2002-11-11 13:23:45 +00009714
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009715$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 link" >&5
9726$as_echo_n "checking for link... " >&6; }
9727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009728/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009729#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009730int
9731main ()
9732{
9733void *x=link
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öwisc8ad7cc2002-11-11 13:23:45 +00009739
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 symlink" >&5
9751$as_echo_n "checking for symlink... " >&6; }
9752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009754#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009755int
9756main ()
9757{
9758void *x=symlink
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öwisc8ad7cc2002-11-11 13:23:45 +00009764
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 fchdir" >&5
9776$as_echo_n "checking for fchdir... " >&6; }
9777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009779#include <unistd.h>
9780int
9781main ()
9782{
9783void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +00009789
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009790$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009797
9798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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 fsync" >&5
9801$as_echo_n "checking for fsync... " >&6; }
9802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009804#include <unistd.h>
9805int
9806main ()
9807{
9808void *x=fsync
9809 ;
9810 return 0;
9811}
9812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009816
Matthias Klosec511b472010-05-08 11:01:39 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009822
9823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9826$as_echo_n "checking for fdatasync... " >&6; }
9827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009829#include <unistd.h>
9830int
9831main ()
9832{
9833void *x=fdatasync
9834 ;
9835 return 0;
9836}
9837_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009838if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009839
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009841
Matthias Klosec511b472010-05-08 11:01:39 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009847
9848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9851$as_echo_n "checking for epoll... " >&6; }
9852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009853/* end confdefs.h. */
9854#include <sys/epoll.h>
9855int
9856main ()
9857{
9858void *x=epoll_create
9859 ;
9860 return 0;
9861}
9862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009866
Matthias Klosec511b472010-05-08 11:01:39 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009868$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009872
9873fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9876$as_echo_n "checking for kqueue... " >&6; }
9877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009878/* end confdefs.h. */
9879
9880#include <sys/types.h>
9881#include <sys/event.h>
9882
9883int
9884main ()
9885{
9886int x=kqueue()
9887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009894
Matthias Klosec511b472010-05-08 11:01:39 +00009895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009900
9901fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009903# On some systems (eg. FreeBSD 5), we would find a definition of the
9904# functions ctermid_r, setgroups in the library, but no prototype
9905# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9906# address to avoid compiler warnings and potential miscompilations
9907# because of the missing prototypes.
9908
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9910$as_echo_n "checking for ctermid_r... " >&6; }
9911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009912/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009913
Martin v. Löwisd5843682002-11-21 20:41:28 +00009914#include <stdio.h>
9915
Martin v. Löwisd5843682002-11-21 20:41:28 +00009916int
9917main ()
9918{
9919void* p = ctermid_r
9920 ;
9921 return 0;
9922}
9923_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009925
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009927
Matthias Klosec511b472010-05-08 11:01:39 +00009928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009929$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9932$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009933
9934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9936
Antoine Pitroub170f172010-09-10 18:47:36 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9938$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009939if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009940 $as_echo_n "(cached) " >&6
9941else
9942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009944#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009945int
9946main ()
9947{
9948void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009949
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009950 ;
9951 return 0;
9952}
9953_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009955 ac_cv_flock_decl=yes
9956else
9957 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009958
9959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009961
Antoine Pitroub170f172010-09-10 18:47:36 +00009962fi
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9964$as_echo "$ac_cv_flock_decl" >&6; }
9965if test "x${ac_cv_flock_decl}" = xyes; then
9966 for ac_func in flock
9967do :
9968 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009969if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009970 cat >>confdefs.h <<_ACEOF
9971#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009972_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009973
Antoine Pitrou85729812010-09-07 14:55:24 +00009974else
Antoine Pitroub170f172010-09-10 18:47:36 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009976$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009977if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009978 $as_echo_n "(cached) " >&6
9979else
9980 ac_check_lib_save_LIBS=$LIBS
9981LIBS="-lbsd $LIBS"
9982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9983/* end confdefs.h. */
9984
9985/* Override any GCC internal prototype to avoid an error.
9986 Use char because int might match the return type of a GCC
9987 builtin and then its argument prototype would still apply. */
9988#ifdef __cplusplus
9989extern "C"
9990#endif
9991char flock ();
9992int
9993main ()
9994{
9995return flock ();
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000if ac_fn_c_try_link "$LINENO"; then :
10001 ac_cv_lib_bsd_flock=yes
10002else
10003 ac_cv_lib_bsd_flock=no
10004fi
10005rm -f core conftest.err conftest.$ac_objext \
10006 conftest$ac_exeext conftest.$ac_ext
10007LIBS=$ac_check_lib_save_LIBS
10008fi
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10010$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010011if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010012 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010013
10014
10015$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10016
10017
10018fi
10019
10020
10021fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010022done
10023
Antoine Pitrou85729812010-09-07 14:55:24 +000010024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10027$as_echo_n "checking for getpagesize... " >&6; }
10028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010029/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010030
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010031#include <unistd.h>
10032
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010033int
10034main ()
10035{
10036void* p = getpagesize
10037 ;
10038 return 0;
10039}
10040_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010042
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010044
Matthias Klosec511b472010-05-08 11:01:39 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010046$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10049$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010050
10051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010053
Charles-François Natali93a11752011-11-27 13:01:35 +010010054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10055$as_echo_n "checking for broken unsetenv... " >&6; }
10056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057/* end confdefs.h. */
10058
10059#include <stdlib.h>
10060
10061int
10062main ()
10063{
10064int res = unsetenv("DUMMY")
10065 ;
10066 return 0;
10067}
10068_ACEOF
10069if ac_fn_c_try_compile "$LINENO"; then :
10070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10071$as_echo "no" >&6; }
10072else
10073
10074$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10075
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10077$as_echo "yes" >&6; }
10078
10079fi
10080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10081
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010082for ac_prog in true
10083do
10084 # Extract the first word of "$ac_prog", so it can be a program name with args.
10085set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010088if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010089 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010090else
10091 if test -n "$TRUE"; then
10092 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10093else
10094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097 IFS=$as_save_IFS
10098 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100 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 +000010101 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010102 $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 +000010103 break 2
10104 fi
10105done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010107IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010108
10109fi
10110fi
10111TRUE=$ac_cv_prog_TRUE
10112if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10114$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010118fi
10119
Martin v. Löwiseba40652007-08-30 20:10:57 +000010120
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010121 test -n "$TRUE" && break
10122done
10123test -n "$TRUE" || TRUE="/bin/true"
10124
10125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10127$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010128if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010129 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010130else
10131 ac_check_lib_save_LIBS=$LIBS
10132LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010135
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136/* Override any GCC internal prototype to avoid an error.
10137 Use char because int might match the return type of a GCC
10138 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010139#ifdef __cplusplus
10140extern "C"
10141#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010142char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010143int
10144main ()
10145{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010146return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010147 ;
10148 return 0;
10149}
10150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010152 ac_cv_lib_c_inet_aton=yes
10153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010154 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156rm -f core conftest.err conftest.$ac_objext \
10157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010158LIBS=$ac_check_lib_save_LIBS
10159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10161$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010162if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010163 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10166$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010167if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010168 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010169else
10170 ac_check_lib_save_LIBS=$LIBS
10171LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010174
Martin v. Löwiseba40652007-08-30 20:10:57 +000010175/* Override any GCC internal prototype to avoid an error.
10176 Use char because int might match the return type of a GCC
10177 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010178#ifdef __cplusplus
10179extern "C"
10180#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010181char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010182int
10183main ()
10184{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010186 ;
10187 return 0;
10188}
10189_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010191 ac_cv_lib_resolv_inet_aton=yes
10192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010195rm -f core conftest.err conftest.$ac_objext \
10196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010197LIBS=$ac_check_lib_save_LIBS
10198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10200$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010201if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010202 cat >>confdefs.h <<_ACEOF
10203#define HAVE_LIBRESOLV 1
10204_ACEOF
10205
10206 LIBS="-lresolv $LIBS"
10207
10208fi
10209
10210
10211fi
10212
10213
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010214# On Tru64, chflags seems to be present, but calling it will
10215# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10217$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010218if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010221 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010222 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010225/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010226
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010227#include <sys/stat.h>
10228#include <unistd.h>
10229int main(int argc, char*argv[])
10230{
10231 if(chflags(argv[0], 0) != 0)
10232 return 1;
10233 return 0;
10234}
Ned Deily43e10542011-06-27 23:41:53 -070010235
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010238 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010244fi
10245
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010246
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10249$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010250if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010251 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010252if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010253 ac_cv_have_chflags="yes"
10254else
10255 ac_cv_have_chflags="no"
10256fi
10257
10258fi
10259if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010261$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010262
10263fi
10264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10266$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010267if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010271 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010274/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010275
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010276#include <sys/stat.h>
10277#include <unistd.h>
10278int main(int argc, char*argv[])
10279{
10280 if(lchflags(argv[0], 0) != 0)
10281 return 1;
10282 return 0;
10283}
Ned Deily43e10542011-06-27 23:41:53 -070010284
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010287 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10292 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010293fi
10294
10295
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10298$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010299if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010300 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010301if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010302 ac_cv_have_lchflags="yes"
10303else
10304 ac_cv_have_lchflags="no"
10305fi
10306
10307fi
10308if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010309
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010310$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010311
10312fi
10313
Ronald Oussorenf8752642006-07-06 10:13:35 +000010314case $ac_sys_system/$ac_sys_release in
10315Darwin/*)
10316 _CUR_CFLAGS="${CFLAGS}"
10317 _CUR_LDFLAGS="${LDFLAGS}"
10318 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10319 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10320 ;;
10321esac
10322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10324$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010325if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010326 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010327else
10328 ac_check_lib_save_LIBS=$LIBS
10329LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010331/* end confdefs.h. */
10332
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333/* Override any GCC internal prototype to avoid an error.
10334 Use char because int might match the return type of a GCC
10335 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010336#ifdef __cplusplus
10337extern "C"
10338#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010339char inflateCopy ();
10340int
10341main ()
10342{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010343return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010349 ac_cv_lib_z_inflateCopy=yes
10350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010353rm -f core conftest.err conftest.$ac_objext \
10354 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010355LIBS=$ac_check_lib_save_LIBS
10356fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10358$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010359if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010361$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010362
10363fi
10364
10365
Ronald Oussorenf8752642006-07-06 10:13:35 +000010366case $ac_sys_system/$ac_sys_release in
10367Darwin/*)
10368 CFLAGS="${_CUR_CFLAGS}"
10369 LDFLAGS="${_CUR_LDFLAGS}"
10370 ;;
10371esac
10372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10374$as_echo_n "checking for hstrerror... " >&6; }
10375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010376/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010377
Martin v. Löwise9416172003-05-03 10:12:45 +000010378#include <netdb.h>
10379
Martin v. Löwise9416172003-05-03 10:12:45 +000010380int
10381main ()
10382{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010383void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010391
Matthias Klosec511b472010-05-08 11:01:39 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010393$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010397
10398fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399rm -f core conftest.err conftest.$ac_objext \
10400 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10403$as_echo_n "checking for inet_aton... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010406
Martin v. Löwis86d66262006-02-17 08:40:11 +000010407#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010408#include <sys/socket.h>
10409#include <netinet/in.h>
10410#include <arpa/inet.h>
10411
Martin v. Löwise9416172003-05-03 10:12:45 +000010412int
10413main ()
10414{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010415void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010416 ;
10417 return 0;
10418}
10419_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010423
Matthias Klosec511b472010-05-08 11:01:39 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010425$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010426else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010429
10430fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010431rm -f core conftest.err conftest.$ac_objext \
10432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10435$as_echo_n "checking for inet_pton... " >&6; }
10436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010437/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010438
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010439#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010440#include <sys/socket.h>
10441#include <netinet/in.h>
10442#include <arpa/inet.h>
10443
Martin v. Löwise9416172003-05-03 10:12:45 +000010444int
10445main ()
10446{
10447void* p = inet_pton
10448 ;
10449 return 0;
10450}
10451_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010453
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010454$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010455
Matthias Klosec511b472010-05-08 11:01:39 +000010456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010457$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010461
10462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010464
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010465# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10467$as_echo_n "checking for setgroups... " >&6; }
10468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010469/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010470
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010471#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010472#ifdef HAVE_GRP_H
10473#include <grp.h>
10474#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010475
Martin v. Löwisd5843682002-11-21 20:41:28 +000010476int
10477main ()
10478{
10479void* p = setgroups
10480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010486$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010487
Matthias Klosec511b472010-05-08 11:01:39 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010489$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010493
10494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010496
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010497# check for openpty and forkpty
10498
10499for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010500do :
10501 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010502if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010505_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010506
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10509$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010510if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010511 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010512else
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010514LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010517
Martin v. Löwiseba40652007-08-30 20:10:57 +000010518/* Override any GCC internal prototype to avoid an error.
10519 Use char because int might match the return type of a GCC
10520 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010521#ifdef __cplusplus
10522extern "C"
10523#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010524char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010525int
10526main ()
10527{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010528return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 ;
10530 return 0;
10531}
10532_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010536 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010537fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538rm -f core conftest.err conftest.$ac_objext \
10539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010540LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010541fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10543$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010544if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010545 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010546 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10549$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010550if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010552else
10553 ac_check_lib_save_LIBS=$LIBS
10554LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010556/* end confdefs.h. */
10557
Martin v. Löwiseba40652007-08-30 20:10:57 +000010558/* Override any GCC internal prototype to avoid an error.
10559 Use char because int might match the return type of a GCC
10560 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010561#ifdef __cplusplus
10562extern "C"
10563#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010564char openpty ();
10565int
10566main ()
10567{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010568return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010569 ;
10570 return 0;
10571}
10572_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010574 ac_cv_lib_bsd_openpty=yes
10575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010576 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010577fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578rm -f core conftest.err conftest.$ac_objext \
10579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010580LIBS=$ac_check_lib_save_LIBS
10581fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10583$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010584if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010586 LIBS="$LIBS -lbsd"
10587fi
10588
10589
10590fi
10591
Fred Drake8cef4cf2000-06-28 16:40:38 +000010592
10593fi
10594done
10595
10596for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010597do :
10598 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010599if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010600 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010602_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010603
Fred Drake8cef4cf2000-06-28 16:40:38 +000010604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10606$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010607if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010608 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010609else
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010611LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010614
Martin v. Löwiseba40652007-08-30 20:10:57 +000010615/* Override any GCC internal prototype to avoid an error.
10616 Use char because int might match the return type of a GCC
10617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010618#ifdef __cplusplus
10619extern "C"
10620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010621char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010622int
10623main ()
10624{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010625return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 ;
10627 return 0;
10628}
10629_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010634fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635rm -f core conftest.err conftest.$ac_objext \
10636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010637LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10640$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010641if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010642 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010643 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10646$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010647if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010648 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010649else
10650 ac_check_lib_save_LIBS=$LIBS
10651LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010653/* end confdefs.h. */
10654
Martin v. Löwiseba40652007-08-30 20:10:57 +000010655/* Override any GCC internal prototype to avoid an error.
10656 Use char because int might match the return type of a GCC
10657 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010658#ifdef __cplusplus
10659extern "C"
10660#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010661char forkpty ();
10662int
10663main ()
10664{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010665return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010666 ;
10667 return 0;
10668}
10669_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010670if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010671 ac_cv_lib_bsd_forkpty=yes
10672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010673 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675rm -f core conftest.err conftest.$ac_objext \
10676 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010677LIBS=$ac_check_lib_save_LIBS
10678fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10680$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010681if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010683 LIBS="$LIBS -lbsd"
10684fi
10685
10686
10687fi
10688
Fred Drake8cef4cf2000-06-28 16:40:38 +000010689
10690fi
10691done
10692
Jack Jansendd19cf82001-12-06 22:36:17 +000010693
Brett Cannonaa5778d2008-03-18 04:09:00 +000010694# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010695for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010696do :
10697 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010698if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010699 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010701_ACEOF
10702
10703fi
10704done
10705
10706
Michael W. Hudson54241132001-12-07 15:38:26 +000010707# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010708for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709do :
10710 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10711ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010712if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010715_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010716
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010718done
10719
Michael W. Hudson54241132001-12-07 15:38:26 +000010720
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010721ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010722if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010723 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010724
Martin v. Löwis1142de32002-03-29 16:28:31 +000010725else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010726 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010727 *" dup2.$ac_objext "* ) ;;
10728 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010729 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010730esac
10731
Martin v. Löwis1142de32002-03-29 16:28:31 +000010732fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010733
10734ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010735if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010736 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10737
10738else
10739 case " $LIBOBJS " in
10740 *" getcwd.$ac_objext "* ) ;;
10741 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10742 ;;
10743esac
10744
10745fi
10746
10747ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010748if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010749 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10750
10751else
10752 case " $LIBOBJS " in
10753 *" strdup.$ac_objext "* ) ;;
10754 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10755 ;;
10756esac
10757
10758fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010759
10760
10761for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762do :
10763 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010764if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010765 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010770#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010771int
10772main ()
10773{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010774getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010775 ;
10776 return 0;
10777}
10778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010781$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010782
Guido van Rossum627b2d71993-12-24 10:39:16 +000010783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010785
Guido van Rossum627b2d71993-12-24 10:39:16 +000010786fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010787done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010788
Jack Jansen150753c2003-03-29 22:07:47 +000010789for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010790do :
10791 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010792if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010793 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010797/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010798#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010799int
10800main ()
10801{
10802setpgrp(0,0);
10803 ;
10804 return 0;
10805}
10806_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010810
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010813
10814fi
10815done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010816
Thomas Wouters3a584202000-08-05 23:28:51 +000010817for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010818do :
10819 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010820if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010821 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010822#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010825/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010826#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 ;
10832 return 0;
10833}
10834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010835if ac_fn_c_try_compile "$LINENO"; then :
10836
Guido van Rossum627b2d71993-12-24 10:39:16 +000010837else
Skip Montanaro6dead952003-09-25 14:50:04 +000010838
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010840
Martin v. Löwis11437992002-04-12 09:54:03 +000010841
Guido van Rossum627b2d71993-12-24 10:39:16 +000010842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010844
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010845fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010846done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010847
Michael W. Hudson54241132001-12-07 15:38:26 +000010848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10850$as_echo_n "checking for major... " >&6; }
10851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010853
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010854#if defined(MAJOR_IN_MKDEV)
10855#include <sys/mkdev.h>
10856#elif defined(MAJOR_IN_SYSMACROS)
10857#include <sys/sysmacros.h>
10858#else
10859#include <sys/types.h>
10860#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010861
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010862int
10863main ()
10864{
10865
10866 makedev(major(0),minor(0));
10867
10868 ;
10869 return 0;
10870}
10871_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010873
10874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10878$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010879
10880else
Skip Montanaro6dead952003-09-25 14:50:04 +000010881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10883$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010884
10885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886rm -f core conftest.err conftest.$ac_objext \
10887 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010888
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010889# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010890# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10892$as_echo_n "checking for getaddrinfo... " >&6; }
10893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010894/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010895
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010896#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010897#include <sys/socket.h>
10898#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010899#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010900
Martin v. Löwis11437992002-04-12 09:54:03 +000010901int
10902main ()
10903{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010904getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010909if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010910 have_getaddrinfo=yes
10911else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010912 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010914rm -f core conftest.err conftest.$ac_objext \
10915 conftest$ac_exeext conftest.$ac_ext
10916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10917$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010918if test $have_getaddrinfo = yes
10919then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10921$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010922 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010926 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010930
Stefan Krah0afe4e42012-11-22 23:56:51 +010010931#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010932#include <sys/types.h>
10933#include <netdb.h>
10934#include <string.h>
10935#include <sys/socket.h>
10936#include <netinet/in.h>
10937
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010938int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010939{
10940 int passive, gaierr, inet4 = 0, inet6 = 0;
10941 struct addrinfo hints, *ai, *aitop;
10942 char straddr[INET6_ADDRSTRLEN], strport[16];
10943
10944 for (passive = 0; passive <= 1; passive++) {
10945 memset(&hints, 0, sizeof(hints));
10946 hints.ai_family = AF_UNSPEC;
10947 hints.ai_flags = passive ? AI_PASSIVE : 0;
10948 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010949 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010950 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10951 (void)gai_strerror(gaierr);
10952 goto bad;
10953 }
10954 for (ai = aitop; ai; ai = ai->ai_next) {
10955 if (ai->ai_addr == NULL ||
10956 ai->ai_addrlen == 0 ||
10957 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10958 straddr, sizeof(straddr), strport, sizeof(strport),
10959 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10960 goto bad;
10961 }
10962 switch (ai->ai_family) {
10963 case AF_INET:
10964 if (strcmp(strport, "54321") != 0) {
10965 goto bad;
10966 }
10967 if (passive) {
10968 if (strcmp(straddr, "0.0.0.0") != 0) {
10969 goto bad;
10970 }
10971 } else {
10972 if (strcmp(straddr, "127.0.0.1") != 0) {
10973 goto bad;
10974 }
10975 }
10976 inet4++;
10977 break;
10978 case AF_INET6:
10979 if (strcmp(strport, "54321") != 0) {
10980 goto bad;
10981 }
10982 if (passive) {
10983 if (strcmp(straddr, "::") != 0) {
10984 goto bad;
10985 }
10986 } else {
10987 if (strcmp(straddr, "::1") != 0) {
10988 goto bad;
10989 }
10990 }
10991 inet6++;
10992 break;
10993 case AF_UNSPEC:
10994 goto bad;
10995 break;
10996 default:
10997 /* another family support? */
10998 break;
10999 }
11000 }
11001 }
11002
11003 if (!(inet4 == 0 || inet4 == 2))
11004 goto bad;
11005 if (!(inet6 == 0 || inet6 == 2))
11006 goto bad;
11007
11008 if (aitop)
11009 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011010 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011011
11012 bad:
11013 if (aitop)
11014 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011015 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011016}
11017
Martin v. Löwis11437992002-04-12 09:54:03 +000011018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011020 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011027
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011028fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011029
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031
Benjamin Peterson75fed812010-11-01 01:47:19 +000011032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11033$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11034
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011035if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011036then
11037 if test $ipv6 = yes
11038 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011039 echo 'Fatal: You must get working getaddrinfo() function.'
11040 echo ' or you can specify "--disable-ipv6"'.
11041 exit 1
11042 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011043else
Martin v. Löwis11437992002-04-12 09:54:03 +000011044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011045$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011046
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011047fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011048
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011049for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011050do :
11051 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011052if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011056
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011057fi
11058done
11059
Michael W. Hudson54241132001-12-07 15:38:26 +000011060
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011061# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11063$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011064if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011066else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011069#include <sys/types.h>
11070#include <sys/time.h>
11071#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
Martin v. Löwis11437992002-04-12 09:54:03 +000011073int
11074main ()
11075{
11076if ((struct tm *) 0)
11077return 0;
11078 ;
11079 return 0;
11080}
11081_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011083 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011085 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11090$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011091if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011094
11095fi
11096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11098$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011099if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011100 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011101else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011104#include <sys/types.h>
11105#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011106
Martin v. Löwis11437992002-04-12 09:54:03 +000011107int
11108main ()
11109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011110struct tm tm;
11111 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ;
11114 return 0;
11115}
11116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011117if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011118 ac_cv_struct_tm=time.h
11119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11125$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011126if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011129
11130fi
11131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132ac_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 +000011133#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011136if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011137
11138cat >>confdefs.h <<_ACEOF
11139#define HAVE_STRUCT_TM_TM_ZONE 1
11140_ACEOF
11141
11142
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011143fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011144
Martin v. Löwis11437992002-04-12 09:54:03 +000011145if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011148
11149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11151"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011152if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011156fi
11157
Martin v. Löwiseba40652007-08-30 20:10:57 +000011158cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011160_ACEOF
11161
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11163$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011164if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011168/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011169#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011170#if !HAVE_DECL_TZNAME
11171extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011173
Martin v. Löwis11437992002-04-12 09:54:03 +000011174int
11175main ()
11176{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011177return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 ;
11179 return 0;
11180}
11181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011183 ac_cv_var_tzname=yes
11184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011186fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187rm -f core conftest.err conftest.$ac_objext \
11188 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011189fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11191$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011192 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011194$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011195
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011196 fi
11197fi
11198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199ac_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 +010011200if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011201
11202cat >>confdefs.h <<_ACEOF
11203#define HAVE_STRUCT_STAT_ST_RDEV 1
11204_ACEOF
11205
11206
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011207fi
11208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209ac_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 +010011210if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011211
Martin v. Löwis11437992002-04-12 09:54:03 +000011212cat >>confdefs.h <<_ACEOF
11213#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11214_ACEOF
11215
11216
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011217fi
11218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011219ac_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 +010011220if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011221
11222cat >>confdefs.h <<_ACEOF
11223#define HAVE_STRUCT_STAT_ST_FLAGS 1
11224_ACEOF
11225
11226
11227fi
11228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229ac_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 +010011230if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011231
11232cat >>confdefs.h <<_ACEOF
11233#define HAVE_STRUCT_STAT_ST_GEN 1
11234_ACEOF
11235
11236
11237fi
11238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239ac_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 +010011240if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011241
11242cat >>confdefs.h <<_ACEOF
11243#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11244_ACEOF
11245
11246
11247fi
11248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011249ac_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 +010011250if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011251
Martin v. Löwis11437992002-04-12 09:54:03 +000011252cat >>confdefs.h <<_ACEOF
11253#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11254_ACEOF
11255
11256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011258
11259else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011261 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11263 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011264esac
11265
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011266fi
11267
Michael W. Hudson54241132001-12-07 15:38:26 +000011268
Martin v. Löwis11437992002-04-12 09:54:03 +000011269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11271$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011272if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011274else
Matthias Klosec511b472010-05-08 11:01:39 +000011275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011277/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011278#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011279int
11280main ()
11281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011282return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 ;
11284 return 0;
11285}
11286_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011287if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288 ac_cv_header_time_altzone=yes
11289else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011290 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011293
Martin v. Löwiseba40652007-08-30 20:10:57 +000011294fi
11295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11297$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011298if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011301
11302fi
11303
Guido van Rossumda88dad1995-01-26 00:46:29 +000011304was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11306$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011309
11310#include <sys/types.h>
11311#include <sys/select.h>
11312#include <sys/time.h>
11313
Martin v. Löwis11437992002-04-12 09:54:03 +000011314int
11315main ()
11316{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317;
Martin v. Löwis11437992002-04-12 09:54:03 +000011318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011323
11324
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011325$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011327 was_it_defined=yes
11328
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11332$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11335$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011336if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011340/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011341#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011342int
11343main ()
11344{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011345struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011346 ;
11347 return 0;
11348}
11349_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011351 ac_cv_struct_addrinfo=yes
11352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11356fi
11357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11359$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011360if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011362$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011363
11364fi
11365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11367$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011368if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011373
11374# include <sys/types.h>
11375# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011376int
11377main ()
11378{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011379struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011385 ac_cv_struct_sockaddr_storage=yes
11386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11390fi
11391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11393$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011394if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011396$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011397
11398fi
11399
Guido van Rossum627b2d71993-12-24 10:39:16 +000011400# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11403$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011404if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011409$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011410int
11411main ()
11412{
11413static int test_array [1 - 2 * !(((char) -1) < 0)];
11414test_array [0] = 0
11415
11416 ;
11417 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011418}
Martin v. Löwis11437992002-04-12 09:54:03 +000011419_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011420if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011421 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11428$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011431
11432fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11435$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011436if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011438else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011440/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011441
Martin v. Löwis11437992002-04-12 09:54:03 +000011442int
11443main ()
11444{
11445/* FIXME: Include the comments suggested by Paul. */
11446#ifndef __cplusplus
11447 /* Ultrix mips cc rejects this. */
11448 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011449 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011450 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 char const *const *pcpcc;
11452 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 /* NEC SVR4.0.2 mips cc rejects this. */
11454 struct point {int x, y;};
11455 static struct point const zero = {0,0};
11456 /* AIX XL C 1.02.0.0 rejects this.
11457 It does not let you subtract one const X* pointer from another in
11458 an arm of an if-expression whose if-part is not a constant
11459 expression */
11460 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011461 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011463 ++pcpcc;
11464 ppc = (char**) pcpcc;
11465 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 { /* SCO 3.2v4 cc rejects this. */
11467 char *t;
11468 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011469
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 }
11473 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11474 int x[] = {25, 17};
11475 const int *foo = &x[0];
11476 ++foo;
11477 }
11478 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11479 typedef const int *iptr;
11480 iptr p = 0;
11481 ++p;
11482 }
11483 { /* AIX XL C 1.02.0.0 rejects this saying
11484 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11485 struct s { int j; const int *ap[3]; };
11486 struct s *b; b->j = 5;
11487 }
11488 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11489 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011490 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011492 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011493#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011494
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 ;
11496 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011497}
Martin v. Löwis11437992002-04-12 09:54:03 +000011498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500 ac_cv_c_const=yes
11501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011502 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011505fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11507$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011508if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011509
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511
11512fi
11513
Michael W. Hudson54241132001-12-07 15:38:26 +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 working volatile" >&5
11517$as_echo_n "checking for working volatile... " >&6; }
11518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011519/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520
Martin v. Löwis11437992002-04-12 09:54:03 +000011521int
11522main ()
11523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011524volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 ;
11526 return 0;
11527}
11528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011530 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011531else
Skip Montanaro6dead952003-09-25 14:50:04 +000011532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011533$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011534
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011535
Guido van Rossum627b2d71993-12-24 10:39:16 +000011536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11539$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011540
Guido van Rossumda88dad1995-01-26 00:46:29 +000011541works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11543$as_echo_n "checking for working signed char... " >&6; }
11544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011545/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011546
Martin v. Löwis11437992002-04-12 09:54:03 +000011547int
11548main ()
11549{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011550signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ;
11552 return 0;
11553}
11554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011555if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011556 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011557else
Skip Montanaro6dead952003-09-25 14:50:04 +000011558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011560
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011561
Guido van Rossum7f43da71994-08-01 12:15:30 +000011562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11565$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011566
Guido van Rossumda88dad1995-01-26 00:46:29 +000011567have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11569$as_echo_n "checking for prototypes... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011572int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011573int
11574main ()
11575{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011576return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 ;
11578 return 0;
11579}
11580_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011584
Matthias Klosec511b472010-05-08 11:01:39 +000011585 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11589$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011590
Guido van Rossumda88dad1995-01-26 00:46:29 +000011591works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11593$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011595/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011596
11597#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011598int foo(int x, ...) {
11599 va_list va;
11600 va_start(va, x);
11601 va_arg(va, int);
11602 va_arg(va, char *);
11603 va_arg(va, double);
11604 return 0;
11605}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011606
Martin v. Löwis11437992002-04-12 09:54:03 +000011607int
11608main ()
11609{
Guido van Rossum90eea071996-08-30 20:58:57 +000011610return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011611 ;
11612 return 0;
11613}
11614_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011616
11617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011618$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011619
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011620 works=yes
11621
Guido van Rossum627b2d71993-12-24 10:39:16 +000011622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11625$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011626
Martin v. Löwisd6320502004-08-12 13:45:08 +000011627# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11629$as_echo_n "checking for socketpair... " >&6; }
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011631/* end confdefs.h. */
11632
11633#include <sys/types.h>
11634#include <sys/socket.h>
11635
11636int
11637main ()
11638{
11639void *x=socketpair
11640 ;
11641 return 0;
11642}
11643_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011647
Matthias Klosec511b472010-05-08 11:01:39 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11652$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011653
11654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011656
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011657# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11659$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011661/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662#include <sys/types.h>
11663#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011664int
11665main ()
11666{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011667struct sockaddr x;
11668x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011673if ac_fn_c_try_compile "$LINENO"; then :
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11675$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011678
11679else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11681$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011682
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011685
Guido van Rossumda88dad1995-01-26 00:46:29 +000011686va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11688$as_echo_n "checking whether va_list is an array... " >&6; }
11689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011690/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011691
11692#ifdef HAVE_STDARG_PROTOTYPES
11693#include <stdarg.h>
11694#else
11695#include <varargs.h>
11696#endif
11697
Martin v. Löwis11437992002-04-12 09:54:03 +000011698int
11699main ()
11700{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011701va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 ;
11703 return 0;
11704}
11705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706if ac_fn_c_try_compile "$LINENO"; then :
11707
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011708else
Skip Montanaro6dead952003-09-25 14:50:04 +000011709
Martin v. Löwis11437992002-04-12 09:54:03 +000011710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Guido van Rossumda88dad1995-01-26 00:46:29 +000011713 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011714
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11718$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011719
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011720# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011721
11722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011724if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11729$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011730 OLD_CFLAGS=$CFLAGS
11731 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011733/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011734
11735# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Martin v. Löwis11437992002-04-12 09:54:03 +000011737int
11738main ()
11739{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011740
11741 char *name;
11742 struct hostent *he, *res;
11743 char buffer[2048];
11744 int buflen = 2048;
11745 int h_errnop;
11746
11747 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011748
11749 ;
11750 return 0;
11751}
11752_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011755 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011756
Martin v. Löwis11437992002-04-12 09:54:03 +000011757
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011758$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11761$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011763else
Skip Montanaro6dead952003-09-25 14:50:04 +000011764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11766$as_echo "no" >&6; }
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11768$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011770/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011771
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011772# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
Martin v. Löwis11437992002-04-12 09:54:03 +000011774int
11775main ()
11776{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011777
11778 char *name;
11779 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011780 char buffer[2048];
11781 int buflen = 2048;
11782 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011783
Matthias Klosec511b472010-05-08 11:01:39 +000011784 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
11786 ;
11787 return 0;
11788}
11789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011792 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011793
Martin v. Löwis11437992002-04-12 09:54:03 +000011794
Matthias Klosec511b472010-05-08 11:01:39 +000011795$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11798$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011799
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011800else
Skip Montanaro6dead952003-09-25 14:50:04 +000011801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11803$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11805$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11807/* end confdefs.h. */
11808
11809# include <netdb.h>
11810
11811int
11812main ()
11813{
11814
11815 char *name;
11816 struct hostent *he;
11817 struct hostent_data data;
11818
11819 (void) gethostbyname_r(name, he, &data);
11820
11821 ;
11822 return 0;
11823}
11824_ACEOF
11825if ac_fn_c_try_compile "$LINENO"; then :
11826
11827 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11828
11829
11830$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11831
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11833$as_echo "yes" >&6; }
11834
11835else
11836
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11838$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011839
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011842
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011845
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011848 CFLAGS=$OLD_CFLAGS
11849
11850else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852 for ac_func in gethostbyname
11853do :
11854 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011855if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011856 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011857#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011858_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011859
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011860fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011861done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011862
Michael W. Hudson54241132001-12-07 15:38:26 +000011863
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011864fi
11865
Michael W. Hudson54241132001-12-07 15:38:26 +000011866
11867
11868
11869
11870
11871
Guido van Rossum627b2d71993-12-24 10:39:16 +000011872# checks for system services
11873# (none yet)
11874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011877if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11881$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011882if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011884else
Martin v. Löwis11437992002-04-12 09:54:03 +000011885 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011886LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011889
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890/* Override any GCC internal prototype to avoid an error.
11891 Use char because int might match the return type of a GCC
11892 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011893#ifdef __cplusplus
11894extern "C"
11895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011896char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011897int
11898main ()
11899{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 ;
11902 return 0;
11903}
11904_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011908 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011910rm -f core conftest.err conftest.$ac_objext \
11911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011912LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11915$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011916if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 cat >>confdefs.h <<_ACEOF
11918#define HAVE_LIBIEEE 1
11919_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011920
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011921 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011922
Guido van Rossum627b2d71993-12-24 10:39:16 +000011923fi
11924
Michael W. Hudson54241132001-12-07 15:38:26 +000011925
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011926fi
11927
Michael W. Hudson54241132001-12-07 15:38:26 +000011928
Guido van Rossum7f253911997-05-09 02:42:48 +000011929# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11931$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Martin v. Löwiseba40652007-08-30 20:10:57 +000011933# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011934if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011935 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011936if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011937then
11938
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11942$as_echo "yes" >&6; }
11943else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11944$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011945fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949fi
11950
Guido van Rossum7f253911997-05-09 02:42:48 +000011951
Guido van Rossum7f43da71994-08-01 12:15:30 +000011952# check for --with-libm=...
11953
Guido van Rossum563e7081996-09-10 18:20:48 +000011954case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011955Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011956BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011957*) LIBM=-lm
11958esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11960$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011961
Martin v. Löwiseba40652007-08-30 20:10:57 +000011962# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011964 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011965if test "$withval" = no
11966then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11968$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011969elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011970then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11972$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011973else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011974fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11977$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011978fi
11979
Guido van Rossum7f43da71994-08-01 12:15:30 +000011980
11981# check for --with-libc=...
11982
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11984$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011985
Martin v. Löwiseba40652007-08-30 20:10:57 +000011986# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011989if test "$withval" = no
11990then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11992$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011993elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011994then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11996$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011997else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011998fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12001$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012002fi
12003
Guido van Rossum7f43da71994-08-01 12:15:30 +000012004
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012005# **************************************************
12006# * Check for various properties of floating point *
12007# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12010$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012011if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012013else
12014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016 ac_cv_little_endian_double=no
12017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012019/* end confdefs.h. */
12020
12021#include <string.h>
12022int main() {
12023 double x = 9006104071832581.0;
12024 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12025 return 0;
12026 else
12027 return 1;
12028}
12029
12030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012032 ac_cv_little_endian_double=yes
12033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012038fi
12039
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012040fi
12041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12043$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012044if test "$ac_cv_little_endian_double" = yes
12045then
12046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012048
12049fi
12050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12052$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012053if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012055else
12056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012057if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012058 ac_cv_big_endian_double=no
12059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012061/* end confdefs.h. */
12062
12063#include <string.h>
12064int main() {
12065 double x = 9006104071832581.0;
12066 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12067 return 0;
12068 else
12069 return 1;
12070}
12071
12072_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012073if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012074 ac_cv_big_endian_double=yes
12075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012077fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012080fi
12081
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012082fi
12083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12085$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012086if test "$ac_cv_big_endian_double" = yes
12087then
12088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012090
12091fi
12092
12093# Some ARM platforms use a mixed-endian representation for doubles.
12094# While Python doesn't currently have full support for these platforms
12095# (see e.g., issue 1762561), we can at least make sure that float <-> string
12096# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12098$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012099if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012100 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012101else
12102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012104 ac_cv_mixed_endian_double=no
12105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012107/* end confdefs.h. */
12108
12109#include <string.h>
12110int main() {
12111 double x = 9006104071832581.0;
12112 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12113 return 0;
12114 else
12115 return 1;
12116}
12117
12118_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012120 ac_cv_mixed_endian_double=yes
12121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012126fi
12127
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012128fi
12129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12131$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012132if test "$ac_cv_mixed_endian_double" = yes
12133then
12134
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012135$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012136
12137fi
12138
12139# The short float repr introduced in Python 3.1 requires the
12140# correctly-rounded string <-> double conversion functions from
12141# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12142# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012143# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012144# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012145
12146# This inline assembler syntax may also work for suncc and icc,
12147# so we try it on all platforms.
12148
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12150$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012152/* end confdefs.h. */
12153
12154int
12155main ()
12156{
12157
Mark Dickinsona548dee2009-11-15 13:12:43 +000012158 unsigned short cw;
12159 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12160 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012161
12162 ;
12163 return 0;
12164}
12165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012166if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012167 have_gcc_asm_for_x87=yes
12168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012170fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12173$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012174if test "$have_gcc_asm_for_x87" = yes
12175then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012177$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012178
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012179fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012180
Mark Dickinson04b27232009-01-04 12:29:36 +000012181# Detect whether system arithmetic is subject to x87-style double
12182# rounding issues. The result of this test has little meaning on non
12183# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12184# mode is round-to-nearest and double rounding issues are present, and
12185# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12187$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012188# $BASECFLAGS may affect the result
12189ac_save_cc="$CC"
12190CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012191if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012192 ac_cv_x87_double_rounding=no
12193else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012195/* end confdefs.h. */
12196
12197#include <stdlib.h>
12198#include <math.h>
12199int main() {
12200 volatile double x, y, z;
12201 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12202 x = 0.99999999999999989; /* 1-2**-53 */
12203 y = 1./x;
12204 if (y != 1.)
12205 exit(0);
12206 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12207 x = 1e16;
12208 y = 2.99999;
12209 z = x + y;
12210 if (z != 1e16+4.)
12211 exit(0);
12212 /* both tests show evidence of double rounding */
12213 exit(1);
12214}
12215
12216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012217if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012218 ac_cv_x87_double_rounding=no
12219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012220 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12223 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012224fi
12225
Mark Dickinson99abd142009-10-24 13:44:16 +000012226CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12228$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012229if test "$ac_cv_x87_double_rounding" = yes
12230then
12231
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012233
12234fi
12235
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012236# ************************************
12237# * Check for mathematical functions *
12238# ************************************
12239
12240LIBS_SAVE=$LIBS
12241LIBS="$LIBS $LIBM"
12242
Mark Dickinson265d7382008-04-21 22:32:24 +000012243# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12244# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12246$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012247if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012248 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012249else
12250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012252 ac_cv_tanh_preserves_zero_sign=no
12253else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012255/* end confdefs.h. */
12256
12257#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012258#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012259int main() {
12260 /* return 0 if either negative zeros don't exist
12261 on this platform or if negative zeros exist
12262 and tanh(-0.) == -0. */
12263 if (atan2(0., -1.) == atan2(-0., -1.) ||
12264 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12265 else exit(1);
12266}
12267
12268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012270 ac_cv_tanh_preserves_zero_sign=yes
12271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012272 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012276fi
12277
Mark Dickinson265d7382008-04-21 22:32:24 +000012278fi
12279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12281$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012282if test "$ac_cv_tanh_preserves_zero_sign" = yes
12283then
12284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012285$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012286
12287fi
12288
Mark Dickinson65898e02009-09-05 10:27:00 +000012289for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290do :
12291 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12292ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012293if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012294 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012295#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012296_ACEOF
12297
12298fi
12299done
12300
Mark Dickinson65898e02009-09-05 10:27:00 +000012301for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302do :
12303 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12304ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012305if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012306 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012308_ACEOF
12309
12310fi
12311done
12312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012313ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12314"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012315if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012317else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012319fi
12320
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012321cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012322#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12325"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012326if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012327 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012330fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012331
12332cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12336"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012337if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012341fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012342
12343cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012344#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012345_ACEOF
12346
12347
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012348LIBS=$LIBS_SAVE
12349
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012350# For multiprocessing module, check that sem_open
12351# actually works. For FreeBSD versions <= 7.2,
12352# the kernel module that provides POSIX semaphores
12353# isn't loaded by default, so an attempt to call
12354# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12356$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012357if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012359else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012360 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012361 ac_cv_posix_semaphores_enabled=yes
12362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012364/* end confdefs.h. */
12365
12366#include <unistd.h>
12367#include <fcntl.h>
12368#include <stdio.h>
12369#include <semaphore.h>
12370#include <sys/stat.h>
12371
12372int main(void) {
12373 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12374 if (a == SEM_FAILED) {
12375 perror("sem_open");
12376 return 1;
12377 }
12378 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012379 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012380 return 0;
12381}
12382
12383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012385 ac_cv_posix_semaphores_enabled=yes
12386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012388fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12390 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012391fi
12392
12393
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012394fi
12395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12397$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012398if test $ac_cv_posix_semaphores_enabled = no
12399then
12400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012401$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012402
12403fi
12404
12405# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12407$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012408if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012412 ac_cv_broken_sem_getvalue=yes
12413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012415/* end confdefs.h. */
12416
12417#include <unistd.h>
12418#include <fcntl.h>
12419#include <stdio.h>
12420#include <semaphore.h>
12421#include <sys/stat.h>
12422
12423int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012424 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012425 int count;
12426 int res;
12427 if(a==SEM_FAILED){
12428 perror("sem_open");
12429 return 1;
12430
12431 }
12432 res = sem_getvalue(a, &count);
12433 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012434 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012435 return res==-1 ? 1 : 0;
12436}
12437
12438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012439if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012440 ac_cv_broken_sem_getvalue=no
12441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012443fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012446fi
12447
12448
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012449fi
12450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12452$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012453if test $ac_cv_broken_sem_getvalue = yes
12454then
12455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012457
12458fi
12459
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012460# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12462$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012463# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012464if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012465 enableval=$enable_big_digits; case $enable_big_digits in
12466yes)
12467 enable_big_digits=30 ;;
12468no)
12469 enable_big_digits=15 ;;
1247015|30)
12471 ;;
12472*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012473 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 +000012474esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12476$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012477
12478cat >>confdefs.h <<_ACEOF
12479#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12480_ACEOF
12481
12482
12483else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12485$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012486fi
12487
12488
Guido van Rossumef2255b2000-03-10 22:30:29 +000012489# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012490ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012491if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
12493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012494$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012496 wchar_h="yes"
12497
Guido van Rossumef2255b2000-03-10 22:30:29 +000012498else
Martin v. Löwis11437992002-04-12 09:54:03 +000012499 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012500
12501fi
12502
Michael W. Hudson54241132001-12-07 15:38:26 +000012503
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012505# determine wchar_t size
12506if test "$wchar_h" = yes
12507then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012508 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12511# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12513$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012514if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012515 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12518"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012521 if test "$ac_cv_type_wchar_t" = yes; then
12522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012524as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012525See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526 else
12527 ac_cv_sizeof_wchar_t=0
12528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012529fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530
Martin v. Löwis11437992002-04-12 09:54:03 +000012531fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12533$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012534
12535
12536
Martin v. Löwis11437992002-04-12 09:54:03 +000012537cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012538#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012539_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012540
Michael W. Hudson54241132001-12-07 15:38:26 +000012541
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012542fi
12543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12545$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012546have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012549
12550#include <tcl.h>
12551#if TCL_UTF_MAX != 6
12552# error "NOT UCS4_TCL"
12553#endif
12554int
12555main ()
12556{
12557
12558 ;
12559 return 0;
12560}
12561_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012563
12564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012566
12567 have_ucs4_tcl=yes
12568
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12572$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012573
Skip Montanaro6dead952003-09-25 14:50:04 +000012574# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012575if test "$wchar_h" = yes
12576then
12577 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12579$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012580 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012581 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012582else
12583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012584 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012585 ac_cv_wchar_t_signed=yes
12586else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012588/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012589
12590 #include <wchar.h>
12591 int main()
12592 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012593 /* Success: exit code 0 */
12594 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012595 }
12596
12597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012598if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012599 ac_cv_wchar_t_signed=yes
12600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012602fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012605fi
12606
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012607fi
12608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12610$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611fi
12612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12614$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012616if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012618else
12619 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012620fi
12621
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012622
12623if test $enable_unicode = yes
12624then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012625 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012626 case "$have_ucs4_tcl" in
12627 yes) enable_unicode="ucs4"
12628 ;;
12629 *) enable_unicode="ucs2"
12630 ;;
12631 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012632fi
12633
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012634
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012635case "$enable_unicode" in
12636ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012638
12639 ;;
12640ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012641 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012642
12643 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020012644no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010012645*) 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 +000012646esac
12647
Michael W. Hudson54241132001-12-07 15:38:26 +000012648
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
12650
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012651if test "$enable_unicode" = "no"
12652then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012653 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12655$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012656else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012657 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012659$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012660
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012661
12662 # wchar_t is only usable if it maps to an unsigned type
12663 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012664 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012665 then
12666 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012670 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012671
12672 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12673 then
12674 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012676
12677 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12678 then
12679 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012680 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012681
12682 else
12683 PY_UNICODE_TYPE="no type found"
12684 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12686$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012687fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012688
12689# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12691$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012692if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012693 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 ac_cv_c_bigendian=unknown
12696 # See if we're dealing with a universal compiler.
12697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698/* end confdefs.h. */
12699#ifndef __APPLE_CC__
12700 not a universal capable compiler
12701 #endif
12702 typedef int dummy;
12703
Skip Montanaro6dead952003-09-25 14:50:04 +000012704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012705if ac_fn_c_try_compile "$LINENO"; then :
12706
12707 # Check for potential -arch flags. It is not universal unless
12708 # there are at least two -arch flags with different values.
12709 ac_arch=
12710 ac_prev=
12711 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12712 if test -n "$ac_prev"; then
12713 case $ac_word in
12714 i?86 | x86_64 | ppc | ppc64)
12715 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12716 ac_arch=$ac_word
12717 else
12718 ac_cv_c_bigendian=universal
12719 break
12720 fi
12721 ;;
12722 esac
12723 ac_prev=
12724 elif test "x$ac_word" = "x-arch"; then
12725 ac_prev=arch
12726 fi
12727 done
12728fi
12729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12730 if test $ac_cv_c_bigendian = unknown; then
12731 # See if sys/param.h defines the BYTE_ORDER macro.
12732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012734#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012735 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012736
Martin v. Löwis11437992002-04-12 09:54:03 +000012737int
12738main ()
12739{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012740#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12741 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12742 && LITTLE_ENDIAN)
12743 bogus endian macros
12744 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
12746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012750if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012751 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012753/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012754#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012756
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012760#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761 not big endian
12762 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
12764 ;
12765 return 0;
12766}
12767_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012769 ac_cv_c_bigendian=yes
12770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774fi
12775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12776 fi
12777 if test $ac_cv_c_bigendian = unknown; then
12778 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012780/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781#include <limits.h>
12782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12787 bogus endian macros
12788 #endif
12789
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 ;
12791 return 0;
12792}
12793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794if ac_fn_c_try_compile "$LINENO"; then :
12795 # It does; now see whether it defined to _BIG_ENDIAN or not.
12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797/* end confdefs.h. */
12798#include <limits.h>
12799
12800int
12801main ()
12802{
12803#ifndef _BIG_ENDIAN
12804 not big endian
12805 #endif
12806
12807 ;
12808 return 0;
12809}
12810_ACEOF
12811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12817fi
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12819 fi
12820 if test $ac_cv_c_bigendian = unknown; then
12821 # Compile a test program.
12822 if test "$cross_compiling" = yes; then :
12823 # Try to guess by grepping values from an object file.
12824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825/* end confdefs.h. */
12826short int ascii_mm[] =
12827 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12828 short int ascii_ii[] =
12829 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12830 int use_ascii (int i) {
12831 return ascii_mm[i] + ascii_ii[i];
12832 }
12833 short int ebcdic_ii[] =
12834 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12835 short int ebcdic_mm[] =
12836 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12837 int use_ebcdic (int i) {
12838 return ebcdic_mm[i] + ebcdic_ii[i];
12839 }
12840 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012842int
12843main ()
12844{
12845return use_ascii (foo) == use_ebcdic (foo);
12846 ;
12847 return 0;
12848}
12849_ACEOF
12850if ac_fn_c_try_compile "$LINENO"; then :
12851 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12852 ac_cv_c_bigendian=yes
12853 fi
12854 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12855 if test "$ac_cv_c_bigendian" = unknown; then
12856 ac_cv_c_bigendian=no
12857 else
12858 # finding both strings is unlikely to happen, but who knows?
12859 ac_cv_c_bigendian=unknown
12860 fi
12861 fi
12862fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012866/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012867$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
12870{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872 /* Are we little or big endian? From Harbison&Steele. */
12873 union
12874 {
12875 long int l;
12876 char c[sizeof (long int)];
12877 } u;
12878 u.l = 1;
12879 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880
12881 ;
12882 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012883}
Martin v. Löwis11437992002-04-12 09:54:03 +000012884_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012886 ac_cv_c_bigendian=no
12887else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012892fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12897$as_echo "$ac_cv_c_bigendian" >&6; }
12898 case $ac_cv_c_bigendian in #(
12899 yes)
12900 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12901;; #(
12902 no)
12903 ;; #(
12904 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012905
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012906$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012908 ;; #(
12909 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012910 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010012911 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012912 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012913
Michael W. Hudson54241132001-12-07 15:38:26 +000012914
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012915# Check whether right shifting a negative integer extends the sign bit
12916# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12918$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012919if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012921else
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012924 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012927/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012928
12929int main()
12930{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012931 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012932}
12933
Martin v. Löwis11437992002-04-12 09:54:03 +000012934_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012936 ac_cv_rshift_extends_sign=yes
12937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012939fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012942fi
12943
Martin v. Löwiseba40652007-08-30 20:10:57 +000012944fi
12945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12947$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012948if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012949then
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012951$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012952
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012953fi
12954
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012955# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12957$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012958if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012960else
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012963/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012964#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012965int
12966main ()
12967{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012968
12969 FILE *f = fopen("/dev/null", "r");
12970 flockfile(f);
12971 getc_unlocked(f);
12972 funlockfile(f);
12973
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ;
12975 return 0;
12976}
12977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012978if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012979 ac_cv_have_getc_unlocked=yes
12980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012981 ac_cv_have_getc_unlocked=no
12982fi
12983rm -f core conftest.err conftest.$ac_objext \
12984 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12988$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012989if test "$ac_cv_have_getc_unlocked" = yes
12990then
Martin v. Löwis11437992002-04-12 09:54:03 +000012991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012993
12994fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012995
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012996# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012997# save the value of LIBS so we don't actually link Python with readline
12998LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012999
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013000# On some systems we need to link readline to a termcap compatible
13001# library. NOTE: Keep the precedence of listed libraries synchronised
13002# with setup.py.
13003py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13005$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013006for py_libtermcap in "" ncursesw ncurses curses termcap; do
13007 if test -z "$py_libtermcap"; then
13008 READLINE_LIBS="-lreadline"
13009 else
13010 READLINE_LIBS="-lreadline -l$py_libtermcap"
13011 fi
13012 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013014/* end confdefs.h. */
13015
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016/* Override any GCC internal prototype to avoid an error.
13017 Use char because int might match the return type of a GCC
13018 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013019#ifdef __cplusplus
13020extern "C"
13021#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013022char readline ();
13023int
13024main ()
13025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013027 ;
13028 return 0;
13029}
13030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013032 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034rm -f core conftest.err conftest.$ac_objext \
13035 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013036 if test $py_cv_lib_readline = yes; then
13037 break
13038 fi
13039done
13040# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13041#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013042if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13044$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13047$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013050
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013051fi
13052
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013053# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13055$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013056if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013058else
13059 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013060LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013062/* end confdefs.h. */
13063
Martin v. Löwiseba40652007-08-30 20:10:57 +000013064/* Override any GCC internal prototype to avoid an error.
13065 Use char because int might match the return type of a GCC
13066 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013067#ifdef __cplusplus
13068extern "C"
13069#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013070char rl_callback_handler_install ();
13071int
13072main ()
13073{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013075 ;
13076 return 0;
13077}
13078_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013079if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013080 ac_cv_lib_readline_rl_callback_handler_install=yes
13081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013082 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084rm -f core conftest.err conftest.$ac_objext \
13085 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013086LIBS=$ac_check_lib_save_LIBS
13087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13089$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013090if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013093
13094fi
13095
13096
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013097# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013099/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013100#include <readline/readline.h>
13101_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013102if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013103 have_readline=yes
13104else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013105 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013106
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013107fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013108rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013109if test $have_readline = yes
13110then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013112/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013113#include <readline/readline.h>
13114
13115_ACEOF
13116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013120
13121fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013122rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013125/* end confdefs.h. */
13126#include <readline/readline.h>
13127
13128_ACEOF
13129if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013133
13134fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013135rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013136
13137fi
13138
Martin v. Löwis0daad592001-09-30 21:09:59 +000013139# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13141$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013142if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013143 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013144else
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013146LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013149
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150/* Override any GCC internal prototype to avoid an error.
13151 Use char because int might match the return type of a GCC
13152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013153#ifdef __cplusplus
13154extern "C"
13155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013156char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013160return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013165if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170rm -f core conftest.err conftest.$ac_objext \
13171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013172LIBS=$ac_check_lib_save_LIBS
13173fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13175$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013176if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013177
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013178$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013179
Martin v. Löwis0daad592001-09-30 21:09:59 +000013180fi
13181
Michael W. Hudson54241132001-12-07 15:38:26 +000013182
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013183# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13185$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013186if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013187 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013188else
13189 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013190LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013192/* end confdefs.h. */
13193
13194/* Override any GCC internal prototype to avoid an error.
13195 Use char because int might match the return type of a GCC
13196 builtin and then its argument prototype would still apply. */
13197#ifdef __cplusplus
13198extern "C"
13199#endif
13200char rl_completion_display_matches_hook ();
13201int
13202main ()
13203{
13204return rl_completion_display_matches_hook ();
13205 ;
13206 return 0;
13207}
13208_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013210 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013212 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013213fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214rm -f core conftest.err conftest.$ac_objext \
13215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013216LIBS=$ac_check_lib_save_LIBS
13217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13219$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013220if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013223
13224fi
13225
13226
Martin v. Löwis0daad592001-09-30 21:09:59 +000013227# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13229$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013230if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013231 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013232else
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013234LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Martin v. Löwiseba40652007-08-30 20:10:57 +000013238/* Override any GCC internal prototype to avoid an error.
13239 Use char because int might match the return type of a GCC
13240 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013241#ifdef __cplusplus
13242extern "C"
13243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013244char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013245int
13246main ()
13247{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013248return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013249 ;
13250 return 0;
13251}
13252_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013253if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258rm -f core conftest.err conftest.$ac_objext \
13259 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013260LIBS=$ac_check_lib_save_LIBS
13261fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13263$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013264if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013267
Guido van Rossum353ae582001-07-10 16:45:32 +000013268fi
13269
Jack Jansendd19cf82001-12-06 22:36:17 +000013270
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013271# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013273/* end confdefs.h. */
13274#include <readline/readline.h>
13275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013277 have_readline=yes
13278else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013279 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013280
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013281fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013282rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013283if test $have_readline = yes
13284then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013286/* end confdefs.h. */
13287#include <readline/readline.h>
13288
13289_ACEOF
13290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013291 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013294
13295fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013296rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013297
13298fi
13299
Martin v. Löwis82bca632006-02-10 20:49:30 +000013300# End of readline checks: restore LIBS
13301LIBS=$LIBS_no_readline
13302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13304$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013305if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013306 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013307else
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013310 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013314
13315int main()
13316{
13317 int val1 = nice(1);
13318 if (val1 != -1 && val1 == nice(2))
13319 exit(0);
13320 exit(1);
13321}
13322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013324if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013325 ac_cv_broken_nice=yes
13326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13330 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013331fi
13332
Martin v. Löwiseba40652007-08-30 20:10:57 +000013333fi
13334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13336$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013337if test "$ac_cv_broken_nice" = yes
13338then
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013341
13342fi
13343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13345$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013346if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013349 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013350 ac_cv_broken_poll=no
13351else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013353/* end confdefs.h. */
13354
13355#include <poll.h>
13356
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013357int main()
13358{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013359 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013360 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013361
13362 close (42);
13363
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013364 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013365 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013366 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013367 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013368 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013369 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013370 return 1;
13371}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013372
13373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013375 ac_cv_broken_poll=yes
13376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013382
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013383fi
13384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13386$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013387if test "$ac_cv_broken_poll" = yes
13388then
13389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013391
13392fi
13393
Brett Cannon43802422005-02-10 20:48:03 +000013394# 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 +000013395# (which is not required by ISO C or UNIX spec) and/or if we support
13396# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397ac_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 +000013398#include <$ac_cv_struct_tm>
13399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013401if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013402
13403cat >>confdefs.h <<_ACEOF
13404#define HAVE_STRUCT_TM_TM_ZONE 1
13405_ACEOF
13406
13407
13408fi
13409
13410if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013412$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013413
13414else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13416"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013417if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013420 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421fi
13422
Martin v. Löwiseba40652007-08-30 20:10:57 +000013423cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013424#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013425_ACEOF
13426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13428$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013429if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013433/* end confdefs.h. */
13434#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013435#if !HAVE_DECL_TZNAME
13436extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013437#endif
13438
13439int
13440main ()
13441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013442return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013443 ;
13444 return 0;
13445}
13446_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013448 ac_cv_var_tzname=yes
13449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013450 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452rm -f core conftest.err conftest.$ac_objext \
13453 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013454fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13456$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013457 if test $ac_cv_var_tzname = yes; then
13458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013460
13461 fi
13462fi
13463
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013464
Martin v. Löwis1d459062005-03-14 21:23:33 +000013465# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13467$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013468if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013469 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013470else
13471
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013472if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013473 ac_cv_working_tzset=no
13474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013476/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013477
13478#include <stdlib.h>
13479#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013480#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013481
13482#if HAVE_TZNAME
13483extern char *tzname[];
13484#endif
13485
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013486int main()
13487{
Brett Cannon18367812003-09-19 00:59:16 +000013488 /* Note that we need to ensure that not only does tzset(3)
13489 do 'something' with localtime, but it works as documented
13490 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013491 This includes making sure that tzname is set properly if
13492 tm->tm_zone does not exist since it is the alternative way
13493 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013494
13495 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013496 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013497 */
13498
Martin v. Löwis1d459062005-03-14 21:23:33 +000013499 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013500 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13501
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013502 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013503 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013504 if (localtime(&groundhogday)->tm_hour != 0)
13505 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013506#if HAVE_TZNAME
13507 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13508 if (strcmp(tzname[0], "UTC") ||
13509 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13510 exit(1);
13511#endif
Brett Cannon18367812003-09-19 00:59:16 +000013512
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013513 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013514 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013515 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013516 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013517#if HAVE_TZNAME
13518 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13519 exit(1);
13520#endif
Brett Cannon18367812003-09-19 00:59:16 +000013521
13522 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13523 tzset();
13524 if (localtime(&groundhogday)->tm_hour != 11)
13525 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013526#if HAVE_TZNAME
13527 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13528 exit(1);
13529#endif
13530
13531#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013532 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13533 exit(1);
13534 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13535 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013536#endif
Brett Cannon18367812003-09-19 00:59:16 +000013537
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013538 exit(0);
13539}
13540
13541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013543 ac_cv_working_tzset=yes
13544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013546fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013549fi
13550
Martin v. Löwiseba40652007-08-30 20:10:57 +000013551fi
13552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13554$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013555if test "$ac_cv_working_tzset" = yes
13556then
13557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013558$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013559
13560fi
13561
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013562# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13564$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013565if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013567else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013569/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013570#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013571int
13572main ()
13573{
13574
13575struct stat st;
13576st.st_mtim.tv_nsec = 1;
13577
13578 ;
13579 return 0;
13580}
13581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013583 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13588fi
13589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13591$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013592if test "$ac_cv_stat_tv_nsec" = yes
13593then
13594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013596
13597fi
13598
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013599# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13601$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013602if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013603 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013604else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013606/* end confdefs.h. */
13607#include <sys/stat.h>
13608int
13609main ()
13610{
13611
13612struct stat st;
13613st.st_mtimespec.tv_nsec = 1;
13614
13615 ;
13616 return 0;
13617}
13618_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013620 ac_cv_stat_tv_nsec2=yes
13621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13625fi
13626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13628$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013629if test "$ac_cv_stat_tv_nsec2" = yes
13630then
13631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013633
13634fi
13635
Jack Jansen666b1e72001-10-31 12:11:48 +000013636# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13638$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013639if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013640 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013644#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013645int
13646main ()
13647{
Jack Jansen666b1e72001-10-31 12:11:48 +000013648
13649 int rtn;
13650 rtn = mvwdelch(0,0,0);
13651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013657 ac_cv_mvwdelch_is_expression=yes
13658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13662fi
13663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13665$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013666
13667if test "$ac_cv_mvwdelch_is_expression" = yes
13668then
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013671
13672fi
13673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13675$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013676if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013680/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013681#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013682int
13683main ()
13684{
Jack Jansen666b1e72001-10-31 12:11:48 +000013685
13686 WINDOW *w;
13687 w->_flags = 0;
13688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013694 ac_cv_window_has_flags=yes
13695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13699fi
13700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13702$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013703
Jack Jansen666b1e72001-10-31 12:11:48 +000013704
13705if test "$ac_cv_window_has_flags" = yes
13706then
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013708$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013709
13710fi
13711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13713$as_echo_n "checking for is_term_resized... " >&6; }
13714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013715/* end confdefs.h. */
13716#include <curses.h>
13717int
13718main ()
13719{
13720void *x=is_term_resized
13721 ;
13722 return 0;
13723}
13724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013725if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013728
Matthias Klosec511b472010-05-08 11:01:39 +000013729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13733$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013734
13735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13739$as_echo_n "checking for resize_term... " >&6; }
13740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013741/* end confdefs.h. */
13742#include <curses.h>
13743int
13744main ()
13745{
13746void *x=resize_term
13747 ;
13748 return 0;
13749}
13750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013753$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013754
Matthias Klosec511b472010-05-08 11:01:39 +000013755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13759$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013760
13761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13765$as_echo_n "checking for resizeterm... " >&6; }
13766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013767/* end confdefs.h. */
13768#include <curses.h>
13769int
13770main ()
13771{
13772void *x=resizeterm
13773 ;
13774 return 0;
13775}
13776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013777if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013779$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013780
Matthias Klosec511b472010-05-08 11:01:39 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013782$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13785$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013786
13787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13791$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013792
13793if test -r /dev/ptmx
13794then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13796$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013799
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13802$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013803fi
13804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13806$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013807
13808if test -r /dev/ptc
13809then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13811$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013814
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13817$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013818fi
13819
Mark Dickinson82864d12009-11-15 16:18:58 +000013820if test "$have_long_long" = yes
13821then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13823$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013824 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013828 ac_cv_have_long_long_format=no
13829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013831/* end confdefs.h. */
13832
13833 #include <stdio.h>
13834 #include <stddef.h>
13835 #include <string.h>
13836
13837 #ifdef HAVE_SYS_TYPES_H
13838 #include <sys/types.h>
13839 #endif
13840
13841 int main()
13842 {
13843 char buffer[256];
13844
13845 if (sprintf(buffer, "%lld", (long long)123) < 0)
13846 return 1;
13847 if (strcmp(buffer, "123"))
13848 return 1;
13849
13850 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13851 return 1;
13852 if (strcmp(buffer, "-123"))
13853 return 1;
13854
13855 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13856 return 1;
13857 if (strcmp(buffer, "123"))
13858 return 1;
13859
13860 return 0;
13861 }
13862
13863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013864if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013865 ac_cv_have_long_long_format=yes
13866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013871fi
13872
13873
Mark Dickinson82864d12009-11-15 16:18:58 +000013874fi
13875
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13877$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013878fi
13879
Mark Dickinson5ce84742009-12-31 20:48:04 +000013880if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013881then
13882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013884
13885fi
13886
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013887if test $ac_sys_system = Darwin
13888then
13889 LIBS="$LIBS -framework CoreFoundation"
13890fi
13891
Mark Dickinson82864d12009-11-15 16:18:58 +000013892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13894$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013895if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013896 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013899 ac_cv_have_size_t_format="cross -- assuming yes"
13900
Brett Cannon09d12362006-05-11 05:11:33 +000013901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013903/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013904
Brett Cannon09d12362006-05-11 05:11:33 +000013905#include <stdio.h>
13906#include <stddef.h>
13907#include <string.h>
13908
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013909#ifdef HAVE_SYS_TYPES_H
13910#include <sys/types.h>
13911#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013912
13913#ifdef HAVE_SSIZE_T
13914typedef ssize_t Py_ssize_t;
13915#elif SIZEOF_VOID_P == SIZEOF_LONG
13916typedef long Py_ssize_t;
13917#else
13918typedef int Py_ssize_t;
13919#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013920
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013921int main()
13922{
13923 char buffer[256];
13924
Brett Cannon09d12362006-05-11 05:11:33 +000013925 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13926 return 1;
13927
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013928 if (strcmp(buffer, "123"))
13929 return 1;
13930
13931 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13932 return 1;
13933
13934 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013935 return 1;
13936
13937 return 0;
13938}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013939
Brett Cannon09d12362006-05-11 05:11:33 +000013940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013941if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013942 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013944 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013948fi
13949
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13952$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013953if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013956
13957fi
13958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013959ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013960#ifdef HAVE_SYS_TYPES_H
13961#include <sys/types.h>
13962#endif
13963#ifdef HAVE_SYS_SOCKET_H
13964#include <sys/socket.h>
13965#endif
13966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013967"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013968if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013972$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013973
13974fi
13975
Michael W. Hudson54241132001-12-07 15:38:26 +000013976
Benjamin Peterson7497e912010-10-16 00:53:39 +000013977case $ac_sys_system in
13978AIX*)
13979
13980$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13981 ;;
13982esac
13983
13984
Michael W. Hudson54241132001-12-07 15:38:26 +000013985
13986
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013987for h in `(cd $srcdir;echo Python/thread_*.h)`
13988do
13989 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13990done
13991
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
Neal Norwitzd24499d2005-12-18 21:36:39 +000013993SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13995$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013996for dir in $SRCDIRS; do
13997 if test ! -d $dir; then
13998 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013999 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014000done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14002$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014003
Guido van Rossum627b2d71993-12-24 10:39:16 +000014004# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014005ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014006
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014007ac_config_files="$ac_config_files Modules/ld_so_aix"
14008
Martin v. Löwis11437992002-04-12 09:54:03 +000014009cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014010# This file is a shell script that caches the results of configure
14011# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014012# scripts and configure runs, see configure's option --config-cache.
14013# It is not useful on other systems. If it contains results you don't
14014# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014015#
Martin v. Löwis11437992002-04-12 09:54:03 +000014016# config.status only pays attention to the cache file if you give it
14017# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014018#
Skip Montanaro6dead952003-09-25 14:50:04 +000014019# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014020# loading this file, other *unset* `ac_cv_foo' will be assigned the
14021# following values.
14022
14023_ACEOF
14024
Guido van Rossumf78abae1997-01-21 22:02:36 +000014025# The following way of writing the cache mishandles newlines in values,
14026# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014027# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014028# Ultrix sh set writes to stderr and can't be redirected directly,
14029# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030(
14031 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14032 eval ac_val=\$$ac_var
14033 case $ac_val in #(
14034 *${as_nl}*)
14035 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014036 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14037$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014038 esac
14039 case $ac_var in #(
14040 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14042 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014043 esac ;;
14044 esac
14045 done
14046
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014048 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14049 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014050 # `set' does not quote correctly, so add quotes: double-quote
14051 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014052 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014053 "s/'/'\\\\''/g;
14054 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 *)
14057 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014060 esac |
14061 sort
14062) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014066 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14068 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14070 :end' >>confcache
14071if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14072 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014073 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014074 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14075$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014076 if test ! -f "$cache_file" || test -h "$cache_file"; then
14077 cat confcache >"$cache_file"
14078 else
14079 case $cache_file in #(
14080 */* | ?:*)
14081 mv -f confcache "$cache_file"$$ &&
14082 mv -f "$cache_file"$$ "$cache_file" ;; #(
14083 *)
14084 mv -f confcache "$cache_file" ;;
14085 esac
14086 fi
14087 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014088 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14090$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014091 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014093rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014095test "x$prefix" = xNONE && prefix=$ac_default_prefix
14096# Let make expand exec_prefix.
14097test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014098
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014099DEFS=-DHAVE_CONFIG_H
14100
Skip Montanaro6dead952003-09-25 14:50:04 +000014101ac_libobjs=
14102ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014103U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014104for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14105 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014107 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14109 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014110 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14111 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014112done
14113LIBOBJS=$ac_libobjs
14114
14115LTLIBOBJS=$ac_ltlibobjs
14116
14117
Martin v. Löwis11437992002-04-12 09:54:03 +000014118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014119
Matthias Klose3cef2a92012-03-14 23:39:33 +010014120: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014122ac_clean_files_save=$ac_clean_files
14123ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014124{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14125$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14126as_write_fail=0
14127cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014128#! $SHELL
14129# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014130# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014131# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014132# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014133
Martin v. Löwis11437992002-04-12 09:54:03 +000014134debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014135ac_cs_recheck=false
14136ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014138SHELL=\${CONFIG_SHELL-$SHELL}
14139export SHELL
14140_ASEOF
14141cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14142## -------------------- ##
14143## M4sh Initialization. ##
14144## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014145
Martin v. Löwiseba40652007-08-30 20:10:57 +000014146# Be more Bourne compatible
14147DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014148if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 emulate sh
14150 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014151 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014152 # is contrary to our usage. Disable this feature.
14153 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014156 case `(set -o) 2>/dev/null` in #(
14157 *posix*) :
14158 set -o posix ;; #(
14159 *) :
14160 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014161esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014162fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014163
Skip Montanaro6dead952003-09-25 14:50:04 +000014164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165as_nl='
14166'
14167export as_nl
14168# Printing a long string crashes Solaris 7 /usr/bin/printf.
14169as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14170as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14171as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14172# Prefer a ksh shell builtin over an external printf program on Solaris,
14173# but without wasting forks for bash or zsh.
14174if test -z "$BASH_VERSION$ZSH_VERSION" \
14175 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14176 as_echo='print -r --'
14177 as_echo_n='print -rn --'
14178elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14179 as_echo='printf %s\n'
14180 as_echo_n='printf %s'
14181else
14182 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14183 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14184 as_echo_n='/usr/ucb/echo -n'
14185 else
14186 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14187 as_echo_n_body='eval
14188 arg=$1;
14189 case $arg in #(
14190 *"$as_nl"*)
14191 expr "X$arg" : "X\\(.*\\)$as_nl";
14192 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14193 esac;
14194 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14195 '
14196 export as_echo_n_body
14197 as_echo_n='sh -c $as_echo_n_body as_echo'
14198 fi
14199 export as_echo_body
14200 as_echo='sh -c $as_echo_body as_echo'
14201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014202
14203# The user is always right.
14204if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205 PATH_SEPARATOR=:
14206 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14207 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14208 PATH_SEPARATOR=';'
14209 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212
14213# IFS
14214# We need space, tab and new line, in precisely that order. Quoting is
14215# there to prevent editors from complaining about space-tab.
14216# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14217# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014218IFS=" "" $as_nl"
14219
14220# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014221as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014222case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014223 *[\\/]* ) as_myself=$0 ;;
14224 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014225for as_dir in $PATH
14226do
14227 IFS=$as_save_IFS
14228 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14230 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014231IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014232
Martin v. Löwiseba40652007-08-30 20:10:57 +000014233 ;;
14234esac
14235# We did not find ourselves, most probably we were run as `sh COMMAND'
14236# in which case we are not to be found in the path.
14237if test "x$as_myself" = x; then
14238 as_myself=$0
14239fi
14240if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14242 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243fi
14244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014245# Unset variables that we do not need and which cause bugs (e.g. in
14246# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14247# suppresses any "Segmentation fault" message there. '((' could
14248# trigger a bug in pdksh 5.2.14.
14249for as_var in BASH_ENV ENV MAIL MAILPATH
14250do eval test x\${$as_var+set} = xset \
14251 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252done
14253PS1='$ '
14254PS2='> '
14255PS4='+ '
14256
14257# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258LC_ALL=C
14259export LC_ALL
14260LANGUAGE=C
14261export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014263# CDPATH.
14264(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14265
14266
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014267# as_fn_error STATUS ERROR [LINENO LOG_FD]
14268# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014269# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14270# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014271# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014272as_fn_error ()
14273{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014274 as_status=$1; test $as_status -eq 0 && as_status=1
14275 if test "$4"; then
14276 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14277 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014279 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014280 as_fn_exit $as_status
14281} # as_fn_error
14282
14283
14284# as_fn_set_status STATUS
14285# -----------------------
14286# Set $? to STATUS, without forking.
14287as_fn_set_status ()
14288{
14289 return $1
14290} # as_fn_set_status
14291
14292# as_fn_exit STATUS
14293# -----------------
14294# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14295as_fn_exit ()
14296{
14297 set +e
14298 as_fn_set_status $1
14299 exit $1
14300} # as_fn_exit
14301
14302# as_fn_unset VAR
14303# ---------------
14304# Portably unset VAR.
14305as_fn_unset ()
14306{
14307 { eval $1=; unset $1;}
14308}
14309as_unset=as_fn_unset
14310# as_fn_append VAR VALUE
14311# ----------------------
14312# Append the text in VALUE to the end of the definition contained in VAR. Take
14313# advantage of any shell optimizations that allow amortized linear growth over
14314# repeated appends, instead of the typical quadratic growth present in naive
14315# implementations.
14316if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14317 eval 'as_fn_append ()
14318 {
14319 eval $1+=\$2
14320 }'
14321else
14322 as_fn_append ()
14323 {
14324 eval $1=\$$1\$2
14325 }
14326fi # as_fn_append
14327
14328# as_fn_arith ARG...
14329# ------------------
14330# Perform arithmetic evaluation on the ARGs, and store the result in the
14331# global $as_val. Take advantage of shells that can avoid forks. The arguments
14332# must be portable across $(()) and expr.
14333if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14334 eval 'as_fn_arith ()
14335 {
14336 as_val=$(( $* ))
14337 }'
14338else
14339 as_fn_arith ()
14340 {
14341 as_val=`expr "$@" || test $? -eq 1`
14342 }
14343fi # as_fn_arith
14344
14345
Martin v. Löwiseba40652007-08-30 20:10:57 +000014346if expr a : '\(a\)' >/dev/null 2>&1 &&
14347 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14348 as_expr=expr
14349else
14350 as_expr=false
14351fi
14352
14353if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14354 as_basename=basename
14355else
14356 as_basename=false
14357fi
14358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14360 as_dirname=dirname
14361else
14362 as_dirname=false
14363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014364
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365as_me=`$as_basename -- "$0" ||
14366$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14367 X"$0" : 'X\(//\)$' \| \
14368 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370 sed '/^.*\/\([^/][^/]*\)\/*$/{
14371 s//\1/
14372 q
14373 }
14374 /^X\/\(\/\/\)$/{
14375 s//\1/
14376 q
14377 }
14378 /^X\/\(\/\).*/{
14379 s//\1/
14380 q
14381 }
14382 s/.*/./; q'`
14383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014384# Avoid depending upon Character Ranges.
14385as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14386as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14387as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14388as_cr_digits='0123456789'
14389as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014390
14391ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014392case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014394 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396 xy) ECHO_C='\c';;
14397 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14398 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014399 esac;;
14400*)
14401 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014403
Martin v. Löwis11437992002-04-12 09:54:03 +000014404rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405if test -d conf$$.dir; then
14406 rm -f conf$$.dir/conf$$.file
14407else
14408 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014409 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014411if (echo >conf$$.file) 2>/dev/null; then
14412 if ln -s conf$$.file conf$$ 2>/dev/null; then
14413 as_ln_s='ln -s'
14414 # ... but there are two gotchas:
14415 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14416 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14417 # In both cases, we have to default to `cp -p'.
14418 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14419 as_ln_s='cp -p'
14420 elif ln conf$$.file conf$$ 2>/dev/null; then
14421 as_ln_s=ln
14422 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014424 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014425else
14426 as_ln_s='cp -p'
14427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14429rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431
14432# as_fn_mkdir_p
14433# -------------
14434# Create "$as_dir" as a directory, including parents if necessary.
14435as_fn_mkdir_p ()
14436{
14437
14438 case $as_dir in #(
14439 -*) as_dir=./$as_dir;;
14440 esac
14441 test -d "$as_dir" || eval $as_mkdir_p || {
14442 as_dirs=
14443 while :; do
14444 case $as_dir in #(
14445 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14446 *) as_qdir=$as_dir;;
14447 esac
14448 as_dirs="'$as_qdir' $as_dirs"
14449 as_dir=`$as_dirname -- "$as_dir" ||
14450$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14451 X"$as_dir" : 'X\(//\)[^/]' \| \
14452 X"$as_dir" : 'X\(//\)$' \| \
14453 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14454$as_echo X"$as_dir" |
14455 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14456 s//\1/
14457 q
14458 }
14459 /^X\(\/\/\)[^/].*/{
14460 s//\1/
14461 q
14462 }
14463 /^X\(\/\/\)$/{
14464 s//\1/
14465 q
14466 }
14467 /^X\(\/\).*/{
14468 s//\1/
14469 q
14470 }
14471 s/.*/./; q'`
14472 test -d "$as_dir" && break
14473 done
14474 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014475 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476
14477
14478} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014479if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014481else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014482 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014483 as_mkdir_p=false
14484fi
14485
Martin v. Löwiseba40652007-08-30 20:10:57 +000014486if test -x / >/dev/null 2>&1; then
14487 as_test_x='test -x'
14488else
14489 if ls -dL / >/dev/null 2>&1; then
14490 as_ls_L_option=L
14491 else
14492 as_ls_L_option=
14493 fi
14494 as_test_x='
14495 eval sh -c '\''
14496 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014498 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499 case $1 in #(
14500 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014501 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503 ???[sx]*):;;*)false;;esac;fi
14504 '\'' sh
14505 '
14506fi
14507as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014508
14509# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014510as_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 +000014511
14512# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014513as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
14515
Martin v. Löwis11437992002-04-12 09:54:03 +000014516exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517## ----------------------------------- ##
14518## Main body of $CONFIG_STATUS script. ##
14519## ----------------------------------- ##
14520_ASEOF
14521test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014522
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14524# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014525# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526# values after options handling.
14527ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014528This file was extended by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +010014529generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014530
14531 CONFIG_FILES = $CONFIG_FILES
14532 CONFIG_HEADERS = $CONFIG_HEADERS
14533 CONFIG_LINKS = $CONFIG_LINKS
14534 CONFIG_COMMANDS = $CONFIG_COMMANDS
14535 $ $0 $@
14536
Martin v. Löwiseba40652007-08-30 20:10:57 +000014537on `(hostname || uname -n) 2>/dev/null | sed 1q`
14538"
14539
Martin v. Löwis11437992002-04-12 09:54:03 +000014540_ACEOF
14541
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014542case $ac_config_files in *"
14543"*) set x $ac_config_files; shift; ac_config_files=$*;;
14544esac
14545
14546case $ac_config_headers in *"
14547"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14548esac
14549
14550
14551cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014552# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014553config_files="$ac_config_files"
14554config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014555
Martin v. Löwiseba40652007-08-30 20:10:57 +000014556_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014559ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560\`$as_me' instantiates files and other configuration actions
14561from templates according to the current configuration. Unless the files
14562and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014565
14566 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014568 --config print configuration, then exit
14569 -q, --quiet, --silent
14570 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 -d, --debug don't remove temporary files
14572 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014573 --file=FILE[:TEMPLATE]
14574 instantiate the configuration file FILE
14575 --header=FILE[:TEMPLATE]
14576 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
14578Configuration files:
14579$config_files
14580
14581Configuration headers:
14582$config_headers
14583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014584Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014585
Martin v. Löwiseba40652007-08-30 20:10:57 +000014586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14588ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014589ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014590python config.status 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +010014591configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014592 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014593
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014594Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014595This config.status script is free software; the Free Software Foundation
14596gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597
14598ac_pwd='$ac_pwd'
14599srcdir='$srcdir'
14600INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000014601MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014602test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014603_ACEOF
14604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14606# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014607ac_need_defaults=:
14608while test $# != 0
14609do
14610 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014611 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14613 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014614 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014616 --*=)
14617 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14618 ac_optarg=
14619 ac_shift=:
14620 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014621 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014622 ac_option=$1
14623 ac_optarg=$2
14624 ac_shift=shift
14625 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 esac
14627
Skip Montanaro6dead952003-09-25 14:50:04 +000014628 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014630 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14631 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014632 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014633 $as_echo "$ac_cs_version"; exit ;;
14634 --config | --confi | --conf | --con | --co | --c )
14635 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014637 debug=: ;;
14638 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014639 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014640 case $ac_optarg in
14641 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014642 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014643 esac
14644 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014645 ac_need_defaults=false;;
14646 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014647 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014648 case $ac_optarg in
14649 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14650 esac
14651 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014652 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653 --he | --h)
14654 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014655 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014656Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014659 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14660 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14661 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014664 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014665Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014667 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014668 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014669
14670 esac
14671 shift
14672done
14673
Skip Montanaro6dead952003-09-25 14:50:04 +000014674ac_configure_extra_args=
14675
14676if $ac_cs_silent; then
14677 exec 6>/dev/null
14678 ac_configure_extra_args="$ac_configure_extra_args --silent"
14679fi
14680
14681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014682cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014683if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014684 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14685 shift
14686 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14687 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014688 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014690fi
14691
Martin v. Löwis11437992002-04-12 09:54:03 +000014692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014694exec 5>>config.log
14695{
14696 echo
14697 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14698## Running $as_me. ##
14699_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014700 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014701} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014702
Martin v. Löwiseba40652007-08-30 20:10:57 +000014703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014704cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014705_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014708
14709# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014710for ac_config_target in $ac_config_targets
14711do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014712 case $ac_config_target in
14713 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14714 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14715 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14716 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014717 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14718 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014719 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14720 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014721 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014722 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014723
Matthias Klose3cef2a92012-03-14 23:39:33 +010014724 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 esac
14726done
14727
Martin v. Löwiseba40652007-08-30 20:10:57 +000014728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729# If the user did not use the arguments to specify the items to instantiate,
14730# then the envvar interface is used. Set only those that are not.
14731# We use the long form for the default assignment because of an extremely
14732# bizarre bug on SunOS 4.1.3.
14733if $ac_need_defaults; then
14734 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14735 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14736fi
14737
Skip Montanaro6dead952003-09-25 14:50:04 +000014738# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014739# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014740# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741# Hook for its removal unless debugging.
14742# Note that there is a small window in which the directory will not be cleaned:
14743# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014744$debug ||
14745{
Matthias Klose3cef2a92012-03-14 23:39:33 +010014746 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014747 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010014748 : "${ac_tmp:=$tmp}"
14749 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014750' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014752}
Martin v. Löwis11437992002-04-12 09:54:03 +000014753# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014754
Martin v. Löwis11437992002-04-12 09:54:03 +000014755{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010014757 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014758} ||
14759{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014760 tmp=./conf$$-$RANDOM
14761 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014762} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010014763ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014765# Set up the scripts for CONFIG_FILES section.
14766# No need to generate them if there are no CONFIG_FILES.
14767# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014770
14771ac_cr=`echo X | tr X '\015'`
14772# On cygwin, bash can eat \r inside `` if the user requested igncr.
14773# But we know of no other shell where ac_cr would be empty at this
14774# point, so we can use a bashism as a fallback.
14775if test "x$ac_cr" = x; then
14776 eval ac_cr=\$\'\\r\'
14777fi
14778ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14779if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014780 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014781else
14782 ac_cs_awk_cr=$ac_cr
14783fi
14784
Matthias Klose3cef2a92012-03-14 23:39:33 +010014785echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014786_ACEOF
14787
Martin v. Löwiseba40652007-08-30 20:10:57 +000014788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014789{
14790 echo "cat >conf$$subs.awk <<_ACEOF" &&
14791 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14792 echo "_ACEOF"
14793} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014794 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14795ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014796ac_delim='%!_!# '
14797for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014798 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014799 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014801 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14802 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014803 break
14804 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014805 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014806 else
14807 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014808 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014809done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014810rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010014813cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014814_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014815sed -n '
14816h
14817s/^/S["/; s/!.*/"]=/
14818p
14819g
14820s/^[^!]*!//
14821:repl
14822t repl
14823s/'"$ac_delim"'$//
14824t delim
14825:nl
14826h
14827s/\(.\{148\}\)..*/\1/
14828t more1
14829s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14830p
14831n
14832b repl
14833:more1
14834s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14835p
14836g
14837s/.\{148\}//
14838t nl
14839:delim
14840h
14841s/\(.\{148\}\)..*/\1/
14842t more2
14843s/["\\]/\\&/g; s/^/"/; s/$/"/
14844p
14845b
14846:more2
14847s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14848p
14849g
14850s/.\{148\}//
14851t delim
14852' <conf$$subs.awk | sed '
14853/^[^""]/{
14854 N
14855 s/\n//
14856}
14857' >>$CONFIG_STATUS || ac_write_fail=1
14858rm -f conf$$subs.awk
14859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14860_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010014861cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862 for (key in S) S_is_set[key] = 1
14863 FS = ""
14864
14865}
14866{
14867 line = $ 0
14868 nfields = split(line, field, "@")
14869 substed = 0
14870 len = length(field[1])
14871 for (i = 2; i < nfields; i++) {
14872 key = field[i]
14873 keylen = length(key)
14874 if (S_is_set[key]) {
14875 value = S[key]
14876 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14877 len += length(value) + length(field[++i])
14878 substed = 1
14879 } else
14880 len += 1 + keylen
14881 }
14882
14883 print line
14884}
14885
14886_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014887_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14889if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14890 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14891else
14892 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010014893fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014894 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014895_ACEOF
14896
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014897# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14898# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014899# trailing colons and then remove the whole line if VPATH becomes empty
14900# (actually we leave an empty line to preserve line numbers).
14901if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014902 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14903h
14904s///
14905s/^/:/
14906s/[ ]*$/:/
14907s/:\$(srcdir):/:/g
14908s/:\${srcdir}:/:/g
14909s/:@srcdir@:/:/g
14910s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014911s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014912x
14913s/\(=[ ]*\).*/\1/
14914G
14915s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014916s/^[^=]*=[ ]*$//
14917}'
14918fi
14919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014921fi # test -n "$CONFIG_FILES"
14922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014923# Set up the scripts for CONFIG_HEADERS section.
14924# No need to generate them if there are no CONFIG_HEADERS.
14925# This happens for instance with `./config.status Makefile'.
14926if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014927cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014928BEGIN {
14929_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014931# Transform confdefs.h into an awk script `defines.awk', embedded as
14932# here-document in config.status, that substitutes the proper values into
14933# config.h.in to produce config.h.
14934
14935# Create a delimiter string that does not exist in confdefs.h, to ease
14936# handling of long lines.
14937ac_delim='%!_!# '
14938for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010014939 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14940 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014941 break
14942 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014943 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014944 else
14945 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14946 fi
14947done
14948
14949# For the awk script, D is an array of macro values keyed by name,
14950# likewise P contains macro parameters if any. Preserve backslash
14951# newline sequences.
14952
14953ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14954sed -n '
14955s/.\{148\}/&'"$ac_delim"'/g
14956t rset
14957:rset
14958s/^[ ]*#[ ]*define[ ][ ]*/ /
14959t def
14960d
14961:def
14962s/\\$//
14963t bsnl
14964s/["\\]/\\&/g
14965s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14966D["\1"]=" \3"/p
14967s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14968d
14969:bsnl
14970s/["\\]/\\&/g
14971s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14972D["\1"]=" \3\\\\\\n"\\/p
14973t cont
14974s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14975t cont
14976d
14977:cont
14978n
14979s/.\{148\}/&'"$ac_delim"'/g
14980t clear
14981:clear
14982s/\\$//
14983t bsnlc
14984s/["\\]/\\&/g; s/^/"/; s/$/"/p
14985d
14986:bsnlc
14987s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14988b cont
14989' <confdefs.h | sed '
14990s/'"$ac_delim"'/"\\\
14991"/g' >>$CONFIG_STATUS || ac_write_fail=1
14992
14993cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14994 for (key in D) D_is_set[key] = 1
14995 FS = ""
14996}
14997/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14998 line = \$ 0
14999 split(line, arg, " ")
15000 if (arg[1] == "#") {
15001 defundef = arg[2]
15002 mac1 = arg[3]
15003 } else {
15004 defundef = substr(arg[1], 2)
15005 mac1 = arg[2]
15006 }
15007 split(mac1, mac2, "(") #)
15008 macro = mac2[1]
15009 prefix = substr(line, 1, index(line, defundef) - 1)
15010 if (D_is_set[macro]) {
15011 # Preserve the white space surrounding the "#".
15012 print prefix "define", macro P[macro] D[macro]
15013 next
15014 } else {
15015 # Replace #undef with comments. This is necessary, for example,
15016 # in the case of _POSIX_SOURCE, which is predefined and required
15017 # on some systems where configure will not decide to define it.
15018 if (defundef == "undef") {
15019 print "/*", prefix defundef, macro, "*/"
15020 next
15021 }
15022 }
15023}
15024{ print }
15025_ACAWK
15026_ACEOF
15027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015028 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015029fi # test -n "$CONFIG_HEADERS"
15030
15031
15032eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15033shift
15034for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035do
15036 case $ac_tag in
15037 :[FHLC]) ac_mode=$ac_tag; continue;;
15038 esac
15039 case $ac_mode$ac_tag in
15040 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015041 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042 :[FH]-) ac_tag=-:-;;
15043 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15044 esac
15045 ac_save_IFS=$IFS
15046 IFS=:
15047 set x $ac_tag
15048 IFS=$ac_save_IFS
15049 shift
15050 ac_file=$1
15051 shift
15052
15053 case $ac_mode in
15054 :L) ac_source=$1;;
15055 :[FH])
15056 ac_file_inputs=
15057 for ac_f
15058 do
15059 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015060 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061 *) # Look for the file first in the build tree, then in the source tree
15062 # (if the path is not absolute). The absolute path cannot be DOS-style,
15063 # because $ac_f cannot contain `:'.
15064 test -f "$ac_f" ||
15065 case $ac_f in
15066 [\\/$]*) false;;
15067 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15068 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015069 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015071 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15072 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 done
15074
15075 # Let's still pretend it is `configure' which instantiates (i.e., don't
15076 # use $as_me), people would be surprised to read:
15077 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078 configure_input='Generated from '`
15079 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15080 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015081 if test x"$ac_file" != x-; then
15082 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015083 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15084$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015086 # Neutralize special characters interpreted by sed in replacement strings.
15087 case $configure_input in #(
15088 *\&* | *\|* | *\\* )
15089 ac_sed_conf_input=`$as_echo "$configure_input" |
15090 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15091 *) ac_sed_conf_input=$configure_input;;
15092 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015093
15094 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015095 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15096 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015097 esac
15098 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 esac
15100
Martin v. Löwiseba40652007-08-30 20:10:57 +000015101 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015102$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015103 X"$ac_file" : 'X\(//\)[^/]' \| \
15104 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015105 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015106$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015107 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15108 s//\1/
15109 q
15110 }
15111 /^X\(\/\/\)[^/].*/{
15112 s//\1/
15113 q
15114 }
15115 /^X\(\/\/\)$/{
15116 s//\1/
15117 q
15118 }
15119 /^X\(\/\).*/{
15120 s//\1/
15121 q
15122 }
15123 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015124 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 ac_builddir=.
15126
Martin v. Löwiseba40652007-08-30 20:10:57 +000015127case "$ac_dir" in
15128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15129*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015131 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015132 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 case $ac_top_builddir_sub in
15134 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15135 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15136 esac ;;
15137esac
15138ac_abs_top_builddir=$ac_pwd
15139ac_abs_builddir=$ac_pwd$ac_dir_suffix
15140# for backward compatibility:
15141ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015142
15143case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146 ac_top_srcdir=$ac_top_builddir_sub
15147 ac_abs_top_srcdir=$ac_pwd ;;
15148 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015150 ac_top_srcdir=$srcdir
15151 ac_abs_top_srcdir=$srcdir ;;
15152 *) # Relative name.
15153 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15154 ac_top_srcdir=$ac_top_build_prefix$srcdir
15155 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015156esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015158
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
Martin v. Löwiseba40652007-08-30 20:10:57 +000015160 case $ac_mode in
15161 :F)
15162 #
15163 # CONFIG_FILE
15164 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
15166 case $INSTALL in
15167 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015170 ac_MKDIR_P=$MKDIR_P
15171 case $MKDIR_P in
15172 [\\/$]* | ?:[\\/]* ) ;;
15173 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15174 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015175_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015177cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015178# If the template does not know about datarootdir, expand it.
15179# FIXME: This hack should be removed a few years after 2.60.
15180ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015181ac_sed_dataroot='
15182/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015183 p
15184 q
15185}
15186/@datadir@/p
15187/@docdir@/p
15188/@infodir@/p
15189/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190/@mandir@/p'
15191case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192*datarootdir*) ac_datarootdir_seen=yes;;
15193*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15195$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015197cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198 ac_datarootdir_hack='
15199 s&@datadir@&$datadir&g
15200 s&@docdir@&$docdir&g
15201 s&@infodir@&$infodir&g
15202 s&@localedir@&$localedir&g
15203 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015204 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205esac
15206_ACEOF
15207
15208# Neutralize VPATH when `$srcdir' = `.'.
15209# Shell code in configure.ac might set extrasub.
15210# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15212ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015213$extrasub
15214_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015215cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015216:t
15217/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221s&@srcdir@&$ac_srcdir&;t t
15222s&@abs_srcdir@&$ac_abs_srcdir&;t t
15223s&@top_srcdir@&$ac_top_srcdir&;t t
15224s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15225s&@builddir@&$ac_builddir&;t t
15226s&@abs_builddir@&$ac_abs_builddir&;t t
15227s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15228s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015229s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015232eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15233 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234
Martin v. Löwiseba40652007-08-30 20:10:57 +000015235test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015236 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15237 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15238 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015239 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015240which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015241$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015242which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015243
Matthias Klose3cef2a92012-03-14 23:39:33 +010015244 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015246 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15247 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015248 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015249 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250 ;;
15251 :H)
15252 #
15253 # CONFIG_HEADER
15254 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256 {
15257 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015258 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15259 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015260 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015261 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015262 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15263$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015265 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015266 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015267 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 fi
15269 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015270 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015271 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015272 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015274 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015275
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276
15277 esac
15278
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015279
15280 case $ac_file$ac_mode in
15281 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15282
15283 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284done # for ac_tag
15285
Guido van Rossum627b2d71993-12-24 10:39:16 +000015286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015287as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015288_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015289ac_clean_files=$ac_clean_files_save
15290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015291test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015292 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293
Martin v. Löwis11437992002-04-12 09:54:03 +000015294
15295# configure is writing to config.log, and then calls config.status.
15296# config.status does its own redirection, appending to config.log.
15297# Unfortunately, on DOS this fails, as config.log is still kept open
15298# by configure, so config.status won't be able to write to it; its
15299# output is simply discarded. So we exec the FD to /dev/null,
15300# effectively closing config.log, so it can be properly (re)opened and
15301# appended to by config.status. When coming back to configure, we
15302# need to make the FD available again.
15303if test "$no_create" != yes; then
15304 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015305 ac_config_status_args=
15306 test "$silent" = yes &&
15307 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015309 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015310 exec 5>>config.log
15311 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15312 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015313 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015314fi
15315if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15317$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015318fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015319
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015320
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015321echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015322if test ! -f Modules/Setup
15323then
15324 cp $srcdir/Modules/Setup.dist Modules/Setup
15325fi
15326
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015327echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015328if test ! -f Modules/Setup.local
15329then
15330 echo "# Edit this file for local setup changes" >Modules/Setup.local
15331fi
15332
15333echo "creating Makefile"
15334$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15335 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015336 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015337
15338case $ac_sys_system in
15339BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015341
15342 Support for BeOS is deprecated as of Python 2.6.
15343 See PEP 11 for the gory details.
15344 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015345$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015346
15347 Support for BeOS is deprecated as of Python 2.6.
15348 See PEP 11 for the gory details.
15349 " >&2;}
15350 ;;
15351*) ;;
15352esac
15353
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015354mv config.c Modules