blob: f2304f6db70574336c2d4811c43bc19cd5dd41d7 [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
652BUILDDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653SVNVERSION
654ARFLAGS
655AR
656RANLIB
657GNULD
658LINKCC
659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
662BLDLIBRARY
663DLLLIBRARY
664LDLIBRARY
665LIBRARY
666BUILDEXEEXT
667EGREP
668GREP
669CPP
670MAINCC
671CXX
672OBJEXT
673EXEEXT
674ac_ct_CC
675CPPFLAGS
676LDFLAGS
677CFLAGS
678CC
679EXPORT_MACOSX_DEPLOYMENT_TARGET
680CONFIGURE_MACOSX_DEPLOYMENT_TARGET
681EXTRAMACHDEPPATH
682EXTRAPLATDIR
683SGI_ABI
684MACHDEP
685FRAMEWORKINSTALLAPPSPREFIX
686FRAMEWORKUNIXTOOLSPREFIX
687FRAMEWORKALTINSTALLLAST
688FRAMEWORKALTINSTALLFIRST
689FRAMEWORKINSTALLLAST
690FRAMEWORKINSTALLFIRST
691PYTHONFRAMEWORKINSTALLDIR
692PYTHONFRAMEWORKPREFIX
693PYTHONFRAMEWORKDIR
694PYTHONFRAMEWORKIDENTIFIER
695PYTHONFRAMEWORK
696LIPO_32BIT_FLAGS
697ARCH_RUN_32BIT
698UNIVERSALSDK
699CONFIG_ARGS
700SOVERSION
701VERSION
702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721localstatedir
722sharedstatedir
723sysconfdir
724datadir
725datarootdir
726libexecdir
727sbindir
728bindir
729program_transform_name
730prefix
731exec_prefix
732PACKAGE_URL
733PACKAGE_BUGREPORT
734PACKAGE_STRING
735PACKAGE_VERSION
736PACKAGE_TARNAME
737PACKAGE_NAME
738PATH_SEPARATOR
739SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000741ac_user_opts='
742enable_option_checking
743enable_universalsdk
744with_universal_archs
745with_framework_name
746enable_framework
747with_gcc
748with_cxx_main
749with_suffix
750enable_shared
751enable_profiling
752with_pydebug
753enable_toolbox_glue
754with_libs
755with_system_expat
756with_system_ffi
757with_dbmliborder
758with_signal_module
759with_dec_threads
760with_threads
761with_thread
762with_pth
763enable_ipv6
764with_doc_strings
765with_tsc
766with_pymalloc
767with_valgrind
768with_wctype_functions
769with_fpectl
770with_libm
771with_libc
772enable_big_digits
773enable_unicode
774'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775 ac_precious_vars='build_alias
776host_alias
777target_alias
778CC
779CFLAGS
780LDFLAGS
781LIBS
782CPPFLAGS
783CPP'
784
Guido van Rossum627b2d71993-12-24 10:39:16 +0000785
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000787ac_init_help=
788ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000789ac_unrecognized_opts=
790ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791# The variables have the same names as the options, with
792# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000793cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796no_recursion=
797prefix=NONE
798program_prefix=NONE
799program_suffix=NONE
800program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805x_includes=NONE
806x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000807
808# Installation directory options.
809# These are left unexpanded so users can "make install exec_prefix=/foo"
810# and all the variables that are supposed to be based on exec_prefix
811# by default will actually change.
812# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000813# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000814bindir='${exec_prefix}/bin'
815sbindir='${exec_prefix}/sbin'
816libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000817datarootdir='${prefix}/share'
818datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819sysconfdir='${prefix}/etc'
820sharedstatedir='${prefix}/com'
821localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822includedir='${prefix}/include'
823oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000824docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
825infodir='${datarootdir}/info'
826htmldir='${docdir}'
827dvidir='${docdir}'
828pdfdir='${docdir}'
829psdir='${docdir}'
830libdir='${exec_prefix}/lib'
831localedir='${datarootdir}/locale'
832mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000837do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838 # If the previous option needs an argument, assign it.
839 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841 ac_prev=
842 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000843 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000846 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
847 *=) ac_optarg= ;;
848 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000849 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851 # Accept the important Cygnus configure options, so we can diagnose typos.
852
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 case $ac_dashdash$ac_option in
854 --)
855 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857 -bindir | --bindir | --bindi | --bind | --bin | --bi)
858 ac_prev=bindir ;;
859 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000860 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861
862 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000863 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000864 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000865 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867 -cache-file | --cache-file | --cache-fil | --cache-fi \
868 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
869 ac_prev=cache_file ;;
870 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
871 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 cache_file=$ac_optarg ;;
873
874 --config-cache | -C)
875 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881
Martin v. Löwiseba40652007-08-30 20:10:57 +0000882 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
883 | --dataroo | --dataro | --datar)
884 ac_prev=datarootdir ;;
885 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
886 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
887 datarootdir=$ac_optarg ;;
888
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000890 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000892 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000893 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000894 ac_useropt_orig=$ac_useropt
895 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
896 case $ac_user_opts in
897 *"
898"enable_$ac_useropt"
899"*) ;;
900 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
901 ac_unrecognized_sep=', ';;
902 esac
903 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000904
905 -docdir | --docdir | --docdi | --doc | --do)
906 ac_prev=docdir ;;
907 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
908 docdir=$ac_optarg ;;
909
910 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
911 ac_prev=dvidir ;;
912 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
913 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
915 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000916 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000918 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000919 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000920 ac_useropt_orig=$ac_useropt
921 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
922 case $ac_user_opts in
923 *"
924"enable_$ac_useropt"
925"*) ;;
926 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
927 ac_unrecognized_sep=', ';;
928 esac
929 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
932 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
933 | --exec | --exe | --ex)
934 ac_prev=exec_prefix ;;
935 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
936 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
937 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
940 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 # Obsolete; use --with-gas.
942 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 -help | --help | --hel | --he | -h)
945 ac_init_help=long ;;
946 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
947 ac_init_help=recursive ;;
948 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
949 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
Martin v. Löwiseba40652007-08-30 20:10:57 +0000956 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
957 ac_prev=htmldir ;;
958 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
959 | --ht=*)
960 htmldir=$ac_optarg ;;
961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -includedir | --includedir | --includedi | --included | --include \
963 | --includ | --inclu | --incl | --inc)
964 ac_prev=includedir ;;
965 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
966 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
969 -infodir | --infodir | --infodi | --infod | --info | --inf)
970 ac_prev=infodir ;;
971 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973
974 -libdir | --libdir | --libdi | --libd)
975 ac_prev=libdir ;;
976 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000977 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000978
979 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
980 | --libexe | --libex | --libe)
981 ac_prev=libexecdir ;;
982 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
983 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
Martin v. Löwiseba40652007-08-30 20:10:57 +0000986 -localedir | --localedir | --localedi | --localed | --locale)
987 ac_prev=localedir ;;
988 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
989 localedir=$ac_optarg ;;
990
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000992 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993 ac_prev=localstatedir ;;
994 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000995 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997
998 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
999 ac_prev=mandir ;;
1000 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 # Obsolete; use --without-fp.
1005 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 no_create=yes ;;
1010
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001011 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1012 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1013 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1016 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1017 | --oldin | --oldi | --old | --ol | --o)
1018 ac_prev=oldincludedir ;;
1019 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1020 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1021 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1025 ac_prev=prefix ;;
1026 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1030 | --program-pre | --program-pr | --program-p)
1031 ac_prev=program_prefix ;;
1032 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1033 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035
1036 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1037 | --program-suf | --program-su | --program-s)
1038 ac_prev=program_suffix ;;
1039 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1040 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -program-transform-name | --program-transform-name \
1044 | --program-transform-nam | --program-transform-na \
1045 | --program-transform-n | --program-transform- \
1046 | --program-transform | --program-transfor \
1047 | --program-transfo | --program-transf \
1048 | --program-trans | --program-tran \
1049 | --progr-tra | --program-tr | --program-t)
1050 ac_prev=program_transform_name ;;
1051 -program-transform-name=* | --program-transform-name=* \
1052 | --program-transform-nam=* | --program-transform-na=* \
1053 | --program-transform-n=* | --program-transform-=* \
1054 | --program-transform=* | --program-transfor=* \
1055 | --program-transfo=* | --program-transf=* \
1056 | --program-trans=* | --program-tran=* \
1057 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
Martin v. Löwiseba40652007-08-30 20:10:57 +00001060 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1061 ac_prev=pdfdir ;;
1062 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1063 pdfdir=$ac_optarg ;;
1064
1065 -psdir | --psdir | --psdi | --psd | --ps)
1066 ac_prev=psdir ;;
1067 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1068 psdir=$ac_optarg ;;
1069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1071 | -silent | --silent | --silen | --sile | --sil)
1072 silent=yes ;;
1073
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1075 ac_prev=sbindir ;;
1076 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1077 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
1080 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1081 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1082 | --sharedst | --shareds | --shared | --share | --shar \
1083 | --sha | --sh)
1084 ac_prev=sharedstatedir ;;
1085 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1086 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1087 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1088 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001091 -site | --site | --sit)
1092 ac_prev=site ;;
1093 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1097 ac_prev=srcdir ;;
1098 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1102 | --syscon | --sysco | --sysc | --sys | --sy)
1103 ac_prev=sysconfdir ;;
1104 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1105 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001107
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1114 verbose=yes ;;
1115
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 -version | --version | --versio | --versi | --vers | -V)
1117 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001120 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001123 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128"with_$ac_useropt"
1129"*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
1135 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001136 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001137 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001138 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001139 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001140 ac_useropt_orig=$ac_useropt
1141 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1142 case $ac_user_opts in
1143 *"
1144"with_$ac_useropt"
1145"*) ;;
1146 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1147 ac_unrecognized_sep=', ';;
1148 esac
1149 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151 --x)
1152 # Obsolete; use --with-x.
1153 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1156 | --x-incl | --x-inc | --x-in | --x-i)
1157 ac_prev=x_includes ;;
1158 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1159 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1163 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1164 ac_prev=x_libraries ;;
1165 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1166 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001169 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1170Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 ;;
1172
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 *=*)
1174 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1175 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001176 case $ac_envvar in #(
1177 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001178 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001179 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001180 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 export $ac_envvar ;;
1182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001185 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001187 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001188 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 ;;
1190
1191 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001192done
1193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001196 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197fi
1198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001199if test -n "$ac_unrecognized_opts"; then
1200 case $enable_option_checking in
1201 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001202 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001203 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1204 esac
1205fi
1206
1207# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001208for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1209 datadir sysconfdir sharedstatedir localstatedir includedir \
1210 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1211 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001214 # Remove trailing slashes.
1215 case $ac_val in
1216 */ )
1217 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1218 eval $ac_var=\$ac_val;;
1219 esac
1220 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 [\\/$]* | ?:[\\/]* ) continue;;
1223 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001225 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001226done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
Martin v. Löwis11437992002-04-12 09:54:03 +00001228# There might be people who depend on the old broken behavior: `$host'
1229# used to hold the argument of --host etc.
1230# FIXME: To remove some day.
1231build=$build_alias
1232host=$host_alias
1233target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001234
Martin v. Löwis11437992002-04-12 09:54:03 +00001235# FIXME: To remove some day.
1236if test "x$host_alias" != x; then
1237 if test "x$build_alias" = x; then
1238 cross_compiling=maybe
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001239 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1240 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 elif test "x$build_alias" != "x$host_alias"; then
1242 cross_compiling=yes
1243 fi
1244fi
1245
1246ac_tool_prefix=
1247test -n "$host_alias" && ac_tool_prefix=$host_alias-
1248
1249test "$silent" = yes && exec 6>/dev/null
1250
Guido van Rossum627b2d71993-12-24 10:39:16 +00001251
Martin v. Löwiseba40652007-08-30 20:10:57 +00001252ac_pwd=`pwd` && test -n "$ac_pwd" &&
1253ac_ls_di=`ls -di .` &&
1254ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001255 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001256test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001258
1259
Guido van Rossum627b2d71993-12-24 10:39:16 +00001260# Find the source files, if location was not specified.
1261if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001263 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001264 ac_confdir=`$as_dirname -- "$as_myself" ||
1265$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1266 X"$as_myself" : 'X\(//\)[^/]' \| \
1267 X"$as_myself" : 'X\(//\)$' \| \
1268 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1269$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001270 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1271 s//\1/
1272 q
1273 }
1274 /^X\(\/\/\)[^/].*/{
1275 s//\1/
1276 q
1277 }
1278 /^X\(\/\/\)$/{
1279 s//\1/
1280 q
1281 }
1282 /^X\(\/\).*/{
1283 s//\1/
1284 q
1285 }
1286 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001288 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289 srcdir=..
1290 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291else
1292 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294if test ! -r "$srcdir/$ac_unique_file"; then
1295 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001296 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001298ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1299ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001300 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001301 pwd)`
1302# When building in place, set srcdir=.
1303if test "$ac_abs_confdir" = "$ac_pwd"; then
1304 srcdir=.
1305fi
1306# Remove unnecessary trailing slashes from srcdir.
1307# Double slashes in file names in object file debugging info
1308# mess up M-x gdb in Emacs.
1309case $srcdir in
1310*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1311esac
1312for ac_var in $ac_precious_vars; do
1313 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1314 eval ac_env_${ac_var}_value=\$${ac_var}
1315 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1316 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1317done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318
Martin v. Löwis11437992002-04-12 09:54:03 +00001319#
1320# Report the --help message.
1321#
1322if test "$ac_init_help" = "long"; then
1323 # Omit some internal or obsolete options to make the list less imposing.
1324 # This message is too long to be a string in the A/UX 3.1 sh.
1325 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001326\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Usage: $0 [OPTION]... [VAR=VALUE]...
1329
1330To assign environment variables (e.g., CC, CFLAGS...), specify them as
1331VAR=VALUE. See below for descriptions of some of the useful variables.
1332
1333Defaults for the options are specified in brackets.
1334
1335Configuration:
1336 -h, --help display this help and exit
1337 --help=short display options specific to this package
1338 --help=recursive display the short help of all the included packages
1339 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001340 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001341 --cache-file=FILE cache test results in FILE [disabled]
1342 -C, --config-cache alias for \`--cache-file=config.cache'
1343 -n, --no-create do not create output files
1344 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1345
Martin v. Löwis11437992002-04-12 09:54:03 +00001346Installation directories:
1347 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001348 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001349 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001350 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001351
1352By default, \`make install' will install all the files in
1353\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1354an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1355for instance \`--prefix=\$HOME'.
1356
1357For better control, use the options below.
1358
1359Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001360 --bindir=DIR user executables [EPREFIX/bin]
1361 --sbindir=DIR system admin executables [EPREFIX/sbin]
1362 --libexecdir=DIR program executables [EPREFIX/libexec]
1363 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1364 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1365 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1366 --libdir=DIR object code libraries [EPREFIX/lib]
1367 --includedir=DIR C header files [PREFIX/include]
1368 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1369 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1370 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1371 --infodir=DIR info documentation [DATAROOTDIR/info]
1372 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1373 --mandir=DIR man documentation [DATAROOTDIR/man]
1374 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1375 --htmldir=DIR html documentation [DOCDIR]
1376 --dvidir=DIR dvi documentation [DOCDIR]
1377 --pdfdir=DIR pdf documentation [DOCDIR]
1378 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001379_ACEOF
1380
1381 cat <<\_ACEOF
1382_ACEOF
1383fi
1384
1385if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001386 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001387 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001388 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 cat <<\_ACEOF
1390
1391Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001392 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001393 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1394 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001395 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001396 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001397 --enable-framework[=INSTALLDIR]
1398 Build (MacOSX|Darwin) framework
1399 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001400 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001401 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1402 --enable-ipv6 Enable ipv6 (with ipv4) support
1403 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001404 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001405 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001406 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001407 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409Optional Packages:
1410 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1411 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001412 --with-universal-archs=ARCH
1413 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001414 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001415 --with-framework-name=FRAMEWORK
1416 specify an alternate name of the framework built
1417 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001419 --with-cxx-main=<compiler>
1420 compile main() and link python executable with C++
1421 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --with-suffix=.exe set executable suffix
1423 --with-pydebug build with Py_DEBUG defined
1424 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001425 --with-system-expat build pyexpat module using an installed expat
1426 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001427 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001428 --with-dbmliborder=db1:db2:...
1429 order to check db backends for dbm. Valid value is a
1430 colon separated string with the backend names
1431 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --with-signal-module disable/enable signal module
1433 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1434 --with(out)-threads[=DIRECTORY]
1435 disable/enable thread support
1436 --with(out)-thread[=DIRECTORY]
1437 deprecated; use --with(out)-threads
1438 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001440 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001442 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001443 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --with-fpectl enable SIGFPE catching
1445 --with-libm=STRING math library
1446 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448Some influential environment variables:
1449 CC C compiler command
1450 CFLAGS C compiler flags
1451 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1452 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001453 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001454 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001455 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 CPP C preprocessor
1457
1458Use these variables to override the choices made by `configure' or to help
1459it to find libraries and programs with nonstandard names/locations.
1460
Georg Brandl464432d2009-05-20 18:24:08 +00001461Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001463ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001464fi
1465
1466if test "$ac_init_help" = "recursive"; then
1467 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001469 test -d "$ac_dir" ||
1470 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1471 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 ac_builddir=.
1473
Martin v. Löwiseba40652007-08-30 20:10:57 +00001474case "$ac_dir" in
1475.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1476*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001477 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001478 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001479 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480 case $ac_top_builddir_sub in
1481 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1482 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1483 esac ;;
1484esac
1485ac_abs_top_builddir=$ac_pwd
1486ac_abs_builddir=$ac_pwd$ac_dir_suffix
1487# for backward compatibility:
1488ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001491 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001493 ac_top_srcdir=$ac_top_builddir_sub
1494 ac_abs_top_srcdir=$ac_pwd ;;
1495 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497 ac_top_srcdir=$srcdir
1498 ac_abs_top_srcdir=$srcdir ;;
1499 *) # Relative name.
1500 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1501 ac_top_srcdir=$ac_top_build_prefix$srcdir
1502 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001503esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001504ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001505
Martin v. Löwiseba40652007-08-30 20:10:57 +00001506 cd "$ac_dir" || { ac_status=$?; continue; }
1507 # Check for guested configure.
1508 if test -f "$ac_srcdir/configure.gnu"; then
1509 echo &&
1510 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1511 elif test -f "$ac_srcdir/configure"; then
1512 echo &&
1513 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001515 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 fi || ac_status=$?
1517 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 done
1519fi
1520
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001522if $ac_init_version; then
1523 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001524python configure 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +01001525generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001527Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001528This configure script is free software; the Free Software Foundation
1529gives unlimited permission to copy, distribute and modify it.
1530_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001531 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001533
1534## ------------------------ ##
1535## Autoconf initialization. ##
1536## ------------------------ ##
1537
1538# ac_fn_c_try_compile LINENO
1539# --------------------------
1540# Try to compile conftest.$ac_ext, and return whether this succeeded.
1541ac_fn_c_try_compile ()
1542{
1543 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1544 rm -f conftest.$ac_objext
1545 if { { ac_try="$ac_compile"
1546case "(($ac_try" in
1547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1548 *) ac_try_echo=$ac_try;;
1549esac
1550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1551$as_echo "$ac_try_echo"; } >&5
1552 (eval "$ac_compile") 2>conftest.err
1553 ac_status=$?
1554 if test -s conftest.err; then
1555 grep -v '^ *+' conftest.err >conftest.er1
1556 cat conftest.er1 >&5
1557 mv -f conftest.er1 conftest.err
1558 fi
1559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1560 test $ac_status = 0; } && {
1561 test -z "$ac_c_werror_flag" ||
1562 test ! -s conftest.err
1563 } && test -s conftest.$ac_objext; then :
1564 ac_retval=0
1565else
1566 $as_echo "$as_me: failed program was:" >&5
1567sed 's/^/| /' conftest.$ac_ext >&5
1568
1569 ac_retval=1
1570fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001571 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001572 as_fn_set_status $ac_retval
1573
1574} # ac_fn_c_try_compile
1575
1576# ac_fn_c_try_cpp LINENO
1577# ----------------------
1578# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1579ac_fn_c_try_cpp ()
1580{
1581 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1582 if { { ac_try="$ac_cpp conftest.$ac_ext"
1583case "(($ac_try" in
1584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585 *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1590 ac_status=$?
1591 if test -s conftest.err; then
1592 grep -v '^ *+' conftest.err >conftest.er1
1593 cat conftest.er1 >&5
1594 mv -f conftest.er1 conftest.err
1595 fi
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001597 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001598 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1599 test ! -s conftest.err
1600 }; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: failed program was:" >&5
1604sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001609 as_fn_set_status $ac_retval
1610
1611} # ac_fn_c_try_cpp
1612
1613# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1614# -------------------------------------------------------
1615# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1616# the include files in INCLUDES and setting the cache variable VAR
1617# accordingly.
1618ac_fn_c_check_header_mongrel ()
1619{
1620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001621 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1623$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001624if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001625 $as_echo_n "(cached) " >&6
1626fi
1627eval ac_res=\$$3
1628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1629$as_echo "$ac_res" >&6; }
1630else
1631 # Is the header compilable?
1632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1633$as_echo_n "checking $2 usability... " >&6; }
1634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1635/* end confdefs.h. */
1636$4
1637#include <$2>
1638_ACEOF
1639if ac_fn_c_try_compile "$LINENO"; then :
1640 ac_header_compiler=yes
1641else
1642 ac_header_compiler=no
1643fi
1644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1646$as_echo "$ac_header_compiler" >&6; }
1647
1648# Is the header present?
1649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1650$as_echo_n "checking $2 presence... " >&6; }
1651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1652/* end confdefs.h. */
1653#include <$2>
1654_ACEOF
1655if ac_fn_c_try_cpp "$LINENO"; then :
1656 ac_header_preproc=yes
1657else
1658 ac_header_preproc=no
1659fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001660rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1662$as_echo "$ac_header_preproc" >&6; }
1663
1664# So? What about this header?
1665case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1666 yes:no: )
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1668$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1670$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1671 ;;
1672 no:yes:* )
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1674$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1676$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1678$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1679 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1680$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1682$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001683( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001684## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001685## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001686 ) | sed "s/^/$as_me: WARNING: /" >&2
1687 ;;
1688esac
1689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1690$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001691if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001692 $as_echo_n "(cached) " >&6
1693else
1694 eval "$3=\$ac_header_compiler"
1695fi
1696eval ac_res=\$$3
1697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1698$as_echo "$ac_res" >&6; }
1699fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001700 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001701
1702} # ac_fn_c_check_header_mongrel
1703
1704# ac_fn_c_try_run LINENO
1705# ----------------------
1706# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1707# that executables *can* be run.
1708ac_fn_c_try_run ()
1709{
1710 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1711 if { { ac_try="$ac_link"
1712case "(($ac_try" in
1713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1714 *) ac_try_echo=$ac_try;;
1715esac
1716eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1717$as_echo "$ac_try_echo"; } >&5
1718 (eval "$ac_link") 2>&5
1719 ac_status=$?
1720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1721 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1722 { { case "(($ac_try" in
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1725esac
1726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727$as_echo "$ac_try_echo"; } >&5
1728 (eval "$ac_try") 2>&5
1729 ac_status=$?
1730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1731 test $ac_status = 0; }; }; then :
1732 ac_retval=0
1733else
1734 $as_echo "$as_me: program exited with status $ac_status" >&5
1735 $as_echo "$as_me: failed program was:" >&5
1736sed 's/^/| /' conftest.$ac_ext >&5
1737
1738 ac_retval=$ac_status
1739fi
1740 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001742 as_fn_set_status $ac_retval
1743
1744} # ac_fn_c_try_run
1745
1746# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1747# -------------------------------------------------------
1748# Tests whether HEADER exists and can be compiled using the include files in
1749# INCLUDES, setting the cache variable VAR accordingly.
1750ac_fn_c_check_header_compile ()
1751{
1752 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1754$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001755if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001756 $as_echo_n "(cached) " >&6
1757else
1758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1759/* end confdefs.h. */
1760$4
1761#include <$2>
1762_ACEOF
1763if ac_fn_c_try_compile "$LINENO"; then :
1764 eval "$3=yes"
1765else
1766 eval "$3=no"
1767fi
1768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1769fi
1770eval ac_res=\$$3
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1772$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001773 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001774
1775} # ac_fn_c_check_header_compile
1776
1777# ac_fn_c_try_link LINENO
1778# -----------------------
1779# Try to link conftest.$ac_ext, and return whether this succeeded.
1780ac_fn_c_try_link ()
1781{
1782 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783 rm -f conftest.$ac_objext conftest$ac_exeext
1784 if { { ac_try="$ac_link"
1785case "(($ac_try" in
1786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787 *) ac_try_echo=$ac_try;;
1788esac
1789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790$as_echo "$ac_try_echo"; } >&5
1791 (eval "$ac_link") 2>conftest.err
1792 ac_status=$?
1793 if test -s conftest.err; then
1794 grep -v '^ *+' conftest.err >conftest.er1
1795 cat conftest.er1 >&5
1796 mv -f conftest.er1 conftest.err
1797 fi
1798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1799 test $ac_status = 0; } && {
1800 test -z "$ac_c_werror_flag" ||
1801 test ! -s conftest.err
1802 } && test -s conftest$ac_exeext && {
1803 test "$cross_compiling" = yes ||
1804 $as_test_x conftest$ac_exeext
1805 }; then :
1806 ac_retval=0
1807else
1808 $as_echo "$as_me: failed program was:" >&5
1809sed 's/^/| /' conftest.$ac_ext >&5
1810
1811 ac_retval=1
1812fi
1813 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1814 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1815 # interfere with the next link command; also delete a directory that is
1816 # left behind by Apple's compiler. We do this before executing the actions.
1817 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001818 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001819 as_fn_set_status $ac_retval
1820
1821} # ac_fn_c_try_link
1822
1823# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1824# -------------------------------------------
1825# Tests whether TYPE exists after having included INCLUDES, setting cache
1826# variable VAR accordingly.
1827ac_fn_c_check_type ()
1828{
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1831$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001832if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001833 $as_echo_n "(cached) " >&6
1834else
1835 eval "$3=no"
1836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1837/* end confdefs.h. */
1838$4
1839int
1840main ()
1841{
1842if (sizeof ($2))
1843 return 0;
1844 ;
1845 return 0;
1846}
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1850/* end confdefs.h. */
1851$4
1852int
1853main ()
1854{
1855if (sizeof (($2)))
1856 return 0;
1857 ;
1858 return 0;
1859}
1860_ACEOF
1861if ac_fn_c_try_compile "$LINENO"; then :
1862
1863else
1864 eval "$3=yes"
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1869fi
1870eval ac_res=\$$3
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1872$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001873 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001874
1875} # ac_fn_c_check_type
1876
1877# ac_fn_c_find_uintX_t LINENO BITS VAR
1878# ------------------------------------
1879# Finds an unsigned integer type with width BITS, setting cache variable VAR
1880# accordingly.
1881ac_fn_c_find_uintX_t ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1885$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001886if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001887 $as_echo_n "(cached) " >&6
1888else
1889 eval "$3=no"
1890 # Order is important - never check a type that is potentially smaller
1891 # than half of the expected target width.
1892 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1893 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1895/* end confdefs.h. */
1896$ac_includes_default
1897int
1898main ()
1899{
1900static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
1901test_array [0] = 0
1902
1903 ;
1904 return 0;
1905}
1906_ACEOF
1907if ac_fn_c_try_compile "$LINENO"; then :
1908 case $ac_type in #(
1909 uint$2_t) :
1910 eval "$3=yes" ;; #(
1911 *) :
1912 eval "$3=\$ac_type" ;;
1913esac
1914fi
1915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001916 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001917
1918else
1919 break
1920fi
1921 done
1922fi
1923eval ac_res=\$$3
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1925$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001926 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001927
1928} # ac_fn_c_find_uintX_t
1929
1930# ac_fn_c_find_intX_t LINENO BITS VAR
1931# -----------------------------------
1932# Finds a signed integer type with width BITS, setting cache variable VAR
1933# accordingly.
1934ac_fn_c_find_intX_t ()
1935{
1936 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1938$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001939if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001940 $as_echo_n "(cached) " >&6
1941else
1942 eval "$3=no"
1943 # Order is important - never check a type that is potentially smaller
1944 # than half of the expected target width.
1945 for ac_type in int$2_t 'int' 'long int' \
1946 'long long int' 'short int' 'signed char'; do
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001950 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001951int
1952main ()
1953{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001954static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001955test_array [0] = 0
1956
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001965 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001966int
1967main ()
1968{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001969static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001970 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
1971test_array [0] = 0
1972
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_compile "$LINENO"; then :
1978
1979else
1980 case $ac_type in #(
1981 int$2_t) :
1982 eval "$3=yes" ;; #(
1983 *) :
1984 eval "$3=\$ac_type" ;;
1985esac
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1988fi
1989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001990 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001991
1992else
1993 break
1994fi
1995 done
1996fi
1997eval ac_res=\$$3
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1999$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002001
2002} # ac_fn_c_find_intX_t
2003
2004# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2005# --------------------------------------------
2006# Tries to find the compile-time value of EXPR in a program that includes
2007# INCLUDES, setting VAR accordingly. Returns whether the value could be
2008# computed
2009ac_fn_c_compute_int ()
2010{
2011 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012 if test "$cross_compiling" = yes; then
2013 # Depending upon the size, compute the lo and hi bounds.
2014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) >= 0)];
2021test_array [0] = 0
2022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_lo=0 ac_mid=0
2029 while :; do
2030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2037test_array [0] = 0
2038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_hi=$ac_mid; break
2045else
2046 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2047 if test $ac_lo -le $ac_mid; then
2048 ac_lo= ac_hi=
2049 break
2050 fi
2051 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054 done
2055else
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) < 0)];
2063test_array [0] = 0
2064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_hi=-1 ac_mid=-1
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2079test_array [0] = 0
2080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_lo=$ac_mid; break
2087else
2088 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2089 if test $ac_mid -le $ac_hi; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 ac_lo= ac_hi=
2099fi
2100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103# Binary search between lo and hi bounds.
2104while test "x$ac_lo" != "x$ac_hi"; do
2105 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2113test_array [0] = 0
2114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid
2121else
2122 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125done
2126case $ac_lo in #((
2127?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2128'') ac_retval=1 ;;
2129esac
2130 else
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134static long int longval () { return $2; }
2135static unsigned long int ulongval () { return $2; }
2136#include <stdio.h>
2137#include <stdlib.h>
2138int
2139main ()
2140{
2141
2142 FILE *f = fopen ("conftest.val", "w");
2143 if (! f)
2144 return 1;
2145 if (($2) < 0)
2146 {
2147 long int i = longval ();
2148 if (i != ($2))
2149 return 1;
2150 fprintf (f, "%ld", i);
2151 }
2152 else
2153 {
2154 unsigned long int i = ulongval ();
2155 if (i != ($2))
2156 return 1;
2157 fprintf (f, "%lu", i);
2158 }
2159 /* Do not output a trailing newline, as this causes \r\n confusion
2160 on some platforms. */
2161 return ferror (f) || fclose (f) != 0;
2162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_run "$LINENO"; then :
2168 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2169else
2170 ac_retval=1
2171fi
2172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2173 conftest.$ac_objext conftest.beam conftest.$ac_ext
2174rm -f conftest.val
2175
2176 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002177 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002178 as_fn_set_status $ac_retval
2179
2180} # ac_fn_c_compute_int
2181
2182# ac_fn_c_check_func LINENO FUNC VAR
2183# ----------------------------------
2184# Tests whether FUNC exists, setting the cache variable VAR accordingly
2185ac_fn_c_check_func ()
2186{
2187 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2189$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002190if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002191 $as_echo_n "(cached) " >&6
2192else
2193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194/* end confdefs.h. */
2195/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2196 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2197#define $2 innocuous_$2
2198
2199/* System header to define __stub macros and hopefully few prototypes,
2200 which can conflict with char $2 (); below.
2201 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2202 <limits.h> exists even on freestanding compilers. */
2203
2204#ifdef __STDC__
2205# include <limits.h>
2206#else
2207# include <assert.h>
2208#endif
2209
2210#undef $2
2211
2212/* Override any GCC internal prototype to avoid an error.
2213 Use char because int might match the return type of a GCC
2214 builtin and then its argument prototype would still apply. */
2215#ifdef __cplusplus
2216extern "C"
2217#endif
2218char $2 ();
2219/* The GNU C library defines this for functions which it implements
2220 to always fail with ENOSYS. Some functions are actually named
2221 something starting with __ and the normal name is an alias. */
2222#if defined __stub_$2 || defined __stub___$2
2223choke me
2224#endif
2225
2226int
2227main ()
2228{
2229return $2 ();
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_link "$LINENO"; then :
2235 eval "$3=yes"
2236else
2237 eval "$3=no"
2238fi
2239rm -f core conftest.err conftest.$ac_objext \
2240 conftest$ac_exeext conftest.$ac_ext
2241fi
2242eval ac_res=\$$3
2243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002246
2247} # ac_fn_c_check_func
2248
2249# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2250# ----------------------------------------------------
2251# Tries to find if the field MEMBER exists in type AGGR, after including
2252# INCLUDES, setting cache variable VAR accordingly.
2253ac_fn_c_check_member ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2257$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002258if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263$5
2264int
2265main ()
2266{
2267static $2 ac_aggr;
2268if (ac_aggr.$3)
2269return 0;
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_compile "$LINENO"; then :
2275 eval "$4=yes"
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279$5
2280int
2281main ()
2282{
2283static $2 ac_aggr;
2284if (sizeof ac_aggr.$3)
2285return 0;
2286 ;
2287 return 0;
2288}
2289_ACEOF
2290if ac_fn_c_try_compile "$LINENO"; then :
2291 eval "$4=yes"
2292else
2293 eval "$4=no"
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296fi
2297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298fi
2299eval ac_res=\$$4
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2301$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002302 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002303
2304} # ac_fn_c_check_member
2305
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002306# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2307# ---------------------------------------------
2308# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2309# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002310ac_fn_c_check_decl ()
2311{
2312 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002313 as_decl_name=`echo $2|sed 's/ *(.*//'`
2314 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2316$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002317if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002318 $as_echo_n "(cached) " >&6
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$4
2323int
2324main ()
2325{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002326#ifndef $as_decl_name
2327#ifdef __cplusplus
2328 (void) $as_decl_use;
2329#else
2330 (void) $as_decl_name;
2331#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002332#endif
2333
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$3=yes"
2340else
2341 eval "$3=no"
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345eval ac_res=\$$3
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002349
2350} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002351cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002352This file contains any messages produced by compilers while
2353running configure, to aid debugging if configure makes a mistake.
2354
Martin v. Löwis174440b2008-10-03 08:59:41 +00002355It was created by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +01002356generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358 $ $0 $@
2359
2360_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002362{
2363cat <<_ASUNAME
2364## --------- ##
2365## Platform. ##
2366## --------- ##
2367
2368hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2369uname -m = `(uname -m) 2>/dev/null || echo unknown`
2370uname -r = `(uname -r) 2>/dev/null || echo unknown`
2371uname -s = `(uname -s) 2>/dev/null || echo unknown`
2372uname -v = `(uname -v) 2>/dev/null || echo unknown`
2373
2374/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2375/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2376
2377/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2378/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2379/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002380/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002381/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2382/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2383/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2384
2385_ASUNAME
2386
2387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2388for as_dir in $PATH
2389do
2390 IFS=$as_save_IFS
2391 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002392 $as_echo "PATH: $as_dir"
2393 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396} >&5
2397
2398cat >&5 <<_ACEOF
2399
2400
2401## ----------- ##
2402## Core tests. ##
2403## ----------- ##
2404
2405_ACEOF
2406
2407
2408# Keep a trace of the command line.
2409# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002410# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002411# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002412# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002413ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002414ac_configure_args0=
2415ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002416ac_must_keep_next=false
2417for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002418do
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 for ac_arg
2420 do
2421 case $ac_arg in
2422 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2423 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2424 | -silent | --silent | --silen | --sile | --sil)
2425 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002427 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002428 esac
2429 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002430 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002432 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002434 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002436 case $ac_arg in
2437 *=* | --config-cache | -C | -disable-* | --disable-* \
2438 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2439 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2440 | -with-* | --with-* | -without-* | --without-* | --x)
2441 case "$ac_configure_args0 " in
2442 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2443 esac
2444 ;;
2445 -* ) ac_must_keep_next=true ;;
2446 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002448 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 ;;
2450 esac
2451 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002452done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002453{ ac_configure_args0=; unset ac_configure_args0;}
2454{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002455
2456# When interrupted or exit'd, cleanup temporary files, and complete
2457# config.log. We remove comments because anyway the quotes in there
2458# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459# WARNING: Use '\'' to represent an apostrophe within the trap.
2460# 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 +00002461trap 'exit_status=$?
2462 # Save into config.log some information that might help in debugging.
2463 {
2464 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002465
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002466 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002467## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002468## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 echo
2470 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002471(
2472 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2473 eval ac_val=\$$ac_var
2474 case $ac_val in #(
2475 *${as_nl}*)
2476 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002477 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2478$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002479 esac
2480 case $ac_var in #(
2481 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002482 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2483 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484 esac ;;
2485 esac
2486 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002488 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2489 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002491 "s/'\''/'\''\\\\'\'''\''/g;
2492 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2493 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002494 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002495 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002496 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497 esac |
2498 sort
2499)
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002501
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002502 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002503## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002504## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002505 echo
2506 for ac_var in $ac_subst_vars
2507 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 eval ac_val=\$$ac_var
2509 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002510 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002512 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002513 done | sort
2514 echo
2515
2516 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002517 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002519## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 echo
2521 for ac_var in $ac_subst_files
2522 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002523 eval ac_val=\$$ac_var
2524 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002525 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 done | sort
2529 echo
2530 fi
2531
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002533 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002534## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002535## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
2539 fi
2540 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002541 $as_echo "$as_me: caught signal $ac_signal"
2542 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002544 rm -f core *.core core.conftest.* &&
2545 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002548for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002549 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002550done
2551ac_signal=0
2552
2553# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002556$as_echo "/* confdefs.h */" > confdefs.h
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558# Predefined preprocessor variables.
2559
2560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_NAME "$PACKAGE_NAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_VERSION "$PACKAGE_VERSION"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_STRING "$PACKAGE_STRING"
2574_ACEOF
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2578_ACEOF
2579
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_URL "$PACKAGE_URL"
2582_ACEOF
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584
2585# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002586# Prefer an explicitly selected file to automatically selected ones.
2587ac_site_file1=NONE
2588ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002590 # We do not want a PATH search for config.site.
2591 case $CONFIG_SITE in #((
2592 -*) ac_site_file1=./$CONFIG_SITE;;
2593 */*) ac_site_file1=$CONFIG_SITE;;
2594 *) ac_site_file1=./$CONFIG_SITE;;
2595 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002597 ac_site_file1=$prefix/share/config.site
2598 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002600 ac_site_file1=$ac_default_prefix/share/config.site
2601 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002603for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002605 test "x$ac_site_file" = xNONE && continue
2606 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2608$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002610 . "$ac_site_file" \
2611 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2613as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002614See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615 fi
2616done
2617
2618if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 # Some versions of bash will fail to source /dev/null (special files
2620 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2621 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2622 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2623$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2626 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 esac
2628 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2631$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 >$cache_file
2633fi
2634
2635# Check that the precious variables saved in the cache have kept the same
2636# value.
2637ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2640 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002641 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2642 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 case $ac_old_set,$ac_new_set in
2644 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2646$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 +00002647 ac_cache_corrupted=: ;;
2648 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2650$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 ac_cache_corrupted=: ;;
2652 ,);;
2653 *)
2654 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 # differences in whitespace do not lead to failure.
2656 ac_old_val_w=`echo x $ac_old_val`
2657 ac_new_val_w=`echo x $ac_new_val`
2658 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2660$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2661 ac_cache_corrupted=:
2662 else
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2664$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2665 eval $ac_var=\$ac_old_val
2666 fi
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2668$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2669 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2670$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 fi;;
2672 esac
2673 # Pass precious variables to config.status.
2674 if test "$ac_new_set" = set; then
2675 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002676 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 *) ac_arg=$ac_var=$ac_new_val ;;
2678 esac
2679 case " $ac_configure_args " in
2680 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002681 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002682 esac
2683 fi
2684done
2685if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002686 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2689$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002690 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692## -------------------- ##
2693## Main body of script. ##
2694## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695
Guido van Rossum7f43da71994-08-01 12:15:30 +00002696ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2700ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002701
Guido van Rossum627b2d71993-12-24 10:39:16 +00002702
Michael W. Hudson54241132001-12-07 15:38:26 +00002703
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002705
2706
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
Georg Brandlbcd64a32009-03-31 21:45:18 +00002708if test "$prefix" != "/"; then
2709 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2710fi
2711
2712
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
2714
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002715# We don't use PACKAGE_ variables, and they cause conflicts
2716# with other autoconf-based packages that include Python.h
2717grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2718rm confdefs.h
2719mv confdefs.h.new confdefs.h
2720
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002721
Martin v. Löwis174440b2008-10-03 08:59:41 +00002722VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002723
Martin v. Löwis1142de32002-03-29 16:28:31 +00002724
2725SOVERSION=1.0
2726
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002727# The later defininition of _XOPEN_SOURCE disables certain features
2728# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2729
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002730$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002731
2732
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002733# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2734# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2735# them.
2736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002738
2739
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002740# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2741# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2742# them.
2743
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002744$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002745
2746
Martin v. Löwisd6320502004-08-12 13:45:08 +00002747# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2748# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002751
2752
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002753# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2754# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2755# them.
2756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002757$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002758
2759
2760
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002761define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002762
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002763# Arguments passed to configure.
2764
2765CONFIG_ARGS="$ac_configure_args"
2766
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2768$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002769# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002770if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002772 case $enableval in
2773 yes)
2774 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002775 if test ! -d "${enableval}"
2776 then
2777 enableval=/
2778 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002779 ;;
2780 esac
2781 case $enableval in
2782 no)
2783 UNIVERSALSDK=
2784 enable_universalsdk=
2785 ;;
2786 *)
2787 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002788 if test ! -d "${UNIVERSALSDK}"
2789 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002790 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002791 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002792 ;;
2793 esac
2794
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002795
Ronald Oussoren988117f2006-04-29 11:31:35 +00002796else
2797
2798 UNIVERSALSDK=
2799 enable_universalsdk=
2800
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002802
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002803if test -n "${UNIVERSALSDK}"
2804then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2806$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002807else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2809$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002810fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002811
Martin v. Löwiseba40652007-08-30 20:10:57 +00002812
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002813
2814
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002815UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002816
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
2818$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002819
2820# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002821if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002822 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
2824$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002825 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002826 if test "${enable_universalsdk}" ; then
2827 :
2828 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002829 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002830 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002831
2832else
2833
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
2835$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002836
2837fi
2838
2839
2840
2841
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002842
2843# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002844if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002845 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002846 if test "${enable_framework}"; then
2847 :
2848 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002849 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00002850 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002851 PYTHONFRAMEWORK=${withval}
2852 PYTHONFRAMEWORKDIR=${withval}.framework
2853 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2854
2855else
2856
2857 PYTHONFRAMEWORK=Python
2858 PYTHONFRAMEWORKDIR=Python.framework
2859 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2860
2861fi
2862
Martin v. Löwiseba40652007-08-30 20:10:57 +00002863# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002864if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002865 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002866 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002868 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002869 esac
2870 case $enableval in
2871 no)
2872 PYTHONFRAMEWORK=
2873 PYTHONFRAMEWORKDIR=no-framework
2874 PYTHONFRAMEWORKPREFIX=
2875 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002876 FRAMEWORKINSTALLFIRST=
2877 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002878 FRAMEWORKALTINSTALLFIRST=
2879 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002880 if test "x${prefix}" = "xNONE"; then
2881 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2882 else
2883 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2884 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002885 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002886 ;;
2887 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002888 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00002889 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002890 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002891 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00002892 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
2893 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002894 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002895
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002896 if test "x${prefix}" = "xNONE" ; then
2897 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002898
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002899 else
2900 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2901 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002902
2903 case "${enableval}" in
2904 /System*)
2905 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2906 if test "${prefix}" = "NONE" ; then
2907 # See below
2908 FRAMEWORKUNIXTOOLSPREFIX="/usr"
2909 fi
2910 ;;
2911
2912 /Library*)
2913 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2914 ;;
2915
2916 */Library/Frameworks)
2917 MDIR="`dirname "${enableval}"`"
2918 MDIR="`dirname "${MDIR}"`"
2919 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
2920
2921 if test "${prefix}" = "NONE"; then
2922 # User hasn't specified the
2923 # --prefix option, but wants to install
2924 # the framework in a non-default location,
2925 # ensure that the compatibility links get
2926 # installed relative to that prefix as well
2927 # instead of in /usr/local.
2928 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
2929 fi
2930 ;;
2931
2932 *)
2933 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
2934 ;;
2935 esac
2936
Jack Jansen127e56e2001-09-11 14:41:54 +00002937 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002938
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002939 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002940 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002941 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002942
Martin v. Löwiseba40652007-08-30 20:10:57 +00002943 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002944
Martin v. Löwiseba40652007-08-30 20:10:57 +00002945 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002946
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002947 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2948
2949 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2950
Jack Jansene578a632001-08-15 01:27:14 +00002951 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
Guido van Rossum563e7081996-09-10 18:20:48 +00002953else
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
Jack Jansene578a632001-08-15 01:27:14 +00002955 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002956 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002957 PYTHONFRAMEWORKPREFIX=
2958 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002959 FRAMEWORKINSTALLFIRST=
2960 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002961 FRAMEWORKALTINSTALLFIRST=
2962 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002963 if test "x${prefix}" = "xNONE" ; then
2964 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2965 else
2966 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2967 fi
Jack Jansene578a632001-08-15 01:27:14 +00002968 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002969
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002970
Martin v. Löwiseba40652007-08-30 20:10:57 +00002971fi
2972
Michael W. Hudson54241132001-12-07 15:38:26 +00002973
2974
2975
2976
Jack Jansene578a632001-08-15 01:27:14 +00002977
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002978
2979
Ronald Oussoren5b787322006-06-06 19:50:24 +00002980
2981
2982
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002983
Ronald Oussoren01d149f2010-04-30 11:20:14 +00002984
Jack Jansene578a632001-08-15 01:27:14 +00002985##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00002986## AS_HELP_STRING([--with-dyld],
2987## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00002988##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002989# Set name for machine-dependent library files
2990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
2992$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002993if test -z "$MACHDEP"
2994then
Guido van Rossum563e7081996-09-10 18:20:48 +00002995 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00002996 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002997 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002998 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002999 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003000 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003001 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00003002 ac_md_system=`echo $ac_sys_system |
3003 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3004 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00003005 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00003006 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003007
Guido van Rossum07397971997-04-29 21:49:50 +00003008 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003009 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003010 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003011 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003012 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003013 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003014 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003015 esac
3016fi
Guido van Rossum91922671997-10-09 20:24:13 +00003017
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003018# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3019# disable features if it is defined, without any means to access these
3020# features as extensions. For these systems, we skip the definition of
3021# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3022# some feature, make sure there is no alternative way to access this
3023# feature. Also, when using wildcards, make sure you have verified the
3024# need for not defining _XOPEN_SOURCE on all systems matching the
3025# wildcard, and that the wildcard does not include future systems
3026# (which may remove their limitations).
3027case $ac_sys_system/$ac_sys_release in
3028 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3029 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003030 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003031 # In addition, Stefan Krah confirms that issue #1244610 exists through
3032 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003033 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003034 define_xopen_source=no
3035 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3036 # also defined. This can be overridden by defining _BSD_SOURCE
3037 # As this has a different meaning on Linux, only define it on OpenBSD
3038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003039$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003040
3041 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003042 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003043 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3044 # also defined. This can be overridden by defining _BSD_SOURCE
3045 # As this has a different meaning on Linux, only define it on OpenBSD
3046
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003047$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003048
3049 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003050 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3051 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3052 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003053 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 +00003054 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003055 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3056 # request to enable features supported by the standard as a request
3057 # to disable features not supported by the standard. The best way
3058 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3059 # entirely and define __EXTENSIONS__ instead.
3060 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003061 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003062 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3063 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003064 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003065 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003066 define_xopen_source=no;;
3067 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003068 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003069 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003070 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003071 # On FreeBSD 4, the math functions C89 does not cover are never defined
3072 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3073 FreeBSD/4.*)
3074 define_xopen_source=no;;
3075 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3076 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3077 # identifies itself as Darwin/7.*
3078 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3079 # disables platform specific features beyond repair.
3080 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3081 # has no effect, don't bother defining them
3082 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003083 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003084 Darwin/1[0-9].*)
3085 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003086 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3087 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3088 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003089 AIX/4)
3090 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003091 AIX/5)
3092 if test `uname -r` -eq 1; then
3093 define_xopen_source=no
3094 fi
3095 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003096 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3097 # defining NI_NUMERICHOST.
3098 QNX/6.3.2)
3099 define_xopen_source=no
3100 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003101
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003102esac
3103
3104if test $define_xopen_source = yes
3105then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003106
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003107$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003108
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003109
3110 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3111 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3112 # several APIs are not declared. Since this is also needed in some
3113 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003114
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003115$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003116
3117
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003118
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003119$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003120
3121
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003122fi
3123
Guido van Rossum91922671997-10-09 20:24:13 +00003124#
3125# SGI compilers allow the specification of the both the ABI and the
3126# ISA on the command line. Depending on the values of these switches,
3127# different and often incompatable code will be generated.
3128#
3129# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3130# thus supply support for various ABI/ISA combinations. The MACHDEP
3131# variable is also adjusted.
3132#
3133
3134if test ! -z "$SGI_ABI"
3135then
3136 CC="cc $SGI_ABI"
3137 LDFLAGS="$SGI_ABI $LDFLAGS"
3138 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3141$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003142
Jack Jansen83f898c2002-12-30 22:23:40 +00003143# And add extra plat-mac for darwin
3144
Jack Jansen7b59b422003-03-17 15:44:10 +00003145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3147$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003148if test -z "$EXTRAPLATDIR"
3149then
3150 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003151 darwin)
3152 EXTRAPLATDIR="\$(PLATMACDIRS)"
3153 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3154 ;;
3155 *)
3156 EXTRAPLATDIR=""
3157 EXTRAMACHDEPPATH=""
3158 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003159 esac
3160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3162$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003163
Jack Jansen6b08a402004-06-03 12:41:45 +00003164# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3165# it may influence the way we can build extensions, so distutils
3166# needs to check it
3167
Ronald Oussoren988117f2006-04-29 11:31:35 +00003168
Jack Jansen6b08a402004-06-03 12:41:45 +00003169CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003170EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5
3173$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003174ac_sys_machine=`uname -m`
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5
3176$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00003177
Guido van Rossum627b2d71993-12-24 10:39:16 +00003178# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003179
3180# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3181# for debug/optimization stuff. BASECFLAGS is for flags that are required
3182# just to get things to compile and link. Users are free to override OPT
3183# when running configure or make. The build should not break if they do.
3184# BASECFLAGS should generally not be messed with, however.
3185
3186# XXX shouldn't some/most/all of this code be merged with the stuff later
3187# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3189$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003190
Martin v. Löwiseba40652007-08-30 20:10:57 +00003191# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003192if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003194 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003195 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003196 without_gcc=yes;;
3197 yes) CC=gcc
3198 without_gcc=no;;
3199 *) CC=$withval
3200 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003201 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003202else
Martin v. Löwis11437992002-04-12 09:54:03 +00003203
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003204 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003205 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003206 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003207 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003208 case $BE_HOST_CPU in
3209 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003210 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003211 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003212 BASECFLAGS="$BASECFLAGS -export pragma"
3213 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003214 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003215 ;;
3216 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003217 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003218 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003219 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003220 ;;
3221 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003222 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003223 ;;
3224 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003225 AR="\$(srcdir)/Modules/ar_beos"
3226 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003227 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003228 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003229 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230fi
3231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3233$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
Guido van Rossum8b131c51995-03-09 14:10:13 +00003235# If the user switches compilers, we can't believe the cache
3236if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3237then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003238 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003239(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003240fi
3241
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003242# If the user set CFLAGS, use this instead of the automatically
3243# determined setting
3244preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003245ac_ext=c
3246ac_cpp='$CPP $CPPFLAGS'
3247ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3248ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3249ac_compiler_gnu=$ac_cv_c_compiler_gnu
3250if test -n "$ac_tool_prefix"; then
3251 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3252set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3254$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003255if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003256 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003257else
3258 if test -n "$CC"; then
3259 ac_cv_prog_CC="$CC" # Let the user override the test.
3260else
Martin v. Löwis11437992002-04-12 09:54:03 +00003261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3262for as_dir in $PATH
3263do
3264 IFS=$as_save_IFS
3265 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003266 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003267 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 +00003268 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003269 $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 +00003270 break 2
3271 fi
3272done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003273 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003274IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003275
Jack Jansendd19cf82001-12-06 22:36:17 +00003276fi
3277fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003278CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003279if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3281$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3284$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003285fi
3286
Martin v. Löwiseba40652007-08-30 20:10:57 +00003287
Martin v. Löwis11437992002-04-12 09:54:03 +00003288fi
3289if test -z "$ac_cv_prog_CC"; then
3290 ac_ct_CC=$CC
3291 # Extract the first word of "gcc", so it can be a program name with args.
3292set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3294$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003295if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003296 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003297else
3298 if test -n "$ac_ct_CC"; then
3299 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3300else
3301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302for as_dir in $PATH
3303do
3304 IFS=$as_save_IFS
3305 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003306 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003307 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 +00003308 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003309 $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 +00003310 break 2
3311 fi
3312done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003313 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003314IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003315
3316fi
3317fi
3318ac_ct_CC=$ac_cv_prog_ac_ct_CC
3319if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3321$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3324$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003325fi
3326
Martin v. Löwiseba40652007-08-30 20:10:57 +00003327 if test "x$ac_ct_CC" = x; then
3328 CC=""
3329 else
3330 case $cross_compiling:$ac_tool_warned in
3331yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003332{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3333$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003334ac_tool_warned=yes ;;
3335esac
3336 CC=$ac_ct_CC
3337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003338else
3339 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003340fi
3341
Jack Jansendd19cf82001-12-06 22:36:17 +00003342if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 if test -n "$ac_tool_prefix"; then
3344 # 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 +00003345set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3347$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003348if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003349 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003350else
3351 if test -n "$CC"; then
3352 ac_cv_prog_CC="$CC" # Let the user override the test.
3353else
Martin v. Löwis11437992002-04-12 09:54:03 +00003354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3355for as_dir in $PATH
3356do
3357 IFS=$as_save_IFS
3358 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003360 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 +00003361 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003362 $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 +00003363 break 2
3364 fi
3365done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003366 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003367IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003368
3369fi
3370fi
3371CC=$ac_cv_prog_CC
3372if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3374$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3377$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003378fi
3379
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003382fi
3383if test -z "$CC"; then
3384 # Extract the first word of "cc", so it can be a program name with args.
3385set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3387$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003388if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003389 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003390else
3391 if test -n "$CC"; then
3392 ac_cv_prog_CC="$CC" # Let the user override the test.
3393else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003394 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3396for as_dir in $PATH
3397do
3398 IFS=$as_save_IFS
3399 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003401 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 +00003402 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3403 ac_prog_rejected=yes
3404 continue
3405 fi
3406 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003407 $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 +00003408 break 2
3409 fi
3410done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003411 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003412IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003413
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003414if test $ac_prog_rejected = yes; then
3415 # We found a bogon in the path, so make sure we never use it.
3416 set dummy $ac_cv_prog_CC
3417 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003418 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003419 # We chose a different compiler from the bogus one.
3420 # However, it has the same basename, so the bogon will be chosen
3421 # first if we set CC to just the basename; use the full file name.
3422 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003423 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424 fi
3425fi
3426fi
3427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003428CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003429if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3431$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3434$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003435fi
3436
Martin v. Löwiseba40652007-08-30 20:10:57 +00003437
Martin v. Löwis11437992002-04-12 09:54:03 +00003438fi
3439if test -z "$CC"; then
3440 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003441 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003442 do
3443 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3444set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3446$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003447if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003448 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003449else
3450 if test -n "$CC"; then
3451 ac_cv_prog_CC="$CC" # Let the user override the test.
3452else
Martin v. Löwis11437992002-04-12 09:54:03 +00003453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3454for as_dir in $PATH
3455do
3456 IFS=$as_save_IFS
3457 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003458 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003459 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 +00003460 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461 $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 +00003462 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003463 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003464done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003465 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003466IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003467
3468fi
3469fi
3470CC=$ac_cv_prog_CC
3471if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3473$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3476$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003477fi
3478
Martin v. Löwiseba40652007-08-30 20:10:57 +00003479
Martin v. Löwis11437992002-04-12 09:54:03 +00003480 test -n "$CC" && break
3481 done
3482fi
3483if test -z "$CC"; then
3484 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003486do
3487 # Extract the first word of "$ac_prog", so it can be a program name with args.
3488set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3490$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003491if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003492 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003493else
3494 if test -n "$ac_ct_CC"; then
3495 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3496else
3497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498for as_dir in $PATH
3499do
3500 IFS=$as_save_IFS
3501 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003502 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503 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 +00003504 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003505 $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 +00003506 break 2
3507 fi
3508done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003509 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003510IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003511
Martin v. Löwis11437992002-04-12 09:54:03 +00003512fi
3513fi
3514ac_ct_CC=$ac_cv_prog_ac_ct_CC
3515if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3517$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3520$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003521fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003522
Martin v. Löwiseba40652007-08-30 20:10:57 +00003523
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 test -n "$ac_ct_CC" && break
3525done
Michael W. Hudson54241132001-12-07 15:38:26 +00003526
Martin v. Löwiseba40652007-08-30 20:10:57 +00003527 if test "x$ac_ct_CC" = x; then
3528 CC=""
3529 else
3530 case $cross_compiling:$ac_tool_warned in
3531yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534ac_tool_warned=yes ;;
3535esac
3536 CC=$ac_ct_CC
3537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003538fi
3539
3540fi
3541
3542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003543test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003545as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003546See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003547
3548# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003549$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3550set X $ac_compile
3551ac_compiler=$2
3552for ac_option in --version -v -V -qversion; do
3553 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003554case "(($ac_try" in
3555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556 *) ac_try_echo=$ac_try;;
3557esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3559$as_echo "$ac_try_echo"; } >&5
3560 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003562 if test -s conftest.err; then
3563 sed '10a\
3564... rest of stderr output deleted ...
3565 10q' conftest.err >conftest.er1
3566 cat conftest.er1 >&5
3567 fi
3568 rm -f conftest.er1 conftest.err
3569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3570 test $ac_status = 0; }
3571done
Martin v. Löwis11437992002-04-12 09:54:03 +00003572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003574/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576int
3577main ()
3578{
3579
3580 ;
3581 return 0;
3582}
3583_ACEOF
3584ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003585ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003586# Try to create an executable without -o first, disregard a.out.
3587# It will help us diagnose broken compilers, and finding out an intuition
3588# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3590$as_echo_n "checking whether the C compiler works... " >&6; }
3591ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3592
3593# The possible output files:
3594ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3595
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596ac_rmfiles=
3597for ac_file in $ac_files
3598do
3599 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003601 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3602 esac
3603done
3604rm -f $ac_rmfiles
3605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003606if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607case "(($ac_try" in
3608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3609 *) ac_try_echo=$ac_try;;
3610esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3612$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003613 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3616 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003617 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3618# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3619# in a Makefile. We should not override ac_cv_exeext if it was cached,
3620# so that the user can short-circuit this test for compilers unknown to
3621# Autoconf.
3622for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003623do
3624 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003626 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003627 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003628 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003629 # We found the default executable, but exeext='' is most
3630 # certainly right.
3631 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003632 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634 then :; else
3635 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3636 fi
3637 # We set ac_cv_exeext here because the later test for it is not
3638 # safe: cross compilers may not add the suffix if given an `-o'
3639 # argument, so we may need to know it at that point already.
3640 # Even if this section looks crufty: it has the advantage of
3641 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003643 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003644 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 esac
3646done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647test "$ac_cv_exeext" = no && ac_cv_exeext=
3648
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003649else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003650 ac_file=''
3651fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652if test -z "$ac_file"; then :
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
3655$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003656sed 's/^/| /' conftest.$ac_ext >&5
3657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003660as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003661See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003662else
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3664$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003665fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3667$as_echo_n "checking for C compiler default output file name... " >&6; }
3668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3669$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003672rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003673ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3675$as_echo_n "checking for suffix of executables... " >&6; }
3676if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003677case "(($ac_try" in
3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003681eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3682$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003683 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3686 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003687 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3688# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3689# work properly (i.e., refer to `conftest.exe'), while it won't with
3690# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003691for ac_file in conftest.exe conftest conftest.*; do
3692 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003694 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003696 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 * ) break;;
3698 esac
3699done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003701 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003703as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01003704See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003706rm -f conftest conftest$ac_cv_exeext
3707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3708$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003709
3710rm -f conftest.$ac_ext
3711EXEEXT=$ac_cv_exeext
3712ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3714/* end confdefs.h. */
3715#include <stdio.h>
3716int
3717main ()
3718{
3719FILE *f = fopen ("conftest.out", "w");
3720 return ferror (f) || fclose (f) != 0;
3721
3722 ;
3723 return 0;
3724}
Skip Montanaro6dead952003-09-25 14:50:04 +00003725_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003726ac_clean_files="$ac_clean_files conftest.out"
3727# Check that the compiler produces executables we can run. If not, either
3728# the compiler is broken, or we cross compile.
3729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3730$as_echo_n "checking whether we are cross compiling... " >&6; }
3731if test "$cross_compiling" != yes; then
3732 { { ac_try="$ac_link"
3733case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
3737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3738$as_echo "$ac_try_echo"; } >&5
3739 (eval "$ac_link") 2>&5
3740 ac_status=$?
3741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3742 test $ac_status = 0; }
3743 if { ac_try='./conftest$ac_cv_exeext'
3744 { { case "(($ac_try" in
3745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3746 *) ac_try_echo=$ac_try;;
3747esac
3748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3749$as_echo "$ac_try_echo"; } >&5
3750 (eval "$ac_try") 2>&5
3751 ac_status=$?
3752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3753 test $ac_status = 0; }; }; then
3754 cross_compiling=no
3755 else
3756 if test "$cross_compiling" = maybe; then
3757 cross_compiling=yes
3758 else
3759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003761as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003762If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01003763See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764 fi
3765 fi
3766fi
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3768$as_echo "$cross_compiling" >&6; }
3769
3770rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3771ac_clean_files=$ac_clean_files_save
3772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3773$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003774if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003775 $as_echo_n "(cached) " >&6
3776else
3777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003779
Martin v. Löwis11437992002-04-12 09:54:03 +00003780int
3781main ()
3782{
3783
3784 ;
3785 return 0;
3786}
3787_ACEOF
3788rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003790case "(($ac_try" in
3791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3792 *) ac_try_echo=$ac_try;;
3793esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003794eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3795$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003796 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3799 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003800 for ac_file in conftest.o conftest.obj conftest.*; do
3801 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003804 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3805 break;;
3806 esac
3807done
3808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003809 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003810sed 's/^/| /' conftest.$ac_ext >&5
3811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3813$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003814as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01003815See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003817rm -f conftest.$ac_cv_objext conftest.$ac_ext
3818fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3820$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821OBJEXT=$ac_cv_objext
3822ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3824$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003825if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831int
3832main ()
3833{
3834#ifndef __GNUC__
3835 choke me
3836#endif
3837
3838 ;
3839 return 0;
3840}
3841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003842if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 ac_compiler_gnu=yes
3844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003845 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003848ac_cv_c_compiler_gnu=$ac_compiler_gnu
3849
3850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3852$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3853if test $ac_compiler_gnu = yes; then
3854 GCC=yes
3855else
3856 GCC=
3857fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003858ac_test_CFLAGS=${CFLAGS+set}
3859ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3861$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003862if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003863 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003864else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865 ac_save_c_werror_flag=$ac_c_werror_flag
3866 ac_c_werror_flag=yes
3867 ac_cv_prog_cc_g=no
3868 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003871
Martin v. Löwis11437992002-04-12 09:54:03 +00003872int
3873main ()
3874{
3875
3876 ;
3877 return 0;
3878}
3879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00003881 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003883 CFLAGS=""
3884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003885/* end confdefs.h. */
3886
3887int
3888main ()
3889{
3890
3891 ;
3892 return 0;
3893}
3894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897else
3898 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901/* end confdefs.h. */
3902
3903int
3904main ()
3905{
3906
3907 ;
3908 return 0;
3909}
3910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003912 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00003913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3919 ac_c_werror_flag=$ac_save_c_werror_flag
3920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3922$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003923if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003925elif test $ac_cv_prog_cc_g = yes; then
3926 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003927 CFLAGS="-g -O2"
3928 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003929 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930 fi
3931else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003932 if test "$GCC" = yes; then
3933 CFLAGS="-O2"
3934 else
3935 CFLAGS=
3936 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3939$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003940if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003941 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003942else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003943 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003944ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003946/* end confdefs.h. */
3947#include <stdarg.h>
3948#include <stdio.h>
3949#include <sys/types.h>
3950#include <sys/stat.h>
3951/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3952struct buf { int x; };
3953FILE * (*rcsopen) (struct buf *, struct stat *, int);
3954static char *e (p, i)
3955 char **p;
3956 int i;
3957{
3958 return p[i];
3959}
3960static char *f (char * (*g) (char **, int), char **p, ...)
3961{
3962 char *s;
3963 va_list v;
3964 va_start (v,p);
3965 s = g (p, va_arg (v,int));
3966 va_end (v);
3967 return s;
3968}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003969
3970/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3971 function prototypes and stuff, but not '\xHH' hex character constants.
3972 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003973 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3975 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003976 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003977int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3978
Martin v. Löwiseba40652007-08-30 20:10:57 +00003979/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3980 inside strings and character constants. */
3981#define FOO(x) 'x'
3982int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3983
Skip Montanaro6dead952003-09-25 14:50:04 +00003984int test (int i, double x);
3985struct s1 {int (*f) (int a);};
3986struct s2 {int (*f) (double a);};
3987int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3988int argc;
3989char **argv;
3990int
3991main ()
3992{
3993return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3994 ;
3995 return 0;
3996}
3997_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003998for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3999 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004000do
4001 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004002 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004003 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005rm -f core conftest.err conftest.$ac_objext
4006 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004007done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004009CC=$ac_save_CC
4010
4011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004012# AC_CACHE_VAL
4013case "x$ac_cv_prog_cc_c89" in
4014 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4016$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004017 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4019$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004020 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004021 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4023$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004024esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004025if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004026
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004027fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004028
Martin v. Löwis11437992002-04-12 09:54:03 +00004029ac_ext=c
4030ac_cpp='$CPP $CPPFLAGS'
4031ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4032ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4033ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004035if test ! -z "$preset_cflags"
4036then
4037 CFLAGS=$preset_cflags
4038fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004039
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004040
4041
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4043$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004044
Martin v. Löwiseba40652007-08-30 20:10:57 +00004045# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004046if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004047 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004048
4049 case $withval in
4050 no) with_cxx_main=no
4051 MAINCC='$(CC)';;
4052 yes) with_cxx_main=yes
4053 MAINCC='$(CXX)';;
4054 *) with_cxx_main=yes
4055 MAINCC=$withval
4056 if test -z "$CXX"
4057 then
4058 CXX=$withval
4059 fi;;
4060 esac
4061else
4062
4063 with_cxx_main=no
4064 MAINCC='$(CC)'
4065
Martin v. Löwiseba40652007-08-30 20:10:57 +00004066fi
4067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4069$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004070
4071preset_cxx="$CXX"
4072if test -z "$CXX"
4073then
4074 case "$CC" in
4075 gcc) # Extract the first word of "g++", so it can be a program name with args.
4076set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4078$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004079if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004080 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004081else
4082 case $CXX in
4083 [\\/]* | ?:[\\/]*)
4084 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4085 ;;
4086 *)
4087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4088for as_dir in notfound
4089do
4090 IFS=$as_save_IFS
4091 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004093 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 +00004094 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004095 $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 +00004096 break 2
4097 fi
4098done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004101
4102 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4103 ;;
4104esac
4105fi
4106CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004107if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4109$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4112$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004114
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004115 ;;
4116 cc) # Extract the first word of "c++", so it can be a program name with args.
4117set dummy c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4119$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004120if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004122else
4123 case $CXX in
4124 [\\/]* | ?:[\\/]*)
4125 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4126 ;;
4127 *)
4128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4129for as_dir in notfound
4130do
4131 IFS=$as_save_IFS
4132 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004133 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004134 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 +00004135 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 $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 +00004137 break 2
4138 fi
4139done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004141IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004142
4143 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4144 ;;
4145esac
4146fi
4147CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004148if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4150$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4153$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004155
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004156 ;;
4157 esac
4158 if test "$CXX" = "notfound"
4159 then
4160 CXX=""
4161 fi
4162fi
4163if test -z "$CXX"
4164then
4165 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4166do
4167 # Extract the first word of "$ac_prog", so it can be a program name with args.
4168set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4170$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004171if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004172 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004173else
4174 if test -n "$CXX"; then
4175 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4176else
4177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4178for as_dir in $PATH
4179do
4180 IFS=$as_save_IFS
4181 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004183 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 +00004184 ac_cv_prog_CXX="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185 $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 +00004186 break 2
4187 fi
4188done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004189 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004190IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004191
4192fi
4193fi
4194CXX=$ac_cv_prog_CXX
4195if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4197$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4200$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004201fi
4202
Martin v. Löwiseba40652007-08-30 20:10:57 +00004203
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004204 test -n "$CXX" && break
4205done
4206test -n "$CXX" || CXX="notfound"
4207
4208 if test "$CXX" = "notfound"
4209 then
4210 CXX=""
4211 fi
4212fi
4213if test "$preset_cxx" != "$CXX"
4214then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004216
4217 By default, distutils will build C++ extension modules with \"$CXX\".
4218 If this is not intended, then set CXX on the configure command line.
4219 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004220$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004221
4222 By default, distutils will build C++ extension modules with \"$CXX\".
4223 If this is not intended, then set CXX on the configure command line.
4224 " >&2;}
4225fi
4226
4227
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004228# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
4230ac_ext=c
4231ac_cpp='$CPP $CPPFLAGS'
4232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4234ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4236$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004237# On Suns, sometimes $CPP names a directory.
4238if test -n "$CPP" && test -d "$CPP"; then
4239 CPP=
4240fi
4241if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004242 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004243 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004244else
Martin v. Löwis11437992002-04-12 09:54:03 +00004245 # Double quotes because CPP needs to be expanded
4246 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4247 do
4248 ac_preproc_ok=false
4249for ac_c_preproc_warn_flag in '' yes
4250do
4251 # Use a header file that comes with gcc, so configuring glibc
4252 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004253 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4254 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004255 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004258/* end confdefs.h. */
4259#ifdef __STDC__
4260# include <limits.h>
4261#else
4262# include <assert.h>
4263#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004264 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268else
Martin v. Löwis11437992002-04-12 09:54:03 +00004269 # Broken: fails on valid input.
4270continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004271fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004272rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004273
Martin v. Löwiseba40652007-08-30 20:10:57 +00004274 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004275 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004278#include <ac_nonexistent.h>
4279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004280if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 # Broken: success on invalid input.
4282continue
4283else
Martin v. Löwis11437992002-04-12 09:54:03 +00004284 # Passes both tests.
4285ac_preproc_ok=:
4286break
4287fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004288rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004289
4290done
4291# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004292rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004293if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004294 break
4295fi
4296
4297 done
4298 ac_cv_prog_CPP=$CPP
4299
4300fi
4301 CPP=$ac_cv_prog_CPP
4302else
4303 ac_cv_prog_CPP=$CPP
4304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4306$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004307ac_preproc_ok=false
4308for ac_c_preproc_warn_flag in '' yes
4309do
4310 # Use a header file that comes with gcc, so configuring glibc
4311 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004312 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4313 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 # On the NeXT, cc -E runs the code through the compiler's parser,
4315 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004317/* end confdefs.h. */
4318#ifdef __STDC__
4319# include <limits.h>
4320#else
4321# include <assert.h>
4322#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004325if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004327else
Martin v. Löwis11437992002-04-12 09:54:03 +00004328 # Broken: fails on valid input.
4329continue
4330fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004331rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004332
Martin v. Löwiseba40652007-08-30 20:10:57 +00004333 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004334 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004337#include <ac_nonexistent.h>
4338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004339if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004340 # Broken: success on invalid input.
4341continue
4342else
Martin v. Löwis11437992002-04-12 09:54:03 +00004343 # Passes both tests.
4344ac_preproc_ok=:
4345break
4346fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004347rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004348
4349done
4350# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004351rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352if $ac_preproc_ok; then :
4353
Martin v. Löwis11437992002-04-12 09:54:03 +00004354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004355 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004357as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004358See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004359fi
4360
4361ac_ext=c
4362ac_cpp='$CPP $CPPFLAGS'
4363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4365ac_compiler_gnu=$ac_cv_c_compiler_gnu
4366
4367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4369$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004370if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004371 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004374 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004375 # Loop through the user's path and test for each of PROGNAME-LIST
4376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004377for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4378do
4379 IFS=$as_save_IFS
4380 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004381 for ac_prog in grep ggrep; do
4382 for ac_exec_ext in '' $ac_executable_extensions; do
4383 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4384 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4385# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386 # Check for GNU $ac_path_GREP
4387case `"$ac_path_GREP" --version 2>&1` in
4388*GNU*)
4389 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4390*)
4391 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004392 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004393 while :
4394 do
4395 cat "conftest.in" "conftest.in" >"conftest.tmp"
4396 mv "conftest.tmp" "conftest.in"
4397 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004398 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4400 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004401 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4403 # Best one so far, save it but keep looking for a better one
4404 ac_cv_path_GREP="$ac_path_GREP"
4405 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004406 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004407 # 10*(2^10) chars as input seems more than enough
4408 test $ac_count -gt 10 && break
4409 done
4410 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4411esac
4412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004413 $ac_path_GREP_found && break 3
4414 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004415 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004416 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004417IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004418 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004419 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 +00004420 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004421else
4422 ac_cv_path_GREP=$GREP
4423fi
4424
Martin v. Löwiseba40652007-08-30 20:10:57 +00004425fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4427$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004428 GREP="$ac_cv_path_GREP"
4429
4430
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4432$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004433if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004434 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435else
4436 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4437 then ac_cv_path_EGREP="$GREP -E"
4438 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004439 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004440 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004441 # Loop through the user's path and test for each of PROGNAME-LIST
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004443for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4444do
4445 IFS=$as_save_IFS
4446 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447 for ac_prog in egrep; do
4448 for ac_exec_ext in '' $ac_executable_extensions; do
4449 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4450 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4451# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004452 # Check for GNU $ac_path_EGREP
4453case `"$ac_path_EGREP" --version 2>&1` in
4454*GNU*)
4455 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4456*)
4457 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004458 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004459 while :
4460 do
4461 cat "conftest.in" "conftest.in" >"conftest.tmp"
4462 mv "conftest.tmp" "conftest.in"
4463 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004464 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004465 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4466 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004467 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004468 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4469 # Best one so far, save it but keep looking for a better one
4470 ac_cv_path_EGREP="$ac_path_EGREP"
4471 ac_path_EGREP_max=$ac_count
4472 fi
4473 # 10*(2^10) chars as input seems more than enough
4474 test $ac_count -gt 10 && break
4475 done
4476 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4477esac
4478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004479 $ac_path_EGREP_found && break 3
4480 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004484 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004485 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 +00004486 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004487else
4488 ac_cv_path_EGREP=$EGREP
4489fi
4490
Martin v. Löwiseba40652007-08-30 20:10:57 +00004491 fi
4492fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4494$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004495 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004496
4497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4499$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004500if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004501 $as_echo_n "(cached) " >&6
4502else
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004504/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004505#include <stdlib.h>
4506#include <stdarg.h>
4507#include <string.h>
4508#include <float.h>
4509
4510int
4511main ()
4512{
4513
4514 ;
4515 return 0;
4516}
4517_ACEOF
4518if ac_fn_c_try_compile "$LINENO"; then :
4519 ac_cv_header_stdc=yes
4520else
4521 ac_cv_header_stdc=no
4522fi
4523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4524
4525if test $ac_cv_header_stdc = yes; then
4526 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4528/* end confdefs.h. */
4529#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004530
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004531_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004533 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004534
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004536 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004537fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004538rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004539
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540fi
4541
4542if test $ac_cv_header_stdc = yes; then
4543 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#include <stdlib.h>
4547
4548_ACEOF
4549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4550 $EGREP "free" >/dev/null 2>&1; then :
4551
4552else
4553 ac_cv_header_stdc=no
4554fi
4555rm -f conftest*
4556
4557fi
4558
4559if test $ac_cv_header_stdc = yes; then
4560 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4561 if test "$cross_compiling" = yes; then :
4562 :
4563else
4564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4565/* end confdefs.h. */
4566#include <ctype.h>
4567#include <stdlib.h>
4568#if ((' ' & 0x0FF) == 0x020)
4569# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4570# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4571#else
4572# define ISLOWER(c) \
4573 (('a' <= (c) && (c) <= 'i') \
4574 || ('j' <= (c) && (c) <= 'r') \
4575 || ('s' <= (c) && (c) <= 'z'))
4576# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4577#endif
4578
4579#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4580int
4581main ()
4582{
4583 int i;
4584 for (i = 0; i < 256; i++)
4585 if (XOR (islower (i), ISLOWER (i))
4586 || toupper (i) != TOUPPER (i))
4587 return 2;
4588 return 0;
4589}
4590_ACEOF
4591if ac_fn_c_try_run "$LINENO"; then :
4592
4593else
4594 ac_cv_header_stdc=no
4595fi
4596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4597 conftest.$ac_objext conftest.beam conftest.$ac_ext
4598fi
4599
4600fi
4601fi
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4603$as_echo "$ac_cv_header_stdc" >&6; }
4604if test $ac_cv_header_stdc = yes; then
4605
4606$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4607
4608fi
4609
4610# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4611for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4612 inttypes.h stdint.h unistd.h
4613do :
4614 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4615ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4616"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004617if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004618 cat >>confdefs.h <<_ACEOF
4619#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4620_ACEOF
4621
4622fi
4623
4624done
4625
4626
4627
4628 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 +01004629if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004630 MINIX=yes
4631else
4632 MINIX=
4633fi
4634
4635
4636 if test "$MINIX" = yes; then
4637
4638$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4639
4640
4641$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4642
4643
4644$as_echo "#define _MINIX 1" >>confdefs.h
4645
4646 fi
4647
4648
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4650$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004651if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004652 $as_echo_n "(cached) " >&6
4653else
4654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4655/* end confdefs.h. */
4656
4657# define __EXTENSIONS__ 1
4658 $ac_includes_default
4659int
4660main ()
4661{
4662
4663 ;
4664 return 0;
4665}
4666_ACEOF
4667if ac_fn_c_try_compile "$LINENO"; then :
4668 ac_cv_safe_to_define___extensions__=yes
4669else
4670 ac_cv_safe_to_define___extensions__=no
4671fi
4672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4673fi
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4675$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4676 test $ac_cv_safe_to_define___extensions__ = yes &&
4677 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4678
4679 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4680
4681 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4682
4683 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4684
4685 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4686
4687
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004688
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004689# Check for unsupported systems
4690case $ac_sys_system/$ac_sys_release in
4691atheos*|Linux*/1*)
4692 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4693 echo See README for details.
4694 exit 1;;
4695esac
4696
4697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
4699$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004700
4701# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004702if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004703 withval=$with_suffix;
4704 case $withval in
4705 no) EXEEXT=;;
4706 yes) EXEEXT=.exe;;
4707 *) EXEEXT=$withval;;
4708 esac
4709fi
4710
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
4712$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004713
4714# Test whether we're running on a non-case-sensitive system, in which
4715# case we give a warning if no ext is given
4716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
4718$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719if test ! -d CaseSensitiveTestDir; then
4720mkdir CaseSensitiveTestDir
4721fi
4722
4723if test -d casesensitivetestdir
4724then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4726$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004727 BUILDEXEEXT=.exe
4728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004731 BUILDEXEEXT=$EXEEXT
4732fi
4733rmdir CaseSensitiveTestDir
4734
4735case $MACHDEP in
4736bsdos*)
4737 case $CC in
4738 gcc) CC="$CC -D_HAVE_BSDI";;
4739 esac;;
4740esac
4741
4742case $ac_sys_system in
4743hp*|HP*)
4744 case $CC in
4745 cc|*/cc) CC="$CC -Ae";;
4746 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004747SunOS*)
4748 # Some functions have a prototype only with that define, e.g. confstr
4749
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004750$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004751
4752 ;;
4753esac
4754
4755
4756
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
4758$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004759if test -z "$LIBRARY"
4760then
4761 LIBRARY='libpython$(VERSION).a'
4762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
4764$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004765
4766# LDLIBRARY is the name of the library to link against (as opposed to the
4767# name of the library into which to insert object files). BLDLIBRARY is also
4768# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4769# is blank as the main program is not linked directly against LDLIBRARY.
4770# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4771# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4772# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4773# DLLLIBRARY is the shared (i.e., DLL) library.
4774#
4775# RUNSHARED is used to run shared python without installed libraries
4776#
4777# INSTSONAME is the name of the shared library that will be use to install
4778# on the system - some systems like version suffix, others don't
4779
4780
4781
4782
4783
4784
4785LDLIBRARY="$LIBRARY"
4786BLDLIBRARY='$(LDLIBRARY)'
4787INSTSONAME='$(LDLIBRARY)'
4788DLLLIBRARY=''
4789LDLIBRARYDIR=''
4790RUNSHARED=''
4791
4792# LINKCC is the command that links the python executable -- default is $(CC).
4793# If CXX is set, and if it is needed to link a main function that was
4794# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4795# python might then depend on the C++ runtime
4796# This is altered for AIX in order to build the export list before
4797# linking.
4798
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
4800$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004801if test -z "$LINKCC"
4802then
4803 LINKCC='$(PURIFY) $(MAINCC)'
4804 case $ac_sys_system in
4805 AIX*)
4806 exp_extra="\"\""
4807 if test $ac_sys_release -ge 5 -o \
4808 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4809 exp_extra="."
4810 fi
4811 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004812 QNX*)
4813 # qcc must be used because the other compilers do not
4814 # support -N.
4815 LINKCC=qcc;;
4816 esac
4817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
4819$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004820
4821# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4822# make sure we default having it set to "no": this is used by
4823# distutils.unixccompiler to know if it should add --enable-new-dtags
4824# to linker command lines, and failing to detect GNU ld simply results
4825# in the same bahaviour as before.
4826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
4828$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004829ac_prog=ld
4830if test "$GCC" = yes; then
4831 ac_prog=`$CC -print-prog-name=ld`
4832fi
4833case `"$ac_prog" -V 2>&1 < /dev/null` in
4834 *GNU*)
4835 GNULD=yes;;
4836 *)
4837 GNULD=no;;
4838esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
4840$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
4843$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004844# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004846 enableval=$enable_shared;
4847fi
4848
4849
4850if test -z "$enable_shared"
4851then
4852 case $ac_sys_system in
4853 CYGWIN* | atheos*)
4854 enable_shared="yes";;
4855 *)
4856 enable_shared="no";;
4857 esac
4858fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
4860$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
4863$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004864# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865if test "${enable_profiling+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004866 enableval=$enable_profiling; ac_save_cc="$CC"
4867 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004869 ac_enable_profiling="no"
4870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004872/* end confdefs.h. */
4873int main() { return 0; }
4874_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004875if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004876 ac_enable_profiling="yes"
4877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 ac_enable_profiling="no"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004879fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4881 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004882fi
4883
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004884 CC="$ac_save_cc"
4885fi
4886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
4888$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004889
4890case "$ac_enable_profiling" in
4891 "yes")
4892 BASECFLAGS="-pg $BASECFLAGS"
4893 LDFLAGS="-pg $LDFLAGS"
4894 ;;
4895esac
4896
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
4898$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004899
4900# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4901# library that we build, but we do not want to link against it (we
4902# will find it with a -framework option). For this reason there is an
4903# extra variable BLDLIBRARY against which Python and the extension
4904# modules are linked, BLDLIBRARY. This is normally the same as
4905# LDLIBRARY, but empty for MacOSX framework builds.
4906if test "$enable_framework"
4907then
4908 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4909 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4910 BLDLIBRARY=''
4911else
4912 BLDLIBRARY='$(LDLIBRARY)'
4913fi
4914
4915# Other platforms follow
4916if test $enable_shared = "yes"; then
4917
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004919
4920 case $ac_sys_system in
4921 BeOS*)
4922 LDLIBRARY='libpython$(VERSION).so'
4923 ;;
4924 CYGWIN*)
4925 LDLIBRARY='libpython$(VERSION).dll.a'
4926 DLLLIBRARY='libpython$(VERSION).dll'
4927 ;;
4928 SunOS*)
4929 LDLIBRARY='libpython$(VERSION).so'
4930 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4931 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4932 INSTSONAME="$LDLIBRARY".$SOVERSION
4933 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02004934 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004935 LDLIBRARY='libpython$(VERSION).so'
4936 BLDLIBRARY='-L. -lpython$(VERSION)'
4937 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4938 case $ac_sys_system in
4939 FreeBSD*)
4940 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4941 ;;
4942 esac
4943 INSTSONAME="$LDLIBRARY".$SOVERSION
4944 ;;
4945 hp*|HP*)
4946 case `uname -m` in
4947 ia64)
4948 LDLIBRARY='libpython$(VERSION).so'
4949 ;;
4950 *)
4951 LDLIBRARY='libpython$(VERSION).sl'
4952 ;;
4953 esac
4954 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4955 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4956 ;;
4957 OSF*)
4958 LDLIBRARY='libpython$(VERSION).so'
4959 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4960 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4961 ;;
4962 atheos*)
4963 LDLIBRARY='libpython$(VERSION).so'
4964 BLDLIBRARY='-L. -lpython$(VERSION)'
4965 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4966 ;;
4967 Darwin*)
4968 LDLIBRARY='libpython$(VERSION).dylib'
4969 BLDLIBRARY='-L. -lpython$(VERSION)'
4970 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4971 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00004972 AIX*)
4973 LDLIBRARY='libpython$(VERSION).so'
4974 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
4975 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004976
4977 esac
4978else # shared is disabled
4979 case $ac_sys_system in
4980 CYGWIN*)
4981 BLDLIBRARY='$(LIBRARY)'
4982 LDLIBRARY='libpython$(VERSION).dll.a'
4983 ;;
4984 esac
4985fi
4986
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
4988$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004989
4990if test -n "$ac_tool_prefix"; then
4991 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4992set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4994$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004995if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004996 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004997else
4998 if test -n "$RANLIB"; then
4999 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5000else
5001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002for as_dir in $PATH
5003do
5004 IFS=$as_save_IFS
5005 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005006 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005007 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5008 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005010 break 2
5011 fi
5012done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005013 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014IFS=$as_save_IFS
5015
5016fi
5017fi
5018RANLIB=$ac_cv_prog_RANLIB
5019if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5021$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005022else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5024$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005025fi
5026
5027
5028fi
5029if test -z "$ac_cv_prog_RANLIB"; then
5030 ac_ct_RANLIB=$RANLIB
5031 # Extract the first word of "ranlib", so it can be a program name with args.
5032set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005035if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005036 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005037else
5038 if test -n "$ac_ct_RANLIB"; then
5039 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5040else
5041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in $PATH
5043do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005046 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5048 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050 break 2
5051 fi
5052done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005053 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005054IFS=$as_save_IFS
5055
5056fi
5057fi
5058ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5059if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5061$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005065fi
5066
5067 if test "x$ac_ct_RANLIB" = x; then
5068 RANLIB=":"
5069 else
5070 case $cross_compiling:$ac_tool_warned in
5071yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005074ac_tool_warned=yes ;;
5075esac
5076 RANLIB=$ac_ct_RANLIB
5077 fi
5078else
5079 RANLIB="$ac_cv_prog_RANLIB"
5080fi
5081
5082
5083for ac_prog in ar aal
5084do
5085 # Extract the first word of "$ac_prog", so it can be a program name with args.
5086set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005089if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005090 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005091else
5092 if test -n "$AR"; then
5093 ac_cv_prog_AR="$AR" # Let the user override the test.
5094else
5095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in $PATH
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005100 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5102 ac_cv_prog_AR="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005104 break 2
5105 fi
5106done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005107 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005108IFS=$as_save_IFS
5109
5110fi
5111fi
5112AR=$ac_cv_prog_AR
5113if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5115$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005119fi
5120
5121
5122 test -n "$AR" && break
5123done
5124test -n "$AR" || AR="ar"
5125
5126
5127# tweak ARFLAGS only if the user didn't set it on the command line
5128
5129if test -z "$ARFLAGS"
5130then
5131 ARFLAGS="rc"
5132fi
5133
5134
5135# Extract the first word of "svnversion", so it can be a program name with args.
5136set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5138$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005139if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005140 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005141else
5142 if test -n "$SVNVERSION"; then
5143 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5144else
5145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5146for as_dir in $PATH
5147do
5148 IFS=$as_save_IFS
5149 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005150 for ac_exec_ext in '' $ac_executable_extensions; do
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005151 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5152 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005154 break 2
5155 fi
5156done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005158IFS=$as_save_IFS
5159
5160 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5161fi
5162fi
5163SVNVERSION=$ac_cv_prog_SVNVERSION
5164if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5166$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5169$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005170fi
5171
5172
5173if test $SVNVERSION = found
5174then
5175 SVNVERSION="svnversion \$(srcdir)"
5176else
5177 SVNVERSION="echo Unversioned directory"
5178fi
5179
Trent Nelsond86ceec2012-10-16 09:42:45 -04005180BUILDDIR="`pwd`"
5181
5182
5183if test "$srcdir" != "$BUILDDIR"; then
5184 # If we're building out-of-tree make sure Include (in the current dir)
5185 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5186 # and graminit.h to get picked up from the correct directory.
5187 # (A side effect of this is that these resources will automatically be
5188 # regenerated when building out-of-tree, regardless of whether or not
5189 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5190 # off.)
5191 BASECPPFLAGS="-IInclude"
5192else
5193 BASECPPFLAGS=""
5194fi
5195
Georg Brandl3a5508e2011-03-06 10:42:21 +01005196
5197
5198
5199# Extract the first word of "hg", so it can be a program name with args.
5200set dummy hg; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005203if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005204 $as_echo_n "(cached) " >&6
5205else
5206 if test -n "$HAS_HG"; then
5207 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5208else
5209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210for as_dir in $PATH
5211do
5212 IFS=$as_save_IFS
5213 test -z "$as_dir" && as_dir=.
5214 for ac_exec_ext in '' $ac_executable_extensions; do
5215 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5216 ac_cv_prog_HAS_HG="found"
5217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218 break 2
5219 fi
5220done
5221 done
5222IFS=$as_save_IFS
5223
5224 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5225fi
5226fi
5227HAS_HG=$ac_cv_prog_HAS_HG
5228if test -n "$HAS_HG"; then
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5230$as_echo "$HAS_HG" >&6; }
5231else
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233$as_echo "no" >&6; }
5234fi
5235
5236
5237if test $HAS_HG = found
5238then
5239 HGVERSION="hg id -i \$(srcdir)"
5240 HGTAG="hg id -t \$(srcdir)"
5241 HGBRANCH="hg id -b \$(srcdir)"
5242else
5243 HGVERSION=""
5244 HGTAG=""
5245 HGBRANCH=""
5246fi
5247
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005248case $MACHDEP in
5249bsdos*|hp*|HP*)
5250 # install -d does not work on BSDI or HP-UX
5251 if test -z "$INSTALL"
5252 then
5253 INSTALL="${srcdir}/install-sh -c"
5254 fi
5255esac
5256ac_aux_dir=
5257for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005258 if test -f "$ac_dir/install-sh"; then
5259 ac_aux_dir=$ac_dir
5260 ac_install_sh="$ac_aux_dir/install-sh -c"
5261 break
5262 elif test -f "$ac_dir/install.sh"; then
5263 ac_aux_dir=$ac_dir
5264 ac_install_sh="$ac_aux_dir/install.sh -c"
5265 break
5266 elif test -f "$ac_dir/shtool"; then
5267 ac_aux_dir=$ac_dir
5268 ac_install_sh="$ac_aux_dir/shtool install -c"
5269 break
5270 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005271done
5272if test -z "$ac_aux_dir"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005273 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005274fi
5275
5276# These three variables are undocumented and unsupported,
5277# and are intended to be withdrawn in a future Autoconf release.
5278# They can cause serious problems if a builder's source tree is in a directory
5279# whose full name contains unusual characters.
5280ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5281ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5282ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5283
5284
5285# Find a good install program. We prefer a C program (faster),
5286# so one script is as good as another. But avoid the broken or
5287# incompatible versions:
5288# SysV /etc/install, /usr/sbin/install
5289# SunOS /usr/etc/install
5290# IRIX /sbin/install
5291# AIX /bin/install
5292# AmigaOS /C/install, which installs bootblocks on floppy discs
5293# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5294# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5295# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5296# OS/2's system install, which has a completely different semantic
5297# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005298# Reject install programs that cannot install multiple files.
5299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5300$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005302if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005303 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005304else
5305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5306for as_dir in $PATH
5307do
5308 IFS=$as_save_IFS
5309 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005310 # Account for people who put trailing slashes in PATH elements.
5311case $as_dir/ in #((
5312 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005314 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005315 /usr/ucb/* ) ;;
5316 *)
5317 # OSF1 and SCO ODT 3.0 have their own names for install.
5318 # Don't use installbsd from OSF since it installs stuff as root
5319 # by default.
5320 for ac_prog in ginstall scoinst install; do
5321 for ac_exec_ext in '' $ac_executable_extensions; do
5322 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5323 if test $ac_prog = install &&
5324 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5325 # AIX install. It has an incompatible calling convention.
5326 :
5327 elif test $ac_prog = install &&
5328 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5329 # program-specific install script used by HP pwplus--don't use.
5330 :
5331 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005332 rm -rf conftest.one conftest.two conftest.dir
5333 echo one > conftest.one
5334 echo two > conftest.two
5335 mkdir conftest.dir
5336 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5337 test -s conftest.one && test -s conftest.two &&
5338 test -s conftest.dir/conftest.one &&
5339 test -s conftest.dir/conftest.two
5340 then
5341 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5342 break 3
5343 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005344 fi
5345 fi
5346 done
5347 done
5348 ;;
5349esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005350
5351 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352IFS=$as_save_IFS
5353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005354rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355
5356fi
5357 if test "${ac_cv_path_install+set}" = set; then
5358 INSTALL=$ac_cv_path_install
5359 else
5360 # As a last resort, use the slow shell script. Don't cache a
5361 # value for INSTALL within a source directory, because that will
5362 # break other packages using the cache if that directory is
5363 # removed, or if the value is a relative name.
5364 INSTALL=$ac_install_sh
5365 fi
5366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5368$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369
5370# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5371# It thinks the first close brace ends the variable substitution.
5372test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5373
5374test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5375
5376test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5377
Trent Nelsonf6407a12012-08-30 14:56:13 +00005378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5379$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5380if test -z "$MKDIR_P"; then
5381 if ${ac_cv_path_mkdir+:} false; then :
5382 $as_echo_n "(cached) " >&6
5383else
5384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5386do
5387 IFS=$as_save_IFS
5388 test -z "$as_dir" && as_dir=.
5389 for ac_prog in mkdir gmkdir; do
5390 for ac_exec_ext in '' $ac_executable_extensions; do
5391 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
5392 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5393 'mkdir (GNU coreutils) '* | \
5394 'mkdir (coreutils) '* | \
5395 'mkdir (fileutils) '4.1*)
5396 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5397 break 3;;
5398 esac
5399 done
5400 done
5401 done
5402IFS=$as_save_IFS
5403
5404fi
5405
5406 test -d ./--version && rmdir ./--version
5407 if test "${ac_cv_path_mkdir+set}" = set; then
5408 MKDIR_P="$ac_cv_path_mkdir -p"
5409 else
5410 # As a last resort, use the slow shell script. Don't cache a
5411 # value for MKDIR_P within a source directory, because that will
5412 # break other packages using the cache if that directory is
5413 # removed, or if the value is a relative name.
5414 MKDIR_P="$ac_install_sh -d"
5415 fi
5416fi
5417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5418$as_echo "$MKDIR_P" >&6; }
5419
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005420
5421# Not every filesystem supports hard links
5422
5423if test -z "$LN" ; then
5424 case $ac_sys_system in
5425 BeOS*) LN="ln -s";;
5426 CYGWIN*) LN="ln -s";;
5427 atheos*) LN="ln -s";;
5428 *) LN=ln;;
5429 esac
5430fi
5431
5432# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5434$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435
5436# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005437if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438 withval=$with_pydebug;
5439if test "$withval" != no
5440then
5441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005442$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5445$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005447else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449fi
5450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5452$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453fi
5454
5455
5456# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5457# merged with this chunk of code?
5458
5459# Optimizer/debugger flags
5460# ------------------------
5461# (The following bit of code is complicated enough - please keep things
5462# indented properly. Just pretend you're editing Python code. ;-)
5463
5464# There are two parallel sets of case statements below, one that checks to
5465# see if OPT was set and one that does BASECFLAGS setting based upon
5466# compiler and platform. BASECFLAGS tweaks need to be made even if the
5467# user set OPT.
5468
5469# tweak OPT based on compiler and platform, only if the user didn't set
5470# it on the command line
5471
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005472if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005473then
5474 case $GCC in
5475 yes)
5476 if test "$CC" != 'g++' ; then
5477 STRICT_PROTO="-Wstrict-prototypes"
5478 fi
5479 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5480 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5481 WRAP="-fwrapv"
5482 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005483
5484 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005485 case $CC in
5486 *clang*) WRAP="-fwrapv"
5487 ;;
5488 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005489
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490 case $ac_cv_prog_cc_g in
5491 yes)
5492 if test "$Py_DEBUG" = 'true' ; then
5493 # Optimization messes up debuggers, so turn it off for
5494 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00005495 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496 else
5497 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5498 fi
5499 ;;
5500 *)
5501 OPT="-O3 -Wall $STRICT_PROTO"
5502 ;;
5503 esac
5504 case $ac_sys_system in
5505 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5506 ;;
5507 esac
5508 ;;
5509
5510 *)
5511 OPT="-O"
5512 ;;
5513 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005514fi
5515
5516
5517
5518# The -arch flags for universal builds on OSX
5519UNIVERSAL_ARCH_FLAGS=
5520
5521
5522# tweak BASECFLAGS based on compiler and platform
5523case $GCC in
5524yes)
5525 # Python violates C99 rules, by casting between incompatible
5526 # pointer types. GCC may generate bad code as a result of that,
5527 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
5529$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005530 ac_save_cc="$CC"
5531 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005532 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005537
5538int
5539main ()
5540{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005541
Gregory P. Smith373469a2009-11-01 21:03:38 +00005542 ;
5543 return 0;
5544}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005545_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547 ac_cv_no_strict_aliasing_ok=yes
5548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00005552fi
5553
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005554 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
5556$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005557 if test $ac_cv_no_strict_aliasing_ok = yes
5558 then
5559 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5560 fi
5561
5562 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5563 # support. Without this, treatment of subnormals doesn't follow
5564 # the standard.
5565 case $ac_sys_machine in
5566 alpha*)
5567 BASECFLAGS="$BASECFLAGS -mieee"
5568 ;;
5569 esac
5570
5571 case $ac_sys_system in
5572 SCO_SV*)
5573 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5574 ;;
5575 # is there any other compiler on Darwin besides gcc?
5576 Darwin*)
5577 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5578 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005579 if test "${CC}" = gcc
5580 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5582$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005583 case "${UNIVERSALSDK}" in
5584 */MacOSX10.4u.sdk)
5585 # Build using 10.4 SDK, force usage of gcc when the
5586 # compiler is gcc, otherwise the user will get very
5587 # confusing error messages when building on OSX 10.6
5588 CC=gcc-4.0
5589 CPP=cpp-4.0
5590 ;;
5591 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5593$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005594 fi
5595
5596 # Calculate the right deployment target for this build.
5597 #
5598 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5599 if test ${cur_target} '>' 10.2; then
5600 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00005601 if test ${enable_universalsdk}; then
5602 if test "${UNIVERSAL_ARCHS}" = "all"; then
5603 # Ensure that the default platform for a
5604 # 4-way universal build is OSX 10.5,
5605 # that's the first OS release where
5606 # 4-way builds make sense.
5607 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00005608
5609 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5610 cur_target='10.5'
5611
5612 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5613 cur_target='10.5'
5614
5615 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5616 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00005617 fi
5618 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00005619 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00005620 # On Intel macs default to a deployment
5621 # target of 10.4, that's the first OSX
5622 # release with Intel support.
5623 cur_target="10.4"
5624 fi
5625 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005626 fi
5627 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5628
5629 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5630 # environment with a value that is the same as what we'll use
5631 # in the Makefile to ensure that we'll get the same compiler
5632 # environment during configure and build time.
5633 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5634 export MACOSX_DEPLOYMENT_TARGET
5635 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5636
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005637 if test "${enable_universalsdk}"; then
5638 UNIVERSAL_ARCH_FLAGS=""
5639 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5640 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5641 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00005642 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005643
5644 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5645 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5646 LIPO_32BIT_FLAGS=""
5647 ARCH_RUN_32BIT="true"
5648
5649 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5650 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5651 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005652 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005653
5654 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5655 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5656 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00005657 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005658
5659 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5660 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5661 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00005662 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005663
5664 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005665 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 +00005666
5667 fi
5668
5669
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00005670 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5671 if test "${UNIVERSALSDK}" != "/"
5672 then
5673 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
5674 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5675 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005676 fi
5677
5678 fi
5679
5680
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005681 ;;
5682 OSF*)
5683 BASECFLAGS="$BASECFLAGS -mieee"
5684 ;;
5685 esac
5686 ;;
5687
5688*)
5689 case $ac_sys_system in
5690 OpenUNIX*|UnixWare*)
5691 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5692 ;;
5693 OSF*)
5694 BASECFLAGS="$BASECFLAGS -ieee -std"
5695 ;;
5696 SCO_SV*)
5697 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5698 ;;
5699 esac
5700 ;;
5701esac
5702
5703if test "$Py_DEBUG" = 'true'; then
5704 :
5705else
5706 OPT="-DNDEBUG $OPT"
5707fi
5708
5709if test "$ac_arch_flags"
5710then
5711 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5712fi
5713
5714# disable check for icc since it seems to pass, but generates a warning
5715if test "$CC" = icc
5716then
5717 ac_cv_opt_olimit_ok=no
5718fi
5719
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
5721$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005722if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724else
5725 ac_save_cc="$CC"
5726CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005728/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005729
5730int
5731main ()
5732{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005733
Gregory P. Smith373469a2009-11-01 21:03:38 +00005734 ;
5735 return 0;
5736}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005738if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005739 ac_cv_opt_olimit_ok=yes
5740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005741 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005742
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005743fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005745CC="$ac_save_cc"
5746fi
5747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
5749$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005750if test $ac_cv_opt_olimit_ok = yes; then
5751 case $ac_sys_system in
5752 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5753 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5754 # environment?
5755 Darwin*)
5756 ;;
5757 *)
5758 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5759 ;;
5760 esac
5761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
5763$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005764 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005765 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005766else
5767 ac_save_cc="$CC"
5768 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005770/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00005771
5772int
5773main ()
5774{
Mark Dickinson5e13e292010-05-11 08:55:06 +00005775
Gregory P. Smith373469a2009-11-01 21:03:38 +00005776 ;
5777 return 0;
5778}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005780if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005781 ac_cv_olimit_ok=yes
5782else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005783 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00005784
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005785fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00005786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005787 CC="$ac_save_cc"
5788fi
5789
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
5791$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005792 if test $ac_cv_olimit_ok = yes; then
5793 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5794 fi
5795fi
5796
5797# Check whether GCC supports PyArg_ParseTuple format
5798if test "$GCC" = "yes"
5799then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
5801$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005802 save_CFLAGS=$CFLAGS
5803 CFLAGS="$CFLAGS -Werror"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805/* end confdefs.h. */
5806
5807 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005808int
5809main ()
5810{
5811
5812 ;
5813 return 0;
5814}
Matthias Klosec511b472010-05-08 11:01:39 +00005815
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005817if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005818
Matthias Klosec511b472010-05-08 11:01:39 +00005819
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005820$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821
Matthias Klosec511b472010-05-08 11:01:39 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005823$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00005824
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825else
Matthias Klosec511b472010-05-08 11:01:39 +00005826
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005828$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005829
5830fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5832 CFLAGS=$save_CFLAGS
5833fi
5834
5835# On some compilers, pthreads are available without further options
5836# (e.g. MacOS X). On some of these systems, the compiler will not
5837# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5838# So we have to see first whether pthreads are available without
5839# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
5841$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005842if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005845 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005846 ac_cv_pthread_is_default=no
5847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005849/* end confdefs.h. */
5850
5851#include <pthread.h>
5852
5853void* routine(void* p){return NULL;}
5854
5855int main(){
5856 pthread_t p;
5857 if(pthread_create(&p,NULL,routine,NULL)!=0)
5858 return 1;
5859 (void)pthread_detach(p);
5860 return 0;
5861}
5862
5863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005864if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005865
5866 ac_cv_pthread_is_default=yes
5867 ac_cv_kthread=no
5868 ac_cv_pthread=no
5869
5870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005871 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005875fi
5876
5877
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005878fi
5879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
5881$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005882
5883
5884if test $ac_cv_pthread_is_default = yes
5885then
5886 ac_cv_kpthread=no
5887else
5888# -Kpthread, if available, provides the right #defines
5889# and linker options to make pthread_create available
5890# Some compilers won't report that they do not support -Kpthread,
5891# so we need to run a program to see whether it really made the
5892# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
5894$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005895if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005896 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005897else
5898 ac_save_cc="$CC"
5899CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005900if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005901 ac_cv_kpthread=no
5902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005904/* end confdefs.h. */
5905
5906#include <pthread.h>
5907
5908void* routine(void* p){return NULL;}
5909
5910int main(){
5911 pthread_t p;
5912 if(pthread_create(&p,NULL,routine,NULL)!=0)
5913 return 1;
5914 (void)pthread_detach(p);
5915 return 0;
5916}
5917
5918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005919if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005920 ac_cv_kpthread=yes
5921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005922 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005926fi
5927
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005928CC="$ac_save_cc"
5929fi
5930
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
5932$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005933fi
5934
5935if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5936then
5937# -Kthread, if available, provides the right #defines
5938# and linker options to make pthread_create available
5939# Some compilers won't report that they do not support -Kthread,
5940# so we need to run a program to see whether it really made the
5941# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
5943$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005944if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946else
5947 ac_save_cc="$CC"
5948CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005949if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950 ac_cv_kthread=no
5951else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005953/* end confdefs.h. */
5954
5955#include <pthread.h>
5956
5957void* routine(void* p){return NULL;}
5958
5959int main(){
5960 pthread_t p;
5961 if(pthread_create(&p,NULL,routine,NULL)!=0)
5962 return 1;
5963 (void)pthread_detach(p);
5964 return 0;
5965}
5966
5967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005969 ac_cv_kthread=yes
5970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975fi
5976
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977CC="$ac_save_cc"
5978fi
5979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
5981$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982fi
5983
5984if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5985then
5986# -pthread, if available, provides the right #defines
5987# and linker options to make pthread_create available
5988# Some compilers won't report that they do not support -pthread,
5989# so we need to run a program to see whether it really made the
5990# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
5992$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005993if ${ac_cv_thread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005994 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005995else
5996 ac_save_cc="$CC"
5997CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005998if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005999 ac_cv_pthread=no
6000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002/* end confdefs.h. */
6003
6004#include <pthread.h>
6005
6006void* routine(void* p){return NULL;}
6007
6008int main(){
6009 pthread_t p;
6010 if(pthread_create(&p,NULL,routine,NULL)!=0)
6011 return 1;
6012 (void)pthread_detach(p);
6013 return 0;
6014}
6015
6016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006017if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018 ac_cv_pthread=yes
6019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006020 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006024fi
6025
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026CC="$ac_save_cc"
6027fi
6028
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6030$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006031fi
6032
6033# If we have set a CC compiler flag for thread support then
6034# check if it works for CXX, too.
6035ac_cv_cxx_thread=no
6036if test ! -z "$CXX"
6037then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6039$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006040ac_save_cxx="$CXX"
6041
6042if test "$ac_cv_kpthread" = "yes"
6043then
6044 CXX="$CXX -Kpthread"
6045 ac_cv_cxx_thread=yes
6046elif test "$ac_cv_kthread" = "yes"
6047then
6048 CXX="$CXX -Kthread"
6049 ac_cv_cxx_thread=yes
6050elif test "$ac_cv_pthread" = "yes"
6051then
6052 CXX="$CXX -pthread"
6053 ac_cv_cxx_thread=yes
6054fi
6055
6056if test $ac_cv_cxx_thread = yes
6057then
6058 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6059 $CXX -c conftest.$ac_ext 2>&5
6060 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6061 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6062 then
6063 ac_cv_cxx_thread=yes
6064 else
6065 ac_cv_cxx_thread=no
6066 fi
6067 rm -fr conftest*
6068fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6070$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006071fi
6072CXX="$ac_save_cxx"
6073
6074
6075# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6077$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006078if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006079 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082/* end confdefs.h. */
6083#include <stdlib.h>
6084#include <stdarg.h>
6085#include <string.h>
6086#include <float.h>
6087
6088int
6089main ()
6090{
6091
6092 ;
6093 return 0;
6094}
6095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006096if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006097 ac_cv_header_stdc=yes
6098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006099 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006100fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102
6103if test $ac_cv_header_stdc = yes; then
6104 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106/* end confdefs.h. */
6107#include <string.h>
6108
6109_ACEOF
6110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006111 $EGREP "memchr" >/dev/null 2>&1; then :
6112
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006113else
6114 ac_cv_header_stdc=no
6115fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006116rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006117
6118fi
6119
6120if test $ac_cv_header_stdc = yes; then
6121 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006123/* end confdefs.h. */
6124#include <stdlib.h>
6125
6126_ACEOF
6127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006128 $EGREP "free" >/dev/null 2>&1; then :
6129
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006130else
6131 ac_cv_header_stdc=no
6132fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006133rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006134
6135fi
6136
6137if test $ac_cv_header_stdc = yes; then
6138 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006139 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006140 :
6141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006143/* end confdefs.h. */
6144#include <ctype.h>
6145#include <stdlib.h>
6146#if ((' ' & 0x0FF) == 0x020)
6147# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6148# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6149#else
6150# define ISLOWER(c) \
6151 (('a' <= (c) && (c) <= 'i') \
6152 || ('j' <= (c) && (c) <= 'r') \
6153 || ('s' <= (c) && (c) <= 'z'))
6154# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6155#endif
6156
6157#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6158int
6159main ()
6160{
6161 int i;
6162 for (i = 0; i < 256; i++)
6163 if (XOR (islower (i), ISLOWER (i))
6164 || toupper (i) != TOUPPER (i))
6165 return 2;
6166 return 0;
6167}
6168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006169if ac_fn_c_try_run "$LINENO"; then :
6170
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006172 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006173fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006176fi
6177
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006178fi
6179fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6181$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006182if test $ac_cv_header_stdc = yes; then
6183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006184$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006185
6186fi
6187
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006188for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6189fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006190ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006191shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006192unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006193sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6194sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006195sys/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 +00006196sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006197sys/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 +00006198sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006199bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006200do :
6201 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6202ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006203if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006204 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006205#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006206_ACEOF
6207
6208fi
6209
Guido van Rossum627b2d71993-12-24 10:39:16 +00006210done
6211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006212ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006213for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006214 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6216$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006217if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006218 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006221/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006222#include <sys/types.h>
6223#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006224
Martin v. Löwis11437992002-04-12 09:54:03 +00006225int
6226main ()
6227{
6228if ((DIR *) 0)
6229return 0;
6230 ;
6231 return 0;
6232}
6233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006235 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006237 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006241eval ac_res=\$$as_ac_Header
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6243$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006244if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006245 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006246#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006247_ACEOF
6248
6249ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006250fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252done
6253# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6254if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6256$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006257if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006258 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006259else
Martin v. Löwis11437992002-04-12 09:54:03 +00006260 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006263
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264/* Override any GCC internal prototype to avoid an error.
6265 Use char because int might match the return type of a GCC
6266 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006267#ifdef __cplusplus
6268extern "C"
6269#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006270char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006271int
6272main ()
6273{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006274return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006275 ;
6276 return 0;
6277}
6278_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279for ac_lib in '' dir; do
6280 if test -z "$ac_lib"; then
6281 ac_res="none required"
6282 else
6283 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006284 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006285 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006286 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006289rm -f core conftest.err conftest.$ac_objext \
6290 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006291 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006292 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006294done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006295if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296
Martin v. Löwiseba40652007-08-30 20:10:57 +00006297else
6298 ac_cv_search_opendir=no
6299fi
6300rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006301LIBS=$ac_func_search_save_LIBS
6302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6304$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006305ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006307 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006309fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006310
Michael W. Hudson54241132001-12-07 15:38:26 +00006311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6313$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006314if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006315 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006316else
6317 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006320
Martin v. Löwiseba40652007-08-30 20:10:57 +00006321/* Override any GCC internal prototype to avoid an error.
6322 Use char because int might match the return type of a GCC
6323 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006324#ifdef __cplusplus
6325extern "C"
6326#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006327char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006328int
6329main ()
6330{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006331return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006332 ;
6333 return 0;
6334}
6335_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006336for ac_lib in '' x; do
6337 if test -z "$ac_lib"; then
6338 ac_res="none required"
6339 else
6340 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006341 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006342 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006344 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006345fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006346rm -f core conftest.err conftest.$ac_objext \
6347 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006348 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006349 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006352if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353
Martin v. Löwiseba40652007-08-30 20:10:57 +00006354else
6355 ac_cv_search_opendir=no
6356fi
6357rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006358LIBS=$ac_func_search_save_LIBS
6359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6361$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006363if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006364 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006365
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006366fi
6367
6368fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6371$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006372if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006376/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006377#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006378int
6379main ()
6380{
6381return makedev(0, 0);
6382 ;
6383 return 0;
6384}
6385_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006387 ac_cv_header_sys_types_h_makedev=yes
6388else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006389 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006391rm -f core conftest.err conftest.$ac_objext \
6392 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006393
6394fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6396$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006397
6398if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006399ac_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 +01006400if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006402$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006403
6404fi
6405
6406
6407
6408 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006409 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 +01006410if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006411
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006412$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006413
6414fi
6415
6416
6417 fi
6418fi
6419
Michael W. Hudson54241132001-12-07 15:38:26 +00006420
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006421# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006422for ac_header in term.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006423do :
6424 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006425#ifdef HAVE_CURSES_H
6426#include <curses.h>
6427#endif
6428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006429"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006430if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006431 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006432#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006433_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006434
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006435fi
6436
6437done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006438
6439
Martin v. Löwis11017b12006-01-14 18:12:57 +00006440# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006441for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006442do :
6443 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 +00006444#ifdef HAVE_ASM_TYPES_H
6445#include <asm/types.h>
6446#endif
6447#ifdef HAVE_SYS_SOCKET_H
6448#include <sys/socket.h>
6449#endif
6450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006451"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006452if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006453 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006454#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006455_ACEOF
6456
6457fi
6458
6459done
6460
6461
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006463was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6465$as_echo_n "checking for clock_t in time.h... " >&6; }
6466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006467/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006469
6470_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006472 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006473 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474else
Martin v. Löwis11437992002-04-12 09:54:03 +00006475
6476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006477$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006478
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006479
Guido van Rossum627b2d71993-12-24 10:39:16 +00006480fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006481rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6484$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006485
Neal Norwitz11690112002-07-30 01:08:28 +00006486# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6488$as_echo_n "checking for makedev... " >&6; }
6489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006490/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006491
6492#if defined(MAJOR_IN_MKDEV)
6493#include <sys/mkdev.h>
6494#elif defined(MAJOR_IN_SYSMACROS)
6495#include <sys/sysmacros.h>
6496#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006497#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006498#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006499int
6500main ()
6501{
6502 makedev(0, 0)
6503 ;
6504 return 0;
6505}
6506_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006507if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006508 ac_cv_has_makedev=yes
6509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006510 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006512rm -f core conftest.err conftest.$ac_objext \
6513 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006514if test "$ac_cv_has_makedev" = "no"; then
6515 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006517/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006518
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006519#define _OSF_SOURCE 1
6520#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006521
Neal Norwitz11690112002-07-30 01:08:28 +00006522int
6523main ()
6524{
6525 makedev(0, 0)
6526 ;
6527 return 0;
6528}
6529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006530if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006531 ac_cv_has_makedev=yes
6532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006533 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006535rm -f core conftest.err conftest.$ac_objext \
6536 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006537 if test "$ac_cv_has_makedev" = "yes"; then
6538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006539$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006540
6541 fi
6542fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6544$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006545if test "$ac_cv_has_makedev" = "yes"; then
6546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006547$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006548
6549fi
6550
Martin v. Löwis399a6892002-10-04 10:22:02 +00006551# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6552# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6553# defined, but the compiler does not support pragma redefine_extname,
6554# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6555# structures (such as rlimit64) without declaring them. As a
6556# work-around, disable LFS on such configurations
6557
6558use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6560$as_echo_n "checking Solaris LFS bug... " >&6; }
6561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006562/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006563
6564#define _LARGEFILE_SOURCE 1
6565#define _FILE_OFFSET_BITS 64
6566#include <sys/resource.h>
6567
Martin v. Löwis399a6892002-10-04 10:22:02 +00006568int
6569main ()
6570{
6571struct rlimit foo;
6572 ;
6573 return 0;
6574}
6575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006577 sol_lfs_bug=no
6578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006579 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6583$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006584if test "$sol_lfs_bug" = "yes"; then
6585 use_lfs=no
6586fi
6587
6588if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006589# Two defines needed to enable largefile support on various platforms
6590# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00006591case $ac_sys_system/$ac_sys_release in
6592AIX*)
6593
6594$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6595
6596 ;;
6597esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006598
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006599$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006600
6601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006603
Martin v. Löwis399a6892002-10-04 10:22:02 +00006604fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006605
Guido van Rossum84e7b241996-08-19 21:59:00 +00006606# Add some code to confdefs.h so that the test for off_t works on SCO
6607cat >> confdefs.h <<\EOF
6608#if defined(SCO_DS)
6609#undef _OFF_T
6610#endif
6611EOF
6612
Guido van Rossumef2255b2000-03-10 22:30:29 +00006613# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006614ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006615if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006616
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006617else
Martin v. Löwis11437992002-04-12 09:54:03 +00006618
6619cat >>confdefs.h <<_ACEOF
6620#define mode_t int
6621_ACEOF
6622
6623fi
6624
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006625ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006626if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006627
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006628else
Martin v. Löwis11437992002-04-12 09:54:03 +00006629
6630cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006631#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006632_ACEOF
6633
6634fi
6635
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006636ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006637if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006638
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006639else
Martin v. Löwis11437992002-04-12 09:54:03 +00006640
6641cat >>confdefs.h <<_ACEOF
6642#define pid_t int
6643_ACEOF
6644
6645fi
6646
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006647
Martin v. Löwis11437992002-04-12 09:54:03 +00006648cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00006649#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006650_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006652ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006653if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006654
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006655else
Martin v. Löwis11437992002-04-12 09:54:03 +00006656
6657cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006658#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006659_ACEOF
6660
6661fi
6662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6664$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006665if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006667else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006670#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006671
6672_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006675 ac_cv_type_uid_t=yes
6676else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006677 ac_cv_type_uid_t=no
6678fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006679rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006680
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6683$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006684if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006687
6688
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006690
6691fi
6692
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006693ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6694case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006695 no|yes) ;; #(
6696 *)
6697
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006698$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006699
6700
6701cat >>confdefs.h <<_ACEOF
6702#define uint32_t $ac_cv_c_uint32_t
6703_ACEOF
6704;;
6705 esac
6706
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6708case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006709 no|yes) ;; #(
6710 *)
6711
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006712$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006713
6714
6715cat >>confdefs.h <<_ACEOF
6716#define uint64_t $ac_cv_c_uint64_t
6717_ACEOF
6718;;
6719 esac
6720
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6722case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006723 no|yes) ;; #(
6724 *)
6725
6726cat >>confdefs.h <<_ACEOF
6727#define int32_t $ac_cv_c_int32_t
6728_ACEOF
6729;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006730esac
6731
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006732ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6733case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00006734 no|yes) ;; #(
6735 *)
6736
6737cat >>confdefs.h <<_ACEOF
6738#define int64_t $ac_cv_c_int64_t
6739_ACEOF
6740;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006741esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00006742
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006744if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006745
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00006747
6748fi
6749
Jack Jansendd19cf82001-12-06 22:36:17 +00006750
Michael W. Hudson54241132001-12-07 15:38:26 +00006751# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006752# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753# The cast to long int works around a bug in the HP C Compiler
6754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6756# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6758$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006759if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006761else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006762 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 +00006763
Martin v. Löwis11437992002-04-12 09:54:03 +00006764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765 if test "$ac_cv_type_int" = yes; then
6766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006768as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006769See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770 else
6771 ac_cv_sizeof_int=0
6772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006774
Martin v. Löwis11437992002-04-12 09:54:03 +00006775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6777$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778
6779
6780
Martin v. Löwis11437992002-04-12 09:54:03 +00006781cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006782#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006783_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006784
6785
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786# The cast to long int works around a bug in the HP C Compiler
6787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6789# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6791$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006792if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795 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 +00006796
Martin v. Löwis11437992002-04-12 09:54:03 +00006797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798 if test "$ac_cv_type_long" = yes; then
6799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006801as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006802See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803 else
6804 ac_cv_sizeof_long=0
6805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006807
Martin v. Löwis11437992002-04-12 09:54:03 +00006808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6810$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006811
6812
6813
Martin v. Löwis11437992002-04-12 09:54:03 +00006814cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006815#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006816_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006817
6818
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819# The cast to long int works around a bug in the HP C Compiler
6820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6824$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006825if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006826 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828 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 +00006829
Martin v. Löwis11437992002-04-12 09:54:03 +00006830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 if test "$ac_cv_type_void_p" = yes; then
6832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006834as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006835See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006836 else
6837 ac_cv_sizeof_void_p=0
6838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6843$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006844
6845
6846
Martin v. Löwis11437992002-04-12 09:54:03 +00006847cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006848#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006849_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006850
6851
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852# The cast to long int works around a bug in the HP C Compiler
6853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6855# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
6857$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006858if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 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 +00006862
Martin v. Löwis11437992002-04-12 09:54:03 +00006863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006864 if test "$ac_cv_type_short" = yes; then
6865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006867as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006868See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006869 else
6870 ac_cv_sizeof_short=0
6871 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873
Martin v. Löwis11437992002-04-12 09:54:03 +00006874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
6876$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006877
6878
6879
Martin v. Löwis11437992002-04-12 09:54:03 +00006880cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00006882_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006883
6884
Martin v. Löwiseba40652007-08-30 20:10:57 +00006885# The cast to long int works around a bug in the HP C Compiler
6886# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6887# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6888# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
6890$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006891if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006894 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 +00006895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897 if test "$ac_cv_type_float" = yes; then
6898 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006900as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006902 else
6903 ac_cv_sizeof_float=0
6904 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906
Martin v. Löwis11437992002-04-12 09:54:03 +00006907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
6909$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910
6911
6912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006914#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00006915_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006916
6917
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918# The cast to long int works around a bug in the HP C Compiler
6919# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6920# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6921# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
6923$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006924if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006926else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006927 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 +00006928
Martin v. Löwis11437992002-04-12 09:54:03 +00006929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930 if test "$ac_cv_type_double" = yes; then
6931 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006933as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006934See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006935 else
6936 ac_cv_sizeof_double=0
6937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006938fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
6942$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006943
6944
6945
Martin v. Löwis11437992002-04-12 09:54:03 +00006946cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006947#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00006948_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00006949
6950
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951# The cast to long int works around a bug in the HP C Compiler
6952# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6953# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6954# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
6956$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006957if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006958 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960 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 +00006961
Martin v. Löwis11437992002-04-12 09:54:03 +00006962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006963 if test "$ac_cv_type_fpos_t" = yes; then
6964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006966as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01006967See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968 else
6969 ac_cv_sizeof_fpos_t=0
6970 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006972
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
6975$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006976
6977
6978
Martin v. Löwis11437992002-04-12 09:54:03 +00006979cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006980#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00006982
Michael W. Hudson54241132001-12-07 15:38:26 +00006983
Martin v. Löwiseba40652007-08-30 20:10:57 +00006984# The cast to long int works around a bug in the HP C Compiler
6985# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6986# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6987# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
6989$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006990if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006993 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 +00006994
Martin v. Löwis18e16552006-02-15 17:27:45 +00006995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996 if test "$ac_cv_type_size_t" = yes; then
6997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006999as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007000See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007001 else
7002 ac_cv_sizeof_size_t=0
7003 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007004fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005
Martin v. Löwis18e16552006-02-15 17:27:45 +00007006fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7008$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007009
7010
7011
Martin v. Löwis18e16552006-02-15 17:27:45 +00007012cat >>confdefs.h <<_ACEOF
7013#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7014_ACEOF
7015
7016
Christian Heimes951cc0f2008-01-31 23:08:23 +00007017# The cast to long int works around a bug in the HP C Compiler
7018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7020# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7022$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007023if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007024 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007026 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 +00007027
Christian Heimes951cc0f2008-01-31 23:08:23 +00007028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029 if test "$ac_cv_type_pid_t" = yes; then
7030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007032as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007033See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007034 else
7035 ac_cv_sizeof_pid_t=0
7036 fi
7037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007038
Christian Heimes951cc0f2008-01-31 23:08:23 +00007039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7041$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007042
7043
7044
7045cat >>confdefs.h <<_ACEOF
7046#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7047_ACEOF
7048
7049
Michael W. Hudson54241132001-12-07 15:38:26 +00007050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7052$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007053have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007055/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007056
Martin v. Löwis11437992002-04-12 09:54:03 +00007057int
7058main ()
7059{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007060long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 ;
7062 return 0;
7063}
7064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007065if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
7067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007069
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007070 have_long_long=yes
7071
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7075$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007076if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007077# The cast to long int works around a bug in the HP C Compiler
7078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7080# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7082$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007083if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007086 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 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089 if test "$ac_cv_type_long_long" = yes; then
7090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007092as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007093See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007094 else
7095 ac_cv_sizeof_long_long=0
7096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007098
Martin v. Löwis11437992002-04-12 09:54:03 +00007099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7101$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007102
7103
7104
Martin v. Löwis11437992002-04-12 09:54:03 +00007105cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007106#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007107_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007108
Michael W. Hudson54241132001-12-07 15:38:26 +00007109
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007110fi
7111
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7113$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007114have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007116/* end confdefs.h. */
7117
7118int
7119main ()
7120{
Matthias Klosec511b472010-05-08 11:01:39 +00007121long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007122 ;
7123 return 0;
7124}
7125_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007126if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007127
7128
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007130
7131 have_long_double=yes
7132
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007133fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7136$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007137if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007138# The cast to long int works around a bug in the HP C Compiler
7139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7141# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7143$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007144if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147 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 +00007148
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007149else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007150 if test "$ac_cv_type_long_double" = yes; then
7151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007153as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007154See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007155 else
7156 ac_cv_sizeof_long_double=0
7157 fi
7158fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007159
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7162$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007163
7164
7165
7166cat >>confdefs.h <<_ACEOF
7167#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7168_ACEOF
7169
7170
7171fi
7172
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7174$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007175have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007177/* end confdefs.h. */
7178
7179int
7180main ()
7181{
7182_Bool x; x = (_Bool)0;
7183 ;
7184 return 0;
7185}
7186_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007188
7189
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007191
7192 have_c99_bool=yes
7193
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7197$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007198if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199# The cast to long int works around a bug in the HP C Compiler
7200# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7201# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7202# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7204$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007205if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007208 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 +00007209
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007210else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007211 if test "$ac_cv_type__Bool" = yes; then
7212 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007214as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007215See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007216 else
7217 ac_cv_sizeof__Bool=0
7218 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7223$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007224
7225
7226
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007227cat >>confdefs.h <<_ACEOF
7228#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7229_ACEOF
7230
7231
7232fi
7233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007234ac_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 +00007235 #include <stdint.h>
7236 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007237 #ifdef HAVE_INTTYPES_H
7238 #include <inttypes.h>
7239 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007241if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007242
7243cat >>confdefs.h <<_ACEOF
7244#define HAVE_UINTPTR_T 1
7245_ACEOF
7246
Martin v. Löwiseba40652007-08-30 20:10:57 +00007247# The cast to long int works around a bug in the HP C Compiler
7248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7250# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7252$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007253if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007256 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 +00007257
Martin v. Löwis11437992002-04-12 09:54:03 +00007258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259 if test "$ac_cv_type_uintptr_t" = yes; then
7260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007262as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007263See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264 else
7265 ac_cv_sizeof_uintptr_t=0
7266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007267fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268
Martin v. Löwis11437992002-04-12 09:54:03 +00007269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7271$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007272
7273
7274
Martin v. Löwis11437992002-04-12 09:54:03 +00007275cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007276#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007277_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007278
Michael W. Hudson54241132001-12-07 15:38:26 +00007279
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007280fi
7281
Martin v. Löwisebe26702006-10-02 14:55:51 +00007282
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007283# The cast to long int works around a bug in the HP C Compiler
7284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7286# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7288$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007289if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007292 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007293#ifdef HAVE_SYS_TYPES_H
7294#include <sys/types.h>
7295#endif
7296
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007297"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007298
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007300 if test "$ac_cv_type_off_t" = yes; then
7301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007303as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007304See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007305 else
7306 ac_cv_sizeof_off_t=0
7307 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007308fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007309
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007310fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7312$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007313
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007314
7315
Martin v. Löwis11437992002-04-12 09:54:03 +00007316cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007317#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007318_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007319
Michael W. Hudson54241132001-12-07 15:38:26 +00007320
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007321
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7323$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007324if test "$have_long_long" = yes
7325then
7326if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007327 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7332$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007336fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7339$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007340fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007341
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007342# The cast to long int works around a bug in the HP C Compiler
7343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7345# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7347$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007348if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007349 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007352#ifdef HAVE_SYS_TYPES_H
7353#include <sys/types.h>
7354#endif
7355#ifdef HAVE_TIME_H
7356#include <time.h>
7357#endif
7358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007360
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007362 if test "$ac_cv_type_time_t" = yes; then
7363 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007365as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007366See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007367 else
7368 ac_cv_sizeof_time_t=0
7369 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7374$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007375
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007376
7377
Martin v. Löwis11437992002-04-12 09:54:03 +00007378cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007379#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007380_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
7383
Trent Mick635f6fb2000-08-23 21:33:05 +00007384# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007385ac_save_cc="$CC"
7386if test "$ac_cv_kpthread" = "yes"
7387then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007388elif test "$ac_cv_kthread" = "yes"
7389then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007390elif test "$ac_cv_pthread" = "yes"
7391then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007392fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7394$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007395have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007397/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00007398
7399 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007400int
7401main ()
7402{
Guido van Rossum12580492000-09-24 16:47:19 +00007403pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007404 ;
7405 return 0;
7406}
Matthias Klosec511b472010-05-08 11:01:39 +00007407
Martin v. Löwis11437992002-04-12 09:54:03 +00007408_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007410 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7414$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007415if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007416 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007417# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7418# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7419# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7421$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007422if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007425 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007426#ifdef HAVE_PTHREAD_H
7427#include <pthread.h>
7428#endif
7429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007430"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007431
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007432else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433 if test "$ac_cv_type_pthread_t" = yes; then
7434 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007436as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007437See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007438 else
7439 ac_cv_sizeof_pthread_t=0
7440 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007442
Trent Mick635f6fb2000-08-23 21:33:05 +00007443fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7445$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007446
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007447
7448
Martin v. Löwis11437992002-04-12 09:54:03 +00007449cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007450#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007451_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007452
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007453
Trent Mick635f6fb2000-08-23 21:33:05 +00007454fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007455CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
7458$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007459# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461 enableval=$enable_toolbox_glue;
7462fi
Jack Jansene578a632001-08-15 01:27:14 +00007463
7464
7465if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00007466then
Jack Jansene578a632001-08-15 01:27:14 +00007467 case $ac_sys_system/$ac_sys_release in
7468 Darwin/*)
7469 enable_toolbox_glue="yes";;
7470 *)
7471 enable_toolbox_glue="no";;
7472 esac
7473fi
7474case "$enable_toolbox_glue" in
7475yes)
Jack Jansene578a632001-08-15 01:27:14 +00007476 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007477 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00007478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007479$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00007480
7481 ;;
7482*)
Jack Jansene578a632001-08-15 01:27:14 +00007483 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00007484 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00007485 ;;
7486esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
7488$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007489
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007490
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007491
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007492case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007493 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007494 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7495 ;;
7496 Darwin/*)
7497 OTHER_LIBTOOL_OPT=""
7498 ;;
7499esac
7500
7501
Ronald Oussoren25967582009-09-06 10:00:26 +00007502ARCH_RUN_32BIT=""
7503
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007504case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00007505 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00007506 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7507 if test "${enable_universalsdk}"; then
7508 :
7509 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007510 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007511 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007512 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007513 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007514 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00007515 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007516 if test ${gcc_version} '<' 4.0
7517 then
7518 LIBTOOL_CRUFT="-lcc_dynamic"
7519 else
7520 LIBTOOL_CRUFT=""
7521 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00007523 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00007524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007526/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00007527
Ronald Oussoren25967582009-09-06 10:00:26 +00007528 #include <unistd.h>
7529 int main(int argc, char*argv[])
7530 {
7531 if (sizeof(long) == 4) {
7532 return 0;
7533 } else {
7534 return 1;
7535 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00007536 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00007537
Ronald Oussoren25967582009-09-06 10:00:26 +00007538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00007540 ac_osx_32bit=yes
7541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007542 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00007543fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00007546fi
7547
7548
Ronald Oussoren25967582009-09-06 10:00:26 +00007549 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007550 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007551 i386)
7552 MACOSX_DEFAULT_ARCH="i386"
7553 ;;
7554 ppc)
7555 MACOSX_DEFAULT_ARCH="ppc"
7556 ;;
7557 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007558 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007559 ;;
7560 esac
7561 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00007562 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00007563 i386)
7564 MACOSX_DEFAULT_ARCH="x86_64"
7565 ;;
7566 ppc)
7567 MACOSX_DEFAULT_ARCH="ppc64"
7568 ;;
7569 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007570 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00007571 ;;
7572 esac
7573
7574 #ARCH_RUN_32BIT="true"
7575 fi
7576
7577 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007578 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007579 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007580esac
7581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7583$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007584if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007585then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007586 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007587 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007588 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007590$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007591
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7593$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00007594 if test $enable_shared = "yes"
7595 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007596 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 +00007597 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7600$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007601fi
7602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7604$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007605case $ac_sys_system/$ac_sys_release in
7606 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007607
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007608$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7611$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007612 ;;
7613 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7615$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007616 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007617esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007618
Guido van Rossum0a516c91994-09-12 10:58:40 +00007619# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007620
Michael W. Hudson54241132001-12-07 15:38:26 +00007621
7622
7623
7624
Ronald Oussoren75912852010-04-08 08:13:31 +00007625
Guido van Rossum0a516c91994-09-12 10:58:40 +00007626# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00007627# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
7629$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007630if test -z "$SO"
7631then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007632 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00007633 hp*|HP*)
7634 case `uname -m` in
7635 ia64) SO=.so;;
7636 *) SO=.sl;;
7637 esac
7638 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00007639 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00007640 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007641 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00007642else
7643 # this might also be a termcap variable, see #610332
7644 echo
7645 echo '====================================================================='
7646 echo '+ +'
7647 echo '+ WARNING: You have set SO in your environment. +'
7648 echo '+ Do you really mean to change the extension for shared libraries? +'
7649 echo '+ Continuing in 10 seconds to let you to ponder. +'
7650 echo '+ +'
7651 echo '====================================================================='
7652 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
7655$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00007656
Ronald Oussoren79f90492009-01-02 10:44:46 +00007657
Neal Norwitz58e28882006-05-19 07:00:58 +00007658cat >>confdefs.h <<_ACEOF
7659#define SHLIB_EXT "$SO"
7660_ACEOF
7661
Guido van Rossum0a516c91994-09-12 10:58:40 +00007662# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007663# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007664# (Shared libraries in this instance are shared modules to be loaded into
7665# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7667$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007668if test -z "$LDSHARED"
7669then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007670 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007671 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007672 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007673 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007674 ;;
7675 BeOS*)
7676 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00007677 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007678 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007679 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007680 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007681 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007682 if test "$GCC" = "yes" ; then
7683 LDSHARED='$(CC) -shared'
7684 LDCXXSHARED='$(CXX) -shared'
7685 else
7686 LDSHARED='$(CC) -G'
7687 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00007688 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00007689 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007690 if test "$GCC" = "yes" ; then
7691 LDSHARED='$(CC) -shared'
7692 LDCXXSHARED='$(CXX) -shared'
7693 else
7694 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00007695 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00007696 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00007697 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007698 LDSHARED='$(CC) -bundle'
7699 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007700 if test "$enable_framework" ; then
7701 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007702 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7703 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007704 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007705 else
7706 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007707 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00007708 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007709 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007710 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007711 LDSHARED='$(CC) -bundle'
7712 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007713 if test "$enable_framework" ; then
7714 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007715 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7716 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007717 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007718 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007719 # No framework, use the Python app as bundle-loader
7720 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007721 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007722 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007723 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007724 Darwin/*)
7725 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7726 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00007727
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007728 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007729 then
Ronald Oussoren988117f2006-04-29 11:31:35 +00007730 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00007731 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +00007732 fi
Stefan Krah3a3e2032010-11-28 15:30:05 +00007733 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7734 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007735 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007736 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007737 LDSHARED='$(CC) -bundle'
7738 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007739 if test "$enable_framework" ; then
7740 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007741 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7742 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007743 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007744 else
7745 # No framework, use the Python app as bundle-loader
7746 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7747 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00007748 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007749 fi
7750 fi
7751 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007752 Linux*|GNU*|QNX*)
7753 LDSHARED='$(CC) -shared'
7754 LDCXXSHARED='$(CXX) -shared';;
7755 BSD/OS*/4*)
7756 LDSHARED="gcc -shared"
7757 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007758 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007759 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007760 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007761 LDSHARED='$(CC) -shared'
7762 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007763 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00007764 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007765 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00007766 OpenBSD*)
7767 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7768 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00007769 LDSHARED='$(CC) -shared $(CCSHARED)'
7770 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007771 else
7772 case `uname -r` in
7773 [01].* | 2.[0-7] | 2.[0-7].*)
7774 LDSHARED="ld -Bshareable ${LDFLAGS}"
7775 ;;
7776 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00007777 LDSHARED='$(CC) -shared $(CCSHARED)'
7778 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00007779 ;;
7780 esac
7781 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007782 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00007783 LDSHARED='$(CC) -shared'
7784 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007785 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00007786 if test "$GCC" = "yes" ; then
7787 LDSHARED='$(CC) -shared'
7788 LDCXXSHARED='$(CXX) -shared'
7789 else
7790 LDSHARED='$(CC) -G'
7791 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007792 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00007793 SCO_SV*)
7794 LDSHARED='$(CC) -Wl,-G,-Bexport'
7795 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
7796 CYGWIN*)
7797 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
7798 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
7799 atheos*)
7800 LDSHARED="gcc -shared"
7801 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007802 *) LDSHARED="ld";;
7803 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
7806$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00007807LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007808BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00007809# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007810# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
7812$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007813if test -z "$CCSHARED"
7814then
Guido van Rossum07397971997-04-29 21:49:50 +00007815 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007816 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00007817 then CCSHARED="-fPIC";
7818 elif test `uname -p` = sparc;
7819 then CCSHARED="-xcode=pic32";
7820 else CCSHARED="-Kpic";
7821 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00007822 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00007823 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00007824 else CCSHARED="+z";
7825 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007826 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007827 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007828 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007829 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00007830 if test "$GCC" = "yes"
7831 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00007832 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00007833 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007834 SCO_SV*)
7835 if test "$GCC" = "yes"
7836 then CCSHARED="-fPIC"
7837 else CCSHARED="-Kpic -belf"
7838 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007839 IRIX*/6*) case $CC in
7840 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00007841 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007842 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007843 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007844 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
7847$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007848# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007849# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
7851$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007852if test -z "$LINKFORSHARED"
7853then
Guido van Rossum07397971997-04-29 21:49:50 +00007854 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007855 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007856 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00007857 LINKFORSHARED="-Wl,-E -Wl,+s";;
7858# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00007859 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00007860 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007861 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007863 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
7864 # which is
Jack Jansene578a632001-08-15 01:27:14 +00007865 # not used by the core itself but which needs to be in the core so
7866 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00007867 # -prebind is no longer used, because it actually seems to give a
7868 # slowdown in stead of a speedup, maybe due to the large number of
7869 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007870
7871 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00007872 if test "$enable_framework"
7873 then
Jack Jansenda49e192005-01-07 13:08:22 +00007874 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007875 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00007876 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007877 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00007878 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00007879 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00007880 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00007881 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7882 then
7883 LINKFORSHARED="-Wl,--export-dynamic"
7884 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007885 SunOS/5*) case $CC in
7886 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00007887 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00007888 then
7889 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00007890 fi;;
7891 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00007892 CYGWIN*)
7893 if test $enable_shared = "no"
7894 then
7895 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
7896 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007897 QNX*)
7898 # -Wl,-E causes the symbols to be added to the dynamic
7899 # symbol table so that they can be found when a module
7900 # is loaded. -N 2048K causes the stack size to be set
7901 # to 2048 kilobytes so that the stack doesn't overflow
7902 # when running test_compile.py.
7903 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00007904 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00007905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
7907$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007908
Michael W. Hudson54241132001-12-07 15:38:26 +00007909
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00007910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
7912$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007913if test ! "$LIBRARY" = "$LDLIBRARY"
7914then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00007915 case $ac_sys_system in
7916 CYGWIN*)
7917 # Cygwin needs CCSHARED when building extension DLLs
7918 # but not when building the interpreter DLL.
7919 CFLAGSFORSHARED='';;
7920 *)
7921 CFLAGSFORSHARED='$(CCSHARED)'
7922 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
7925$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007926
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007927# SHLIBS are libraries (except -lc and -lm) to link to the python shared
7928# library (with --enable-shared).
7929# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007930# symbols, this must be set to $(LIBS) (expanded by make). We do this even
7931# if it is not required, since it creates a dependency of the shared library
7932# to LIBS. This, in turn, means that applications linking the shared libpython
7933# don't need to link LIBS explicitly. The default should be only changed
7934# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007935
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
7937$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007938case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007939 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00007940 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007941esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
7943$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00007944
7945
Guido van Rossum627b2d71993-12-24 10:39:16 +00007946# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
7948$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007949if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007951else
Martin v. Löwis11437992002-04-12 09:54:03 +00007952 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007953LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007956
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957/* Override any GCC internal prototype to avoid an error.
7958 Use char because int might match the return type of a GCC
7959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007960#ifdef __cplusplus
7961extern "C"
7962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007963char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007967return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007968 ;
7969 return 0;
7970}
7971_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007979LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00007980fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
7982$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007983if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007984 cat >>confdefs.h <<_ACEOF
7985#define HAVE_LIBDL 1
7986_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007987
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007988 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990fi
7991 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
7993$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007994if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007996else
Martin v. Löwis11437992002-04-12 09:54:03 +00007997 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007998LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008001
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002/* Override any GCC internal prototype to avoid an error.
8003 Use char because int might match the return type of a GCC
8004 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008005#ifdef __cplusplus
8006extern "C"
8007#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008008char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008009int
8010main ()
8011{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 ;
8014 return 0;
8015}
8016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008020 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008022rm -f core conftest.err conftest.$ac_objext \
8023 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008024LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8027$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008028if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008029 cat >>confdefs.h <<_ACEOF
8030#define HAVE_LIBDLD 1
8031_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008033 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008035fi
8036 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008037
Ronald Oussoren79f90492009-01-02 10:44:46 +00008038# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008039if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8041$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008042if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008044else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008045 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008048
Martin v. Löwiseba40652007-08-30 20:10:57 +00008049/* Override any GCC internal prototype to avoid an error.
8050 Use char because int might match the return type of a GCC
8051 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008052#ifdef __cplusplus
8053extern "C"
8054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008055char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008056int
8057main ()
8058{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ;
8061 return 0;
8062}
8063_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064for ac_lib in '' pthread rt posix4; do
8065 if test -z "$ac_lib"; then
8066 ac_res="none required"
8067 else
8068 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008071 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074rm -f core conftest.err conftest.$ac_objext \
8075 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008076 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008077 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008080if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008081
Martin v. Löwiseba40652007-08-30 20:10:57 +00008082else
8083 ac_cv_search_sem_init=no
8084fi
8085rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008086LIBS=$ac_func_search_save_LIBS
8087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8089$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008090ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008093
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008094fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008095 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008096 # posix4 on Solaris 2.6
8097 # pthread (first!) on Linux
8098fi
8099
Martin v. Löwis19d17342003-06-14 21:03:05 +00008100# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8102$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008103if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008105else
8106 ac_check_lib_save_LIBS=$LIBS
8107LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008109/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008110
Martin v. Löwiseba40652007-08-30 20:10:57 +00008111/* Override any GCC internal prototype to avoid an error.
8112 Use char because int might match the return type of a GCC
8113 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008114#ifdef __cplusplus
8115extern "C"
8116#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008117char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008118int
8119main ()
8120{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008122 ;
8123 return 0;
8124}
8125_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008127 ac_cv_lib_intl_textdomain=yes
8128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008129 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008130fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008131rm -f core conftest.err conftest.$ac_objext \
8132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008133LIBS=$ac_check_lib_save_LIBS
8134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8136$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008137if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008138
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008140
8141fi
8142
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008143
8144# checks for system dependent C++ extensions support
8145case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008146 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8147$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008149/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008150
Georg Brandl94800df2011-02-25 11:09:02 +00008151 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008152int
8153main ()
8154{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008155loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ;
8157 return 0;
8158}
Matthias Klosec511b472010-05-08 11:01:39 +00008159
Martin v. Löwis11437992002-04-12 09:54:03 +00008160_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008162
Matthias Klosec511b472010-05-08 11:01:39 +00008163
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008165
Matthias Klosec511b472010-05-08 11:01:39 +00008166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008168
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008169else
Matthias Klosec511b472010-05-08 11:01:39 +00008170
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008172$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008173
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008175rm -f core conftest.err conftest.$ac_objext \
8176 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008177 *) ;;
8178esac
8179
Guido van Rossum70c7f481998-03-26 18:44:10 +00008180# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008181# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8183$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008184if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008185 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008186else
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008188LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192/* Override any GCC internal prototype to avoid an error.
8193 Use char because int might match the return type of a GCC
8194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195#ifdef __cplusplus
8196extern "C"
8197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008198char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008199int
8200main ()
8201{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008202return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008203 ;
8204 return 0;
8205}
8206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008207if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008210 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008212rm -f core conftest.err conftest.$ac_objext \
8213 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008214LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8217$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008218if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008219 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008220fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008221 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8223$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008224if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008225 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008226else
Martin v. Löwis11437992002-04-12 09:54:03 +00008227 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008228LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
Martin v. Löwiseba40652007-08-30 20:10:57 +00008232/* Override any GCC internal prototype to avoid an error.
8233 Use char because int might match the return type of a GCC
8234 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008235#ifdef __cplusplus
8236extern "C"
8237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008238char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008239int
8240main ()
8241{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008242return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008243 ;
8244 return 0;
8245}
8246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008252rm -f core conftest.err conftest.$ac_objext \
8253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008254LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008255fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8257$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008258if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008259 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008260fi
8261 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008262
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008263case "$ac_sys_system" in
8264BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8266$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008267if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008268 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008269else
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008271LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008274
Martin v. Löwiseba40652007-08-30 20:10:57 +00008275/* Override any GCC internal prototype to avoid an error.
8276 Use char because int might match the return type of a GCC
8277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008278#ifdef __cplusplus
8279extern "C"
8280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008281char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008282int
8283main ()
8284{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008285return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 ;
8287 return 0;
8288}
8289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008295rm -f core conftest.err conftest.$ac_objext \
8296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008297LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8300$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008301if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008302 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008303fi
8304 # BeOS
8305;;
8306esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00008307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8309$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008310
Martin v. Löwiseba40652007-08-30 20:10:57 +00008311# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008313 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8315$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008316LIBS="$withval $LIBS"
8317
8318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008321fi
8322
Guido van Rossum7f43da71994-08-01 12:15:30 +00008323
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008324if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008325 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8326set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8328$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008329if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008331else
8332 case $PKG_CONFIG in
8333 [\\/]* | ?:[\\/]*)
8334 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8335 ;;
8336 *)
8337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8338for as_dir in $PATH
8339do
8340 IFS=$as_save_IFS
8341 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008342 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008343 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8344 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008346 break 2
8347 fi
8348done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008349 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008350IFS=$as_save_IFS
8351
8352 ;;
8353esac
8354fi
8355PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8356if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8358$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008359else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008362fi
8363
8364
8365fi
8366if test -z "$ac_cv_path_PKG_CONFIG"; then
8367 ac_pt_PKG_CONFIG=$PKG_CONFIG
8368 # Extract the first word of "pkg-config", so it can be a program name with args.
8369set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8371$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008372if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008373 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008374else
8375 case $ac_pt_PKG_CONFIG in
8376 [\\/]* | ?:[\\/]*)
8377 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8378 ;;
8379 *)
8380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8381for as_dir in $PATH
8382do
8383 IFS=$as_save_IFS
8384 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008385 for ac_exec_ext in '' $ac_executable_extensions; do
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008386 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8387 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008388 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008389 break 2
8390 fi
8391done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008392 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008393IFS=$as_save_IFS
8394
8395 ;;
8396esac
8397fi
8398ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8399if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8401$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8404$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008405fi
8406
8407 if test "x$ac_pt_PKG_CONFIG" = x; then
8408 PKG_CONFIG=""
8409 else
8410 case $cross_compiling:$ac_tool_warned in
8411yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8413$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008414ac_tool_warned=yes ;;
8415esac
8416 PKG_CONFIG=$ac_pt_PKG_CONFIG
8417 fi
8418else
8419 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8420fi
8421
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008422
8423# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8425$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008426
8427# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008428if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008429 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008430else
8431 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008432fi
8433
8434
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8436$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008437
8438# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8440$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008441
8442# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008443if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008444 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00008445else
8446 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00008447fi
8448
8449
8450if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00008451 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8452else
8453 LIBFFI_INCLUDEDIR=""
8454fi
8455
8456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8458$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00008459
Benjamin Peterson867475c2009-04-29 20:36:25 +00008460# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8462$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008463
8464# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008465if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00008466 withval=$with_dbmliborder;
8467if test x$with_dbmliborder = xyes
8468then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008469as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008470else
8471 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8472 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8473 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008474 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00008475 fi
8476 done
8477fi
8478fi
8479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8481$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00008482
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008483# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008484
8485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8487$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008488
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008491 withval=$with_signal_module;
8492fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008493
8494
8495if test -z "$with_signal_module"
8496then with_signal_module="yes"
8497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8499$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008500
8501if test "${with_signal_module}" = "yes"; then
8502 USE_SIGNAL_MODULE=""
8503 SIGNAL_OBJS=""
8504else
8505 USE_SIGNAL_MODULE="#"
8506 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8507fi
8508
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008509# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008510
Barry Warsawc0d24d82000-06-29 16:12:00 +00008511USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
8514$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008515
Guido van Rossumec2f0731997-01-22 20:54:01 +00008516
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008518if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008519 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8521$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00008522LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00008523if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00008524 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00008525fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8528$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529fi
8530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
8532# Templates for things AC_DEFINEd more than once.
8533# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008534
8535
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
8537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8539$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
Martin v. Löwiseba40652007-08-30 20:10:57 +00008541# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008542if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543 withval=$with_threads;
8544fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008545
8546
Barry Warsawc0d24d82000-06-29 16:12:00 +00008547# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008548
Martin v. Löwiseba40652007-08-30 20:10:57 +00008549# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008550if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008551 withval=$with_thread; with_threads=$with_thread
8552fi
8553
Barry Warsawc0d24d82000-06-29 16:12:00 +00008554
8555if test -z "$with_threads"
8556then with_threads="yes"
8557fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8559$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00008560
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008561
Barry Warsawc0d24d82000-06-29 16:12:00 +00008562if test "$with_threads" = "no"
8563then
8564 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008565elif test "$ac_cv_pthread_is_default" = yes
8566then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008567 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008568
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008569 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008570 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008571
8572 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008574elif test "$ac_cv_kpthread" = "yes"
8575then
8576 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008577 if test "$ac_cv_cxx_thread" = "yes"; then
8578 CXX="$CXX -Kpthread"
8579 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008581
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008582 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008583 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008584elif test "$ac_cv_kthread" = "yes"
8585then
8586 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008587 if test "$ac_cv_cxx_thread" = "yes"; then
8588 CXX="$CXX -Kthread"
8589 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008590 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008591
8592 posix_threads=yes
8593 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008594elif test "$ac_cv_pthread" = "yes"
8595then
8596 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008597 if test "$ac_cv_cxx_thread" = "yes"; then
8598 CXX="$CXX -pthread"
8599 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008600 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008601
8602 posix_threads=yes
8603 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008604else
8605 if test ! -z "$with_threads" -a -d "$with_threads"
8606 then LDFLAGS="$LDFLAGS -L$with_threads"
8607 fi
8608 if test ! -z "$withval" -a -d "$withval"
8609 then LDFLAGS="$LDFLAGS -L$withval"
8610 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008611
8612 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008613 # define _POSIX_THREADS in unistd.h. Some apparently don't
8614 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8616$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008618/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008619
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008620#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008621#ifdef _POSIX_THREADS
8622yes
8623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008624
8625_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008626if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008627 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008628 unistd_defines_pthreads=yes
8629else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008630 unistd_defines_pthreads=no
8631fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00008632rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008633
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8635$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008637 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008638
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008639 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008640if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008641 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008642
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008643 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008644
Martin v. Löwis11437992002-04-12 09:54:03 +00008645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008646$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008647
8648 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008649 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008650else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008652 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 +01008653if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008654 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00008655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008656 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008657
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008659$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008660
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008661 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008662else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
8665$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Martin v. Löwiseba40652007-08-30 20:10:57 +00008667# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008668if test "${with_pth+set}" = set; then :
8669 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8670$as_echo "$withval" >&6; }
8671 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
8673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008675
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008676 LIBS="-lpth $LIBS"
8677 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00008678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8680$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008681
8682 # Just looking for pthread_create in libpthread is not enough:
8683 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8684 # So we really have to include pthread.h, and then link.
8685 _libs=$LIBS
8686 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8688$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008690/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008691#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008692
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008693void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008694int
8695main ()
8696{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008697
8698pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ;
8700 return 0;
8701}
8702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008704
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8706$as_echo "yes" >&6; }
8707 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008708
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008709 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008710 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008711else
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008713 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008714 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008715if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008717
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008718 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008719 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008720else
Guido van Rossumad678af1998-10-02 14:42:15 +00008721
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008722 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 +01008723if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008724 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008725
8726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008728
8729 THREADOBJ="Python/thread.o"
8730else
8731
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732 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 +01008733if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
8736
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008737$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008738
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008739 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008740else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008741
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8743$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008744if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008745 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008746else
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008748LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752/* Override any GCC internal prototype to avoid an error.
8753 Use char because int might match the return type of a GCC
8754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755#ifdef __cplusplus
8756extern "C"
8757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ;
8764 return 0;
8765}
8766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008770 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008772rm -f core conftest.err conftest.$ac_objext \
8773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008774LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8777$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008778if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008779 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008782 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008783 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008784else
Greg Steinadf63d62000-07-05 10:38:09 +00008785
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8787$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008788if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008790else
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008792LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008795
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796/* Override any GCC internal prototype to avoid an error.
8797 Use char because int might match the return type of a GCC
8798 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008799#ifdef __cplusplus
8800extern "C"
8801#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008802char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008803int
8804main ()
8805{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ;
8808 return 0;
8809}
8810_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008814 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816rm -f core conftest.err conftest.$ac_objext \
8817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008818LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8821$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008822if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008824
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008825 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008826 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008827 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008828else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008829
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8831$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008832if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008833 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008834else
Martin v. Löwis11437992002-04-12 09:54:03 +00008835 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008836LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008839
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840/* Override any GCC internal prototype to avoid an error.
8841 Use char because int might match the return type of a GCC
8842 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008843#ifdef __cplusplus
8844extern "C"
8845#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008846char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ;
8852 return 0;
8853}
8854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008860rm -f core conftest.err conftest.$ac_objext \
8861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008862LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
8865$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008866if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008868
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008869 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008870 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008871 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008872else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008873
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
8875$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008876if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00008878else
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008880LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008883
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884/* Override any GCC internal prototype to avoid an error.
8885 Use char because int might match the return type of a GCC
8886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008887#ifdef __cplusplus
8888extern "C"
8889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008890char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008891int
8892main ()
8893{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ;
8896 return 0;
8897}
8898_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00008901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00008903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904rm -f core conftest.err conftest.$ac_objext \
8905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008906LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00008907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
8909$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008910if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008911 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00008912
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008913 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008914 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008915 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00008916else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00008917
Martin v. Löwis130fb172001-07-19 11:00:41 +00008918 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00008919fi
8920
Guido van Rossum627b2d71993-12-24 10:39:16 +00008921
Guido van Rossum7b3853f1996-07-30 18:09:35 +00008922fi
8923
Guido van Rossum0be3e491997-05-22 20:33:33 +00008924fi
8925
Guido van Rossum49545951997-12-02 19:28:29 +00008926fi
8927
Guido van Rossumb93a8621998-05-07 13:27:32 +00008928fi
8929
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008930
Michael W. Hudson54241132001-12-07 15:38:26 +00008931fi
8932
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008933
8934fi
8935
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937rm -f core conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008939fi
8940
Martin v. Löwis11437992002-04-12 09:54:03 +00008941fi
8942
8943
8944fi
8945
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008946
Michael W. Hudson54241132001-12-07 15:38:26 +00008947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
8949$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008950if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008952else
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008954LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008957
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958/* Override any GCC internal prototype to avoid an error.
8959 Use char because int might match the return type of a GCC
8960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008961#ifdef __cplusplus
8962extern "C"
8963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008964char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008965int
8966main ()
8967{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ;
8970 return 0;
8971}
8972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008976 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978rm -f core conftest.err conftest.$ac_objext \
8979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008980LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
8983$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008984if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008986
Martin v. Löwis130fb172001-07-19 11:00:41 +00008987 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008988 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008989 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00008990fi
8991
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00008992
Neal Norwitza978ab02002-11-02 16:58:05 +00008993 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
8995$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008996if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008998else
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009000LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004/* Override any GCC internal prototype to avoid an error.
9005 Use char because int might match the return type of a GCC
9006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009007#ifdef __cplusplus
9008extern "C"
9009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009010char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009011int
9012main ()
9013{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009014return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 ;
9016 return 0;
9017}
9018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009022 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024rm -f core conftest.err conftest.$ac_objext \
9025 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009026LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9029$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009030if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009032
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009033 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009034 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009035 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009036fi
9037
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009038 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009039
Martin v. Löwis130fb172001-07-19 11:00:41 +00009040 if test "$USE_THREAD_MODULE" != "#"
9041 then
9042 # If the above checks didn't disable threads, (at least) OSF1
9043 # needs this '-threads' argument during linking.
9044 case $ac_sys_system in
9045 OSF1) LDLAST=-threads;;
9046 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009047 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009048fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009049
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009050if test "$posix_threads" = "yes"; then
9051 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009052
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009053$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009054
9055 fi
9056
9057 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9058 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009059 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009061
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009062 ;;
9063 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009064$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009065
9066 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009067 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009069
9070 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009071 esac
9072
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9074$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009075 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009076 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009078 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009079 ac_cv_pthread_system_supported=no
9080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009082/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009083#include <pthread.h>
9084 void *foo(void *parm) {
9085 return NULL;
9086 }
9087 main() {
9088 pthread_attr_t attr;
9089 pthread_t id;
9090 if (pthread_attr_init(&attr)) exit(-1);
9091 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9092 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9093 exit(0);
9094 }
9095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009097 ac_cv_pthread_system_supported=yes
9098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009100fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9102 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009103fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009104
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105
Guido van Rossum627b2d71993-12-24 10:39:16 +00009106fi
9107
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9109$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009110 if test "$ac_cv_pthread_system_supported" = "yes"; then
9111
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009113
9114 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 for ac_func in pthread_sigmask
9116do :
9117 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009118if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009119 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009120#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009121_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009122 case $ac_sys_system in
9123 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009124
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009125$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009126
9127 ;;
9128 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009129fi
9130done
9131
9132fi
9133
9134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009135# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009136
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9138$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009141 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009142 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009145 ipv6=no
9146 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009147 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9148$as_echo "yes" >&6; }
9149 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009150
9151 ipv6=yes
9152 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009154else
Martin v. Löwis11437992002-04-12 09:54:03 +00009155
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009156 if test "$cross_compiling" = yes; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009157
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9159$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009160 ipv6=no
9161
9162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009164/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009165 /* AF_INET6 available check */
9166#include <sys/types.h>
9167#include <sys/socket.h>
9168main()
9169{
9170 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9171 exit(1);
9172 else
9173 exit(0);
9174}
9175
Martin v. Löwis11437992002-04-12 09:54:03 +00009176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177if ac_fn_c_try_run "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009178
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9180$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009181 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009182
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009183else
Matthias Klosec511b472010-05-08 11:01:39 +00009184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009187 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009188
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009189fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009192fi
9193
Martin v. Löwiseba40652007-08-30 20:10:57 +00009194
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009195if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9197$as_echo_n "checking if RFC2553 API is available... " >&6; }
9198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009200
9201 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009202#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009203int
9204main ()
9205{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009206struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009207 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009208 ;
9209 return 0;
9210}
Matthias Klosec511b472010-05-08 11:01:39 +00009211
Martin v. Löwis11437992002-04-12 09:54:03 +00009212_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009214
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009217 ipv6=yes
9218
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009219else
Matthias Klosec511b472010-05-08 11:01:39 +00009220
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009223 ipv6=no
9224
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009227fi
9228
9229if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009230 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009231
9232fi
9233
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234fi
9235
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009236
9237ipv6type=unknown
9238ipv6lib=none
9239ipv6trylibc=no
9240
9241if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9243$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009244 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9245 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009246 case $i in
9247 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009250
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009251#include <netinet/in.h>
9252#ifdef IPV6_INRIA_VERSION
9253yes
9254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009255_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009258 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009260rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009261
9262 ;;
9263 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009265/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009266
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267#include <netinet/in.h>
9268#ifdef __KAME__
9269yes
9270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009271_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009274 ipv6type=$i;
9275 ipv6lib=inet6
9276 ipv6libdir=/usr/local/v6/lib
9277 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009278fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009279rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009280
9281 ;;
9282 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009284/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009285
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009286#include <features.h>
9287#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9288yes
9289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009290_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009292 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009293 ipv6type=$i;
9294 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009295fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009296rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009297
9298 ;;
9299 linux-inet6)
9300 if test -d /usr/inet6; then
9301 ipv6type=$i
9302 ipv6lib=inet6
9303 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009304 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009305 fi
9306 ;;
9307 solaris)
9308 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +00009309 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009310 ipv6type=$i
9311 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009312 fi
9313 fi
9314 ;;
9315 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009317/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009318
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009319#include <sys/param.h>
9320#ifdef _TOSHIBA_INET6
9321yes
9322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009326 ipv6type=$i;
9327 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009328 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009329fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009330rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009331
9332 ;;
9333 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009335/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009336
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009337#include </usr/local/v6/include/sys/v6config.h>
9338#ifdef __V6D__
9339yes
9340#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009341_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009343 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009344 ipv6type=$i;
9345 ipv6lib=v6;
9346 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009347 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009348fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009349rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009350
9351 ;;
9352 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009354/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009355
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009356#include <sys/param.h>
9357#ifdef _ZETA_MINAMI_INET6
9358yes
9359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009360_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009362 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009363 ipv6type=$i;
9364 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009365 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009366fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009367rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009368
9369 ;;
9370 esac
9371 if test "$ipv6type" != "unknown"; then
9372 break
9373 fi
9374 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9376$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009377fi
9378
9379if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9380 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9381 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9382 echo "using lib$ipv6lib"
9383 else
9384 if test $ipv6trylibc = "yes"; then
9385 echo "using libc"
9386 else
9387 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9388 echo "You need to fetch lib$ipv6lib.a from appropriate"
9389 echo 'ipv6 kit and compile beforehand.'
9390 exit 1
9391 fi
9392 fi
9393fi
9394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9396$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009398/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009399
9400 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009401int
9402main ()
9403{
9404FSIORefNum fRef = 0
9405 ;
9406 return 0;
9407}
Mark Dickinson0712b562010-05-08 19:13:21 +00009408
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009409_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009411
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009412
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009414
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9416$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009417
Mark Dickinson0712b562010-05-08 19:13:21 +00009418else
9419
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421$as_echo "no" >&6; }
9422
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009423fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00009424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9425
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009426# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9428$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009429
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009431if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432 withval=$with_doc_strings;
9433fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009434
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009435
9436if test -z "$with_doc_strings"
9437then with_doc_strings="yes"
9438fi
9439if test "$with_doc_strings" != "no"
9440then
9441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009443
9444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9446$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009447
Neil Schemenauera35c6882001-02-27 04:45:05 +00009448# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9450$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009451
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009454 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009455if test "$withval" != no
9456then
9457
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009458$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9461$as_echo "yes" >&6; }
9462else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009464fi
9465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9467$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468fi
9469
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009470
9471# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9473$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009476if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477 withval=$with_pymalloc;
9478fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009479
Neil Schemenauera35c6882001-02-27 04:45:05 +00009480
Neil Schemenauer16c22972002-03-22 15:34:49 +00009481if test -z "$with_pymalloc"
9482then with_pymalloc="yes"
9483fi
9484if test "$with_pymalloc" != "no"
9485then
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009488
9489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9491$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009492
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009493# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9495$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009496
9497# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009498if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009499 withval=$with_valgrind;
9500else
9501 with_valgrind=no
9502fi
9503
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9505$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009506if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009507 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 +01009508if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009509
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009511
9512else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009513 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00009514
9515fi
9516
9517
9518fi
9519
Barry Warsawef82cd72000-06-30 16:21:01 +00009520# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
9522$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009523
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009526 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +00009527if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00009528then
9529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9533$as_echo "yes" >&6; }
9534else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9535$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +00009536fi
9537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540fi
9541
Barry Warsawef82cd72000-06-30 16:21:01 +00009542
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009543# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009544
Guido van Rossum98935bf2001-09-05 19:13:16 +00009545DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009546
Guido van Rossume97ee181999-12-20 21:27:22 +00009547# the dlopen() function means we might want to use dynload_shlib.o. some
9548# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009549for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550do :
9551 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009552if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009554#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009555_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009556
Guido van Rossume97ee181999-12-20 21:27:22 +00009557fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009558done
Guido van Rossume97ee181999-12-20 21:27:22 +00009559
Michael W. Hudson54241132001-12-07 15:38:26 +00009560
Guido van Rossume97ee181999-12-20 21:27:22 +00009561# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9562# loading of modules.
9563
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9565$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009566if test -z "$DYNLOADFILE"
9567then
9568 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009569 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9570 if test "$ac_cv_func_dlopen" = yes
9571 then DYNLOADFILE="dynload_shlib.o"
9572 else DYNLOADFILE="dynload_aix.o"
9573 fi
9574 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009575 BeOS*) DYNLOADFILE="dynload_beos.o";;
9576 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +00009577 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9578 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009579 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009580 *)
9581 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9582 # out any dynamic loading
9583 if test "$ac_cv_func_dlopen" = yes
9584 then DYNLOADFILE="dynload_shlib.o"
9585 else DYNLOADFILE="dynload_stub.o"
9586 fi
9587 ;;
9588 esac
9589fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9591$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009592if test "$DYNLOADFILE" != "dynload_stub.o"
9593then
Martin v. Löwis11437992002-04-12 09:54:03 +00009594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009596
9597fi
9598
Neil Schemenauer4e425612001-06-19 15:44:15 +00009599# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9600
Michael W. Hudson54241132001-12-07 15:38:26 +00009601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9603$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009604if test -z "$MACHDEP_OBJS"
9605then
Jack Jansene578a632001-08-15 01:27:14 +00009606 MACHDEP_OBJS=$extra_machdep_objs
9607else
9608 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9611$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009612
Guido van Rossum627b2d71993-12-24 10:39:16 +00009613# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +00009614for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
9615 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +00009616 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009617 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +00009618 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00009619 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +00009620 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +00009621 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
9622 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +00009623 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +00009624 setlocale setregid setreuid setresuid setresgid \
9625 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +00009626 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009627 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +00009628 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009629do :
9630 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9631ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009632if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009635_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009636
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009637fi
9638done
9639
Michael W. Hudson54241132001-12-07 15:38:26 +00009640
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009641# For some functions, having a definition is not sufficient, since
9642# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9644$as_echo_n "checking for chroot... " >&6; }
9645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009647#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009648int
9649main ()
9650{
9651void *x=chroot
9652 ;
9653 return 0;
9654}
9655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009657
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009659
Matthias Klosec511b472010-05-08 11:01:39 +00009660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009665
9666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9669$as_echo_n "checking for link... " >&6; }
9670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009672#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009673int
9674main ()
9675{
9676void *x=link
9677 ;
9678 return 0;
9679}
9680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009681if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009682
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009684
Matthias Klosec511b472010-05-08 11:01:39 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009690
9691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9694$as_echo_n "checking for symlink... " >&6; }
9695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009696/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009697#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009698int
9699main ()
9700{
9701void *x=symlink
9702 ;
9703 return 0;
9704}
9705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009707
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009709
Matthias Klosec511b472010-05-08 11:01:39 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9714$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009715
9716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9719$as_echo_n "checking for fchdir... " >&6; }
9720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009721/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009722#include <unistd.h>
9723int
9724main ()
9725{
9726void *x=fchdir
9727 ;
9728 return 0;
9729}
9730_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009732
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009734
Matthias Klosec511b472010-05-08 11:01:39 +00009735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009740
9741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9744$as_echo_n "checking for fsync... " >&6; }
9745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009746/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009747#include <unistd.h>
9748int
9749main ()
9750{
9751void *x=fsync
9752 ;
9753 return 0;
9754}
9755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009756if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009757
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009759
Matthias Klosec511b472010-05-08 11:01:39 +00009760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9764$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009765
9766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9769$as_echo_n "checking for fdatasync... " >&6; }
9770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009771/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009772#include <unistd.h>
9773int
9774main ()
9775{
9776void *x=fdatasync
9777 ;
9778 return 0;
9779}
9780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009782
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009784
Matthias Klosec511b472010-05-08 11:01:39 +00009785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009786$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009790
9791fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9794$as_echo_n "checking for epoll... " >&6; }
9795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009796/* end confdefs.h. */
9797#include <sys/epoll.h>
9798int
9799main ()
9800{
9801void *x=epoll_create
9802 ;
9803 return 0;
9804}
9805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009807
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009809
Matthias Klosec511b472010-05-08 11:01:39 +00009810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009815
9816fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9819$as_echo_n "checking for kqueue... " >&6; }
9820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009821/* end confdefs.h. */
9822
9823#include <sys/types.h>
9824#include <sys/event.h>
9825
9826int
9827main ()
9828{
9829int x=kqueue()
9830 ;
9831 return 0;
9832}
9833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009834if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009835
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009836$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009837
Matthias Klosec511b472010-05-08 11:01:39 +00009838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009839$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009843
9844fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00009845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009846# On some systems (eg. FreeBSD 5), we would find a definition of the
9847# functions ctermid_r, setgroups in the library, but no prototype
9848# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9849# address to avoid compiler warnings and potential miscompilations
9850# because of the missing prototypes.
9851
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9853$as_echo_n "checking for ctermid_r... " >&6; }
9854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009855/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009856
Martin v. Löwisd5843682002-11-21 20:41:28 +00009857#include <stdio.h>
9858
Martin v. Löwisd5843682002-11-21 20:41:28 +00009859int
9860main ()
9861{
9862void* p = ctermid_r
9863 ;
9864 return 0;
9865}
9866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +00009868
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009869$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +00009870
Matthias Klosec511b472010-05-08 11:01:39 +00009871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009872$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9875$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +00009876
9877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9879
Antoine Pitroub170f172010-09-10 18:47:36 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
9881$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009882if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009883 $as_echo_n "(cached) " >&6
9884else
9885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009886/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009887#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009888int
9889main ()
9890{
9891void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +00009892
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009893 ;
9894 return 0;
9895}
9896_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009897if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009898 ac_cv_flock_decl=yes
9899else
9900 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009901
9902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +00009904
Antoine Pitroub170f172010-09-10 18:47:36 +00009905fi
9906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
9907$as_echo "$ac_cv_flock_decl" >&6; }
9908if test "x${ac_cv_flock_decl}" = xyes; then
9909 for ac_func in flock
9910do :
9911 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009912if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009913 cat >>confdefs.h <<_ACEOF
9914#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +00009915_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +00009916
Antoine Pitrou85729812010-09-07 14:55:24 +00009917else
Antoine Pitroub170f172010-09-10 18:47:36 +00009918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +00009919$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009920if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +00009921 $as_echo_n "(cached) " >&6
9922else
9923 ac_check_lib_save_LIBS=$LIBS
9924LIBS="-lbsd $LIBS"
9925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9926/* end confdefs.h. */
9927
9928/* Override any GCC internal prototype to avoid an error.
9929 Use char because int might match the return type of a GCC
9930 builtin and then its argument prototype would still apply. */
9931#ifdef __cplusplus
9932extern "C"
9933#endif
9934char flock ();
9935int
9936main ()
9937{
9938return flock ();
9939 ;
9940 return 0;
9941}
9942_ACEOF
9943if ac_fn_c_try_link "$LINENO"; then :
9944 ac_cv_lib_bsd_flock=yes
9945else
9946 ac_cv_lib_bsd_flock=no
9947fi
9948rm -f core conftest.err conftest.$ac_objext \
9949 conftest$ac_exeext conftest.$ac_ext
9950LIBS=$ac_check_lib_save_LIBS
9951fi
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
9953$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009954if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +00009955 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +00009956
9957
9958$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
9959
9960
9961fi
9962
9963
9964fi
Antoine Pitroub170f172010-09-10 18:47:36 +00009965done
9966
Antoine Pitrou85729812010-09-07 14:55:24 +00009967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
9970$as_echo_n "checking for getpagesize... " >&6; }
9971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009972/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009973
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009974#include <unistd.h>
9975
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009976int
9977main ()
9978{
9979void* p = getpagesize
9980 ;
9981 return 0;
9982}
9983_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009985
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009986$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009987
Matthias Klosec511b472010-05-08 11:01:39 +00009988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009989$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9992$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009993
9994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +00009996
Charles-François Natali93a11752011-11-27 13:01:35 +01009997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
9998$as_echo_n "checking for broken unsetenv... " >&6; }
9999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10000/* end confdefs.h. */
10001
10002#include <stdlib.h>
10003
10004int
10005main ()
10006{
10007int res = unsetenv("DUMMY")
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012if ac_fn_c_try_compile "$LINENO"; then :
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014$as_echo "no" >&6; }
10015else
10016
10017$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10018
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10020$as_echo "yes" >&6; }
10021
10022fi
10023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10024
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025for ac_prog in true
10026do
10027 # Extract the first word of "$ac_prog", so it can be a program name with args.
10028set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10030$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010031if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010032 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033else
10034 if test -n "$TRUE"; then
10035 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10036else
10037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10038for as_dir in $PATH
10039do
10040 IFS=$as_save_IFS
10041 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000010043 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 +000010044 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045 $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 +000010046 break 2
10047 fi
10048done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010051
10052fi
10053fi
10054TRUE=$ac_cv_prog_TRUE
10055if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10057$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010061fi
10062
Martin v. Löwiseba40652007-08-30 20:10:57 +000010063
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010064 test -n "$TRUE" && break
10065done
10066test -n "$TRUE" || TRUE="/bin/true"
10067
10068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10070$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010071if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010072 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010073else
10074 ac_check_lib_save_LIBS=$LIBS
10075LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010078
Martin v. Löwiseba40652007-08-30 20:10:57 +000010079/* Override any GCC internal prototype to avoid an error.
10080 Use char because int might match the return type of a GCC
10081 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010082#ifdef __cplusplus
10083extern "C"
10084#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010085char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010086int
10087main ()
10088{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010090 ;
10091 return 0;
10092}
10093_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010095 ac_cv_lib_c_inet_aton=yes
10096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010099rm -f core conftest.err conftest.$ac_objext \
10100 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010101LIBS=$ac_check_lib_save_LIBS
10102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10104$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010105if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010106 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10109$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010110if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010111 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010112else
10113 ac_check_lib_save_LIBS=$LIBS
10114LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010116/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010117
Martin v. Löwiseba40652007-08-30 20:10:57 +000010118/* Override any GCC internal prototype to avoid an error.
10119 Use char because int might match the return type of a GCC
10120 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010121#ifdef __cplusplus
10122extern "C"
10123#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010124char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010125int
10126main ()
10127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010128return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010129 ;
10130 return 0;
10131}
10132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010134 ac_cv_lib_resolv_inet_aton=yes
10135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010136 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138rm -f core conftest.err conftest.$ac_objext \
10139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010140LIBS=$ac_check_lib_save_LIBS
10141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10143$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010144if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010145 cat >>confdefs.h <<_ACEOF
10146#define HAVE_LIBRESOLV 1
10147_ACEOF
10148
10149 LIBS="-lresolv $LIBS"
10150
10151fi
10152
10153
10154fi
10155
10156
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010157# On Tru64, chflags seems to be present, but calling it will
10158# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10160$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010161if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010162 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010165 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010168/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010169
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010170#include <sys/stat.h>
10171#include <unistd.h>
10172int main(int argc, char*argv[])
10173{
10174 if(chflags(argv[0], 0) != 0)
10175 return 1;
10176 return 0;
10177}
Ned Deily43e10542011-06-27 23:41:53 -070010178
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010181 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010183 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010184fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10186 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010187fi
10188
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010189
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10192$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010193if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010195if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010196 ac_cv_have_chflags="yes"
10197else
10198 ac_cv_have_chflags="no"
10199fi
10200
10201fi
10202if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010204$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010205
10206fi
10207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10209$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010210if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010214 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010217/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010218
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010219#include <sys/stat.h>
10220#include <unistd.h>
10221int main(int argc, char*argv[])
10222{
10223 if(lchflags(argv[0], 0) != 0)
10224 return 1;
10225 return 0;
10226}
Ned Deily43e10542011-06-27 23:41:53 -070010227
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010229if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010230 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010236fi
10237
10238
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10241$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010242if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010243 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010244if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010245 ac_cv_have_lchflags="yes"
10246else
10247 ac_cv_have_lchflags="no"
10248fi
10249
10250fi
10251if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010254
10255fi
10256
Ronald Oussorenf8752642006-07-06 10:13:35 +000010257case $ac_sys_system/$ac_sys_release in
10258Darwin/*)
10259 _CUR_CFLAGS="${CFLAGS}"
10260 _CUR_LDFLAGS="${LDFLAGS}"
10261 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10262 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10263 ;;
10264esac
10265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10267$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010268if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010270else
10271 ac_check_lib_save_LIBS=$LIBS
10272LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010274/* end confdefs.h. */
10275
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276/* Override any GCC internal prototype to avoid an error.
10277 Use char because int might match the return type of a GCC
10278 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010279#ifdef __cplusplus
10280extern "C"
10281#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010282char inflateCopy ();
10283int
10284main ()
10285{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010287 ;
10288 return 0;
10289}
10290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010292 ac_cv_lib_z_inflateCopy=yes
10293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010294 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010295fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296rm -f core conftest.err conftest.$ac_objext \
10297 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010298LIBS=$ac_check_lib_save_LIBS
10299fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10301$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010302if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000010305
10306fi
10307
10308
Ronald Oussorenf8752642006-07-06 10:13:35 +000010309case $ac_sys_system/$ac_sys_release in
10310Darwin/*)
10311 CFLAGS="${_CUR_CFLAGS}"
10312 LDFLAGS="${_CUR_LDFLAGS}"
10313 ;;
10314esac
10315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10317$as_echo_n "checking for hstrerror... " >&6; }
10318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010319/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010320
Martin v. Löwise9416172003-05-03 10:12:45 +000010321#include <netdb.h>
10322
Martin v. Löwise9416172003-05-03 10:12:45 +000010323int
10324main ()
10325{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010326void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010333$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010334
Matthias Klosec511b472010-05-08 11:01:39 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010340
10341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342rm -f core conftest.err conftest.$ac_objext \
10343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10346$as_echo_n "checking for inet_aton... " >&6; }
10347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010348/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010349
Martin v. Löwis86d66262006-02-17 08:40:11 +000010350#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010351#include <sys/socket.h>
10352#include <netinet/in.h>
10353#include <arpa/inet.h>
10354
Martin v. Löwise9416172003-05-03 10:12:45 +000010355int
10356main ()
10357{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010358void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010359 ;
10360 return 0;
10361}
10362_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010363if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010366
Matthias Klosec511b472010-05-08 11:01:39 +000010367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010368$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010372
10373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374rm -f core conftest.err conftest.$ac_objext \
10375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10378$as_echo_n "checking for inet_pton... " >&6; }
10379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010381
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010382#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010383#include <sys/socket.h>
10384#include <netinet/in.h>
10385#include <arpa/inet.h>
10386
Martin v. Löwise9416172003-05-03 10:12:45 +000010387int
10388main ()
10389{
10390void* p = inet_pton
10391 ;
10392 return 0;
10393}
10394_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010396
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010397$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010398
Matthias Klosec511b472010-05-08 11:01:39 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010401else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10403$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010404
10405fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010407
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010408# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10410$as_echo_n "checking for setgroups... " >&6; }
10411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010412/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010413
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010414#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010415#ifdef HAVE_GRP_H
10416#include <grp.h>
10417#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010418
Martin v. Löwisd5843682002-11-21 20:41:28 +000010419int
10420main ()
10421{
10422void* p = setgroups
10423 ;
10424 return 0;
10425}
10426_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010430
Matthias Klosec511b472010-05-08 11:01:39 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010436
10437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010440# check for openpty and forkpty
10441
10442for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443do :
10444 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010445if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10452$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010453if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010454 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010455else
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010457LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010460
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461/* Override any GCC internal prototype to avoid an error.
10462 Use char because int might match the return type of a GCC
10463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010464#ifdef __cplusplus
10465extern "C"
10466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010467char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010468int
10469main ()
10470{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010471return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
10475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010480fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010483LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10486$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010487if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010488 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010489 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10492$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010493if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010495else
10496 ac_check_lib_save_LIBS=$LIBS
10497LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010499/* end confdefs.h. */
10500
Martin v. Löwiseba40652007-08-30 20:10:57 +000010501/* Override any GCC internal prototype to avoid an error.
10502 Use char because int might match the return type of a GCC
10503 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010504#ifdef __cplusplus
10505extern "C"
10506#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010507char openpty ();
10508int
10509main ()
10510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010512 ;
10513 return 0;
10514}
10515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010517 ac_cv_lib_bsd_openpty=yes
10518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521rm -f core conftest.err conftest.$ac_objext \
10522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010523LIBS=$ac_check_lib_save_LIBS
10524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10526$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010527if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010528 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010529 LIBS="$LIBS -lbsd"
10530fi
10531
10532
10533fi
10534
Fred Drake8cef4cf2000-06-28 16:40:38 +000010535
10536fi
10537done
10538
10539for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540do :
10541 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010542if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010544#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010545_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010546
Fred Drake8cef4cf2000-06-28 16:40:38 +000010547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10549$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010550if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010552else
Martin v. Löwis11437992002-04-12 09:54:03 +000010553 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010554LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010557
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öwis11437992002-04-12 09:54:03 +000010561#ifdef __cplusplus
10562extern "C"
10563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010564char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010565int
10566main ()
10567{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010568return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000010574 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010576 ac_cv_lib_util_forkpty=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öwis11437992002-04-12 09:54:03 +000010580LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010581fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10583$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010584if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010585 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010586 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010587else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10589$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010590if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010592else
10593 ac_check_lib_save_LIBS=$LIBS
10594LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010596/* end confdefs.h. */
10597
Martin v. Löwiseba40652007-08-30 20:10:57 +000010598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010604char forkpty ();
10605int
10606main ()
10607{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010608return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010614 ac_cv_lib_bsd_forkpty=yes
10615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010620LIBS=$ac_check_lib_save_LIBS
10621fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10623$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010624if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010626 LIBS="$LIBS -lbsd"
10627fi
10628
10629
10630fi
10631
Fred Drake8cef4cf2000-06-28 16:40:38 +000010632
10633fi
10634done
10635
Jack Jansendd19cf82001-12-06 22:36:17 +000010636
Brett Cannonaa5778d2008-03-18 04:09:00 +000010637# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000010638for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639do :
10640 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010641if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000010642 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000010644_ACEOF
10645
10646fi
10647done
10648
10649
Michael W. Hudson54241132001-12-07 15:38:26 +000010650# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010651for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652do :
10653 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10654ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010655if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010658_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010659
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010660fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010661done
10662
Michael W. Hudson54241132001-12-07 15:38:26 +000010663
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010664ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010665if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010666 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010667
Martin v. Löwis1142de32002-03-29 16:28:31 +000010668else
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010670 *" dup2.$ac_objext "* ) ;;
10671 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010673esac
10674
Martin v. Löwis1142de32002-03-29 16:28:31 +000010675fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010676
10677ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010678if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010679 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10680
10681else
10682 case " $LIBOBJS " in
10683 *" getcwd.$ac_objext "* ) ;;
10684 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10685 ;;
10686esac
10687
10688fi
10689
10690ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010691if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010692 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10693
10694else
10695 case " $LIBOBJS " in
10696 *" strdup.$ac_objext "* ) ;;
10697 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10698 ;;
10699esac
10700
10701fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010702
10703
10704for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705do :
10706 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010707if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010708 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010712/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010713#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010714int
10715main ()
10716{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010717getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010722if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010723
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010725
Guido van Rossum627b2d71993-12-24 10:39:16 +000010726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010728
Guido van Rossum627b2d71993-12-24 10:39:16 +000010729fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010730done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010731
Jack Jansen150753c2003-03-29 22:07:47 +000010732for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733do :
10734 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010735if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010736 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010740/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010741#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010742int
10743main ()
10744{
10745setpgrp(0,0);
10746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010753
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010756
10757fi
10758done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010759
Thomas Wouters3a584202000-08-05 23:28:51 +000010760for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010761do :
10762 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010763if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010769#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010770int
10771main ()
10772{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778if ac_fn_c_try_compile "$LINENO"; then :
10779
Guido van Rossum627b2d71993-12-24 10:39:16 +000010780else
Skip Montanaro6dead952003-09-25 14:50:04 +000010781
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010782$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010783
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Guido van Rossum627b2d71993-12-24 10:39:16 +000010785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010787
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010788fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010789done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790
Michael W. Hudson54241132001-12-07 15:38:26 +000010791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
10793$as_echo_n "checking for major... " >&6; }
10794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010795/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010796
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010797#if defined(MAJOR_IN_MKDEV)
10798#include <sys/mkdev.h>
10799#elif defined(MAJOR_IN_SYSMACROS)
10800#include <sys/sysmacros.h>
10801#else
10802#include <sys/types.h>
10803#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010804
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010805int
10806main ()
10807{
10808
10809 makedev(major(0),minor(0));
10810
10811 ;
10812 return 0;
10813}
10814_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010816
10817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010818$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10821$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010822
10823else
Skip Montanaro6dead952003-09-25 14:50:04 +000010824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000010827
10828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010829rm -f core conftest.err conftest.$ac_objext \
10830 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010831
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010832# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000010833# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
10835$as_echo_n "checking for getaddrinfo... " >&6; }
10836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010838
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010839#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010840#include <sys/socket.h>
10841#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000010842#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010843
Martin v. Löwis11437992002-04-12 09:54:03 +000010844int
10845main ()
10846{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010847getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000010848 ;
10849 return 0;
10850}
10851_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010852if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010853 have_getaddrinfo=yes
10854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010857rm -f core conftest.err conftest.$ac_objext \
10858 conftest$ac_exeext conftest.$ac_ext
10859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
10860$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010861if test $have_getaddrinfo = yes
10862then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
10864$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010865 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010866 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010869 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010873
10874#include <sys/types.h>
10875#include <netdb.h>
10876#include <string.h>
10877#include <sys/socket.h>
10878#include <netinet/in.h>
10879
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010880int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010881{
10882 int passive, gaierr, inet4 = 0, inet6 = 0;
10883 struct addrinfo hints, *ai, *aitop;
10884 char straddr[INET6_ADDRSTRLEN], strport[16];
10885
10886 for (passive = 0; passive <= 1; passive++) {
10887 memset(&hints, 0, sizeof(hints));
10888 hints.ai_family = AF_UNSPEC;
10889 hints.ai_flags = passive ? AI_PASSIVE : 0;
10890 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000010891 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010892 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
10893 (void)gai_strerror(gaierr);
10894 goto bad;
10895 }
10896 for (ai = aitop; ai; ai = ai->ai_next) {
10897 if (ai->ai_addr == NULL ||
10898 ai->ai_addrlen == 0 ||
10899 getnameinfo(ai->ai_addr, ai->ai_addrlen,
10900 straddr, sizeof(straddr), strport, sizeof(strport),
10901 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
10902 goto bad;
10903 }
10904 switch (ai->ai_family) {
10905 case AF_INET:
10906 if (strcmp(strport, "54321") != 0) {
10907 goto bad;
10908 }
10909 if (passive) {
10910 if (strcmp(straddr, "0.0.0.0") != 0) {
10911 goto bad;
10912 }
10913 } else {
10914 if (strcmp(straddr, "127.0.0.1") != 0) {
10915 goto bad;
10916 }
10917 }
10918 inet4++;
10919 break;
10920 case AF_INET6:
10921 if (strcmp(strport, "54321") != 0) {
10922 goto bad;
10923 }
10924 if (passive) {
10925 if (strcmp(straddr, "::") != 0) {
10926 goto bad;
10927 }
10928 } else {
10929 if (strcmp(straddr, "::1") != 0) {
10930 goto bad;
10931 }
10932 }
10933 inet6++;
10934 break;
10935 case AF_UNSPEC:
10936 goto bad;
10937 break;
10938 default:
10939 /* another family support? */
10940 break;
10941 }
10942 }
10943 }
10944
10945 if (!(inet4 == 0 || inet4 == 2))
10946 goto bad;
10947 if (!(inet6 == 0 || inet6 == 2))
10948 goto bad;
10949
10950 if (aitop)
10951 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010952 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010953
10954 bad:
10955 if (aitop)
10956 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010957 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010958}
10959
Martin v. Löwis11437992002-04-12 09:54:03 +000010960_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010962 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010965fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010969
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010970fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010971
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010973
Benjamin Peterson75fed812010-11-01 01:47:19 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
10975$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
10976
Mark Dickinson0ef0b912009-12-31 21:11:48 +000010977if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010978then
10979 if test $ipv6 = yes
10980 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010981 echo 'Fatal: You must get working getaddrinfo() function.'
10982 echo ' or you can specify "--disable-ipv6"'.
10983 exit 1
10984 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010985else
Martin v. Löwis11437992002-04-12 09:54:03 +000010986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000010988
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010989fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000010990
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010991for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992do :
10993 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010994if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010998
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000010999fi
11000done
11001
Michael W. Hudson54241132001-12-07 15:38:26 +000011002
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011003# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11005$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011006if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011010/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011011#include <sys/types.h>
11012#include <sys/time.h>
11013#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011014
Martin v. Löwis11437992002-04-12 09:54:03 +000011015int
11016main ()
11017{
11018if ((struct tm *) 0)
11019return 0;
11020 ;
11021 return 0;
11022}
11023_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011024if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011025 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11032$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011033if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011036
11037fi
11038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11040$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011041if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011045/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011046#include <sys/types.h>
11047#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
Martin v. Löwis11437992002-04-12 09:54:03 +000011049int
11050main ()
11051{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052struct tm tm;
11053 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 ;
11056 return 0;
11057}
11058_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011060 ac_cv_struct_tm=time.h
11061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11067$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011068if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011071
11072fi
11073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074ac_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 +000011075#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011078if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011079
11080cat >>confdefs.h <<_ACEOF
11081#define HAVE_STRUCT_TM_TM_ZONE 1
11082_ACEOF
11083
11084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011085fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011086
Martin v. Löwis11437992002-04-12 09:54:03 +000011087if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011089$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011090
11091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11093"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011094if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011095 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011096else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011098fi
11099
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011102_ACEOF
11103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11105$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011106if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011111#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011112#if !HAVE_DECL_TZNAME
11113extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011115
Martin v. Löwis11437992002-04-12 09:54:03 +000011116int
11117main ()
11118{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011119return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ;
11121 return 0;
11122}
11123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011125 ac_cv_var_tzname=yes
11126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129rm -f core conftest.err conftest.$ac_objext \
11130 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11133$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011134 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011137
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011138 fi
11139fi
11140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011141ac_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 +010011142if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011143
11144cat >>confdefs.h <<_ACEOF
11145#define HAVE_STRUCT_STAT_ST_RDEV 1
11146_ACEOF
11147
11148
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011149fi
11150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151ac_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 +010011152if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154cat >>confdefs.h <<_ACEOF
11155#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11156_ACEOF
11157
11158
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011159fi
11160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011161ac_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 +010011162if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011163
11164cat >>confdefs.h <<_ACEOF
11165#define HAVE_STRUCT_STAT_ST_FLAGS 1
11166_ACEOF
11167
11168
11169fi
11170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011171ac_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 +010011172if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011173
11174cat >>confdefs.h <<_ACEOF
11175#define HAVE_STRUCT_STAT_ST_GEN 1
11176_ACEOF
11177
11178
11179fi
11180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181ac_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 +010011182if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011183
11184cat >>confdefs.h <<_ACEOF
11185#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11186_ACEOF
11187
11188
11189fi
11190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191ac_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 +010011192if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011193
Martin v. Löwis11437992002-04-12 09:54:03 +000011194cat >>confdefs.h <<_ACEOF
11195#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11196_ACEOF
11197
11198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011199$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011200
11201else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011202 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011203 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11205 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011206esac
11207
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011208fi
11209
Michael W. Hudson54241132001-12-07 15:38:26 +000011210
Martin v. Löwis11437992002-04-12 09:54:03 +000011211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11213$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011214if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011216else
Matthias Klosec511b472010-05-08 11:01:39 +000011217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011220#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011224return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
11227}
11228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230 ac_cv_header_time_altzone=yes
11231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011232 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011235
Martin v. Löwiseba40652007-08-30 20:10:57 +000011236fi
11237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11239$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011240if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011243
11244fi
11245
Guido van Rossumda88dad1995-01-26 00:46:29 +000011246was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11248$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011251
11252#include <sys/types.h>
11253#include <sys/select.h>
11254#include <sys/time.h>
11255
Martin v. Löwis11437992002-04-12 09:54:03 +000011256int
11257main ()
11258{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011259;
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 ;
11261 return 0;
11262}
11263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011265
11266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011268
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011269 was_it_defined=yes
11270
Martin v. Löwiseba40652007-08-30 20:10:57 +000011271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11274$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11277$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011278if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011282/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000011283#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011287struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011293 ac_cv_struct_addrinfo=yes
11294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11298fi
11299
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11301$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011302if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011305
11306fi
11307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11309$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011310if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011315
11316# include <sys/types.h>
11317# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011318int
11319main ()
11320{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011321struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ;
11323 return 0;
11324}
11325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011327 ac_cv_struct_sockaddr_storage=yes
11328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011329 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11332fi
11333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11335$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011336if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011339
11340fi
11341
Guido van Rossum627b2d71993-12-24 10:39:16 +000011342# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11345$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011346if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011351$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011352int
11353main ()
11354{
11355static int test_array [1 - 2 * !(((char) -1) < 0)];
11356test_array [0] = 0
11357
11358 ;
11359 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011360}
Martin v. Löwis11437992002-04-12 09:54:03 +000011361_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011362if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011363 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011365 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11370$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011371if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373
11374fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11377$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011378if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011382/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011383
Martin v. Löwis11437992002-04-12 09:54:03 +000011384int
11385main ()
11386{
11387/* FIXME: Include the comments suggested by Paul. */
11388#ifndef __cplusplus
11389 /* Ultrix mips cc rejects this. */
11390 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011393 char const *const *pcpcc;
11394 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 /* NEC SVR4.0.2 mips cc rejects this. */
11396 struct point {int x, y;};
11397 static struct point const zero = {0,0};
11398 /* AIX XL C 1.02.0.0 rejects this.
11399 It does not let you subtract one const X* pointer from another in
11400 an arm of an if-expression whose if-part is not a constant
11401 expression */
11402 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011405 ++pcpcc;
11406 ppc = (char**) pcpcc;
11407 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011408 { /* SCO 3.2v4 cc rejects this. */
11409 char *t;
11410 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011411
Martin v. Löwis11437992002-04-12 09:54:03 +000011412 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011413 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 }
11415 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11416 int x[] = {25, 17};
11417 const int *foo = &x[0];
11418 ++foo;
11419 }
11420 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11421 typedef const int *iptr;
11422 iptr p = 0;
11423 ++p;
11424 }
11425 { /* AIX XL C 1.02.0.0 rejects this saying
11426 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11427 struct s { int j; const int *ap[3]; };
11428 struct s *b; b->j = 5;
11429 }
11430 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11431 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011432 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011434 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011435#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436
Martin v. Löwis11437992002-04-12 09:54:03 +000011437 ;
11438 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439}
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011442 ac_cv_c_const=yes
11443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11449$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453
11454fi
11455
Michael W. Hudson54241132001-12-07 15:38:26 +000011456
Guido van Rossumda88dad1995-01-26 00:46:29 +000011457works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11459$as_echo_n "checking for working volatile... " >&6; }
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011462
Martin v. Löwis11437992002-04-12 09:54:03 +000011463int
11464main ()
11465{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011466volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011467 ;
11468 return 0;
11469}
11470_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011472 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011473else
Skip Montanaro6dead952003-09-25 14:50:04 +000011474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011475$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011476
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011477
Guido van Rossum627b2d71993-12-24 10:39:16 +000011478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11481$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011482
Guido van Rossumda88dad1995-01-26 00:46:29 +000011483works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11485$as_echo_n "checking for working signed char... " >&6; }
11486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011487/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011488
Martin v. Löwis11437992002-04-12 09:54:03 +000011489int
11490main ()
11491{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011492signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011493 ;
11494 return 0;
11495}
11496_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011498 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011499else
Skip Montanaro6dead952003-09-25 14:50:04 +000011500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011501$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011502
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011503
Guido van Rossum7f43da71994-08-01 12:15:30 +000011504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11507$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011508
Guido van Rossumda88dad1995-01-26 00:46:29 +000011509have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11511$as_echo_n "checking for prototypes... " >&6; }
11512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011513/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011514int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011515int
11516main ()
11517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ;
11520 return 0;
11521}
11522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011526
Matthias Klosec511b472010-05-08 11:01:39 +000011527 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11531$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011532
Guido van Rossumda88dad1995-01-26 00:46:29 +000011533works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11535$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011537/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011538
11539#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011540int foo(int x, ...) {
11541 va_list va;
11542 va_start(va, x);
11543 va_arg(va, int);
11544 va_arg(va, char *);
11545 va_arg(va, double);
11546 return 0;
11547}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011548
Martin v. Löwis11437992002-04-12 09:54:03 +000011549int
11550main ()
11551{
Guido van Rossum90eea071996-08-30 20:58:57 +000011552return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 ;
11554 return 0;
11555}
11556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
11559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011561
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011562 works=yes
11563
Guido van Rossum627b2d71993-12-24 10:39:16 +000011564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11567$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011568
Martin v. Löwisd6320502004-08-12 13:45:08 +000011569# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11571$as_echo_n "checking for socketpair... " >&6; }
11572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011573/* end confdefs.h. */
11574
11575#include <sys/types.h>
11576#include <sys/socket.h>
11577
11578int
11579main ()
11580{
11581void *x=socketpair
11582 ;
11583 return 0;
11584}
11585_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011587
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011589
Matthias Klosec511b472010-05-08 11:01:39 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011591$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11594$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011595
11596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011598
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011599# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11601$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011603/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011604#include <sys/types.h>
11605#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011606int
11607main ()
11608{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011609struct sockaddr x;
11610x.sa_len = 0;
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 :
11616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11617$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011619$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011620
11621else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11623$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011624
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011627
Guido van Rossumda88dad1995-01-26 00:46:29 +000011628va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11630$as_echo_n "checking whether va_list is an array... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633
11634#ifdef HAVE_STDARG_PROTOTYPES
11635#include <stdarg.h>
11636#else
11637#include <varargs.h>
11638#endif
11639
Martin v. Löwis11437992002-04-12 09:54:03 +000011640int
11641main ()
11642{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011643va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 ;
11645 return 0;
11646}
11647_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011648if ac_fn_c_try_compile "$LINENO"; then :
11649
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650else
Skip Montanaro6dead952003-09-25 14:50:04 +000011651
Martin v. Löwis11437992002-04-12 09:54:03 +000011652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011654
Guido van Rossumda88dad1995-01-26 00:46:29 +000011655 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011656
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11660$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011662# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011663
11664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011665ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011666if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11671$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011672 OLD_CFLAGS=$CFLAGS
11673 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011675/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011676
11677# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011678
Martin v. Löwis11437992002-04-12 09:54:03 +000011679int
11680main ()
11681{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011682
11683 char *name;
11684 struct hostent *he, *res;
11685 char buffer[2048];
11686 int buflen = 2048;
11687 int h_errnop;
11688
11689 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011690
11691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011696
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011697 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011698
Martin v. Löwis11437992002-04-12 09:54:03 +000011699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011700$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11703$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011704
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011705else
Skip Montanaro6dead952003-09-25 14:50:04 +000011706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708$as_echo "no" >&6; }
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11710$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011712/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011713
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011714# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716int
11717main ()
11718{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011719
11720 char *name;
11721 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000011722 char buffer[2048];
11723 int buflen = 2048;
11724 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011725
Matthias Klosec511b472010-05-08 11:01:39 +000011726 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011727
11728 ;
11729 return 0;
11730}
11731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011734 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011735
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Matthias Klosec511b472010-05-08 11:01:39 +000011737$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011738
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11740$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011741
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011742else
Skip Montanaro6dead952003-09-25 14:50:04 +000011743
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000011746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
11747$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
11748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11749/* end confdefs.h. */
11750
11751# include <netdb.h>
11752
11753int
11754main ()
11755{
11756
11757 char *name;
11758 struct hostent *he;
11759 struct hostent_data data;
11760
11761 (void) gethostbyname_r(name, he, &data);
11762
11763 ;
11764 return 0;
11765}
11766_ACEOF
11767if ac_fn_c_try_compile "$LINENO"; then :
11768
11769 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
11770
11771
11772$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
11773
11774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11775$as_echo "yes" >&6; }
11776
11777else
11778
11779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11780$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011787
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011790 CFLAGS=$OLD_CFLAGS
11791
11792else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011794 for ac_func in gethostbyname
11795do :
11796 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011797if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011800_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011801
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011802fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011803done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011804
Michael W. Hudson54241132001-12-07 15:38:26 +000011805
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011806fi
11807
Michael W. Hudson54241132001-12-07 15:38:26 +000011808
11809
11810
11811
11812
11813
Guido van Rossum627b2d71993-12-24 10:39:16 +000011814# checks for system services
11815# (none yet)
11816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011817# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011818ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011819if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
11823$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011824if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826else
Martin v. Löwis11437992002-04-12 09:54:03 +000011827 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011828LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832/* Override any GCC internal prototype to avoid an error.
11833 Use char because int might match the return type of a GCC
11834 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011835#ifdef __cplusplus
11836extern "C"
11837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011838char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011839int
11840main ()
11841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011842return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011850 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011851fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852rm -f core conftest.err conftest.$ac_objext \
11853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011854LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
11857$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011858if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 cat >>confdefs.h <<_ACEOF
11860#define HAVE_LIBIEEE 1
11861_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011862
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011863 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011864
Guido van Rossum627b2d71993-12-24 10:39:16 +000011865fi
11866
Michael W. Hudson54241132001-12-07 15:38:26 +000011867
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000011868fi
11869
Michael W. Hudson54241132001-12-07 15:38:26 +000011870
Guido van Rossum7f253911997-05-09 02:42:48 +000011871# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
11873$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011874
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011877 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000011878if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000011879then
11880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011882
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11884$as_echo "yes" >&6; }
11885else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11886$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011887fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000011888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11890$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011891fi
11892
Guido van Rossum7f253911997-05-09 02:42:48 +000011893
Guido van Rossum7f43da71994-08-01 12:15:30 +000011894# check for --with-libm=...
11895
Guido van Rossum563e7081996-09-10 18:20:48 +000011896case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000011897Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011898BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011899*) LIBM=-lm
11900esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
11902$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011903
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011905if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011906 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000011907if test "$withval" = no
11908then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
11910$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011911elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011912then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
11914$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011915else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011916fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
11919$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011920fi
11921
Guido van Rossum7f43da71994-08-01 12:15:30 +000011922
11923# check for --with-libc=...
11924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
11926$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011927
Martin v. Löwiseba40652007-08-30 20:10:57 +000011928# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000011930 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000011931if test "$withval" = no
11932then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
11934$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000011935elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011936then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
11938$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011939else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000011940fi
Guido van Rossum7f253911997-05-09 02:42:48 +000011941else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
11943$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944fi
11945
Guido van Rossum7f43da71994-08-01 12:15:30 +000011946
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011947# **************************************************
11948# * Check for various properties of floating point *
11949# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000011950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
11952$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011953if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011954 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011955else
11956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011958 ac_cv_little_endian_double=no
11959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011961/* end confdefs.h. */
11962
11963#include <string.h>
11964int main() {
11965 double x = 9006104071832581.0;
11966 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
11967 return 0;
11968 else
11969 return 1;
11970}
11971
11972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011974 ac_cv_little_endian_double=yes
11975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11979 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011980fi
11981
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011982fi
11983
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
11985$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011986if test "$ac_cv_little_endian_double" = yes
11987then
11988
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011990
11991fi
11992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
11994$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011995if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000011997else
11998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011999if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012000 ac_cv_big_endian_double=no
12001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012003/* end confdefs.h. */
12004
12005#include <string.h>
12006int main() {
12007 double x = 9006104071832581.0;
12008 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12009 return 0;
12010 else
12011 return 1;
12012}
12013
12014_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012016 ac_cv_big_endian_double=yes
12017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12021 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012022fi
12023
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012024fi
12025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12027$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012028if test "$ac_cv_big_endian_double" = yes
12029then
12030
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012032
12033fi
12034
12035# Some ARM platforms use a mixed-endian representation for doubles.
12036# While Python doesn't currently have full support for these platforms
12037# (see e.g., issue 1762561), we can at least make sure that float <-> string
12038# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12040$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012041if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012043else
12044
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012045if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012046 ac_cv_mixed_endian_double=no
12047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012049/* end confdefs.h. */
12050
12051#include <string.h>
12052int main() {
12053 double x = 9006104071832581.0;
12054 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12055 return 0;
12056 else
12057 return 1;
12058}
12059
12060_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012062 ac_cv_mixed_endian_double=yes
12063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12067 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012068fi
12069
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012070fi
12071
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12073$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012074if test "$ac_cv_mixed_endian_double" = yes
12075then
12076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012078
12079fi
12080
12081# The short float repr introduced in Python 3.1 requires the
12082# correctly-rounded string <-> double conversion functions from
12083# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12084# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012085# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012086# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012087
12088# This inline assembler syntax may also work for suncc and icc,
12089# so we try it on all platforms.
12090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12092$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012094/* end confdefs.h. */
12095
12096int
12097main ()
12098{
12099
Mark Dickinsona548dee2009-11-15 13:12:43 +000012100 unsigned short cw;
12101 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12102 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012103
12104 ;
12105 return 0;
12106}
12107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012109 have_gcc_asm_for_x87=yes
12110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012111 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012112fi
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12115$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012116if test "$have_gcc_asm_for_x87" = yes
12117then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012119$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012120
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012121fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012122
Mark Dickinson04b27232009-01-04 12:29:36 +000012123# Detect whether system arithmetic is subject to x87-style double
12124# rounding issues. The result of this test has little meaning on non
12125# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12126# mode is round-to-nearest and double rounding issues are present, and
12127# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12129$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012130# $BASECFLAGS may affect the result
12131ac_save_cc="$CC"
12132CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012134 ac_cv_x87_double_rounding=no
12135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012137/* end confdefs.h. */
12138
12139#include <stdlib.h>
12140#include <math.h>
12141int main() {
12142 volatile double x, y, z;
12143 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12144 x = 0.99999999999999989; /* 1-2**-53 */
12145 y = 1./x;
12146 if (y != 1.)
12147 exit(0);
12148 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12149 x = 1e16;
12150 y = 2.99999;
12151 z = x + y;
12152 if (z != 1e16+4.)
12153 exit(0);
12154 /* both tests show evidence of double rounding */
12155 exit(1);
12156}
12157
12158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012160 ac_cv_x87_double_rounding=no
12161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012163fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012166fi
12167
Mark Dickinson99abd142009-10-24 13:44:16 +000012168CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12170$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012171if test "$ac_cv_x87_double_rounding" = yes
12172then
12173
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012175
12176fi
12177
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012178# ************************************
12179# * Check for mathematical functions *
12180# ************************************
12181
12182LIBS_SAVE=$LIBS
12183LIBS="$LIBS $LIBM"
12184
Mark Dickinson265d7382008-04-21 22:32:24 +000012185# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12186# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12188$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012189if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012190 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012191else
12192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012194 ac_cv_tanh_preserves_zero_sign=no
12195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012197/* end confdefs.h. */
12198
12199#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012200#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012201int main() {
12202 /* return 0 if either negative zeros don't exist
12203 on this platform or if negative zeros exist
12204 and tanh(-0.) == -0. */
12205 if (atan2(0., -1.) == atan2(-0., -1.) ||
12206 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12207 else exit(1);
12208}
12209
12210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012212 ac_cv_tanh_preserves_zero_sign=yes
12213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012216rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12217 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012218fi
12219
Mark Dickinson265d7382008-04-21 22:32:24 +000012220fi
12221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12223$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012224if test "$ac_cv_tanh_preserves_zero_sign" = yes
12225then
12226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012227$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012228
12229fi
12230
Mark Dickinson65898e02009-09-05 10:27:00 +000012231for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012232do :
12233 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12234ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012235if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012236 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012238_ACEOF
12239
12240fi
12241done
12242
Mark Dickinson65898e02009-09-05 10:27:00 +000012243for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012244do :
12245 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12246ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012247if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000012248 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000012250_ACEOF
12251
12252fi
12253done
12254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12256"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012257if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012258 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012260 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012261fi
12262
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012263cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012264#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12267"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012268if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012272fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012273
12274cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012275#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012277ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12278"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012279if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012283fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012284
12285cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000012287_ACEOF
12288
12289
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012290LIBS=$LIBS_SAVE
12291
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012292# For multiprocessing module, check that sem_open
12293# actually works. For FreeBSD versions <= 7.2,
12294# the kernel module that provides POSIX semaphores
12295# isn't loaded by default, so an attempt to call
12296# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12298$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012299if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012300 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012303 ac_cv_posix_semaphores_enabled=yes
12304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012306/* end confdefs.h. */
12307
12308#include <unistd.h>
12309#include <fcntl.h>
12310#include <stdio.h>
12311#include <semaphore.h>
12312#include <sys/stat.h>
12313
12314int main(void) {
12315 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12316 if (a == SEM_FAILED) {
12317 perror("sem_open");
12318 return 1;
12319 }
12320 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012321 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012322 return 0;
12323}
12324
12325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012326if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012327 ac_cv_posix_semaphores_enabled=yes
12328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012333fi
12334
12335
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012336fi
12337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12339$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012340if test $ac_cv_posix_semaphores_enabled = no
12341then
12342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012344
12345fi
12346
12347# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12349$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012350if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012354 ac_cv_broken_sem_getvalue=yes
12355else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012357/* end confdefs.h. */
12358
12359#include <unistd.h>
12360#include <fcntl.h>
12361#include <stdio.h>
12362#include <semaphore.h>
12363#include <sys/stat.h>
12364
12365int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012366 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012367 int count;
12368 int res;
12369 if(a==SEM_FAILED){
12370 perror("sem_open");
12371 return 1;
12372
12373 }
12374 res = sem_getvalue(a, &count);
12375 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000012376 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012377 return res==-1 ? 1 : 0;
12378}
12379
12380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012382 ac_cv_broken_sem_getvalue=no
12383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012386rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12387 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012388fi
12389
12390
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012391fi
12392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12394$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012395if test $ac_cv_broken_sem_getvalue = yes
12396then
12397
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000012399
12400fi
12401
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012402# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12404$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012405# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012406if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012407 enableval=$enable_big_digits; case $enable_big_digits in
12408yes)
12409 enable_big_digits=30 ;;
12410no)
12411 enable_big_digits=15 ;;
1241215|30)
12413 ;;
12414*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012415 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 +000012416esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12418$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012419
12420cat >>confdefs.h <<_ACEOF
12421#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12422_ACEOF
12423
12424
12425else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12427$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000012428fi
12429
12430
Guido van Rossumef2255b2000-03-10 22:30:29 +000012431# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012433if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
12435
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012436$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012438 wchar_h="yes"
12439
Guido van Rossumef2255b2000-03-10 22:30:29 +000012440else
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012442
12443fi
12444
Michael W. Hudson54241132001-12-07 15:38:26 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012447# determine wchar_t size
12448if test "$wchar_h" = yes
12449then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12453# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12455$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012456if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012457 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012458else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12460"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463 if test "$ac_cv_type_wchar_t" = yes; then
12464 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012466as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010012467See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468 else
12469 ac_cv_sizeof_wchar_t=0
12470 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012471fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12475$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012476
12477
12478
Martin v. Löwis11437992002-04-12 09:54:03 +000012479cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012480#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012481_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012482
Michael W. Hudson54241132001-12-07 15:38:26 +000012483
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012484fi
12485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12487$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012488have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012490/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012491
12492#include <tcl.h>
12493#if TCL_UTF_MAX != 6
12494# error "NOT UCS4_TCL"
12495#endif
12496int
12497main ()
12498{
12499
12500 ;
12501 return 0;
12502}
12503_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012505
12506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012507$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012508
12509 have_ucs4_tcl=yes
12510
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12514$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012515
Skip Montanaro6dead952003-09-25 14:50:04 +000012516# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012517if test "$wchar_h" = yes
12518then
12519 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12521$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012522 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012524else
12525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012526 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012527 ac_cv_wchar_t_signed=yes
12528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012530/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012531
12532 #include <wchar.h>
12533 int main()
12534 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000012535 /* Success: exit code 0 */
12536 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012537 }
12538
12539_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012540if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012541 ac_cv_wchar_t_signed=yes
12542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012544fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012547fi
12548
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012549fi
12550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12552$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553fi
12554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
12556$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012560else
12561 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000012562fi
12563
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012564
12565if test $enable_unicode = yes
12566then
Martin v. Löwisfd917792001-06-27 20:22:04 +000012567 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012568 case "$have_ucs4_tcl" in
12569 yes) enable_unicode="ucs4"
12570 ;;
12571 *) enable_unicode="ucs2"
12572 ;;
12573 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012574fi
12575
Martin v. Löwis0036cba2002-04-12 09:58:45 +000012576
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012577case "$enable_unicode" in
12578ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012580
12581 ;;
12582ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012583 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012584
12585 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020012586no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010012587*) 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 +000012588esac
12589
Michael W. Hudson54241132001-12-07 15:38:26 +000012590
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
12592
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012593if test "$enable_unicode" = "no"
12594then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012595 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
12597$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012598else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000012599 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000012600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012602
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012603
12604 # wchar_t is only usable if it maps to an unsigned type
12605 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012606 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012607 then
12608 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012613
12614 elif test "$ac_cv_sizeof_short" = "$unicode_size"
12615 then
12616 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012618
12619 elif test "$ac_cv_sizeof_long" = "$unicode_size"
12620 then
12621 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012623
12624 else
12625 PY_UNICODE_TYPE="no type found"
12626 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
12628$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012629fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012630
12631# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12633$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012634if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637 ac_cv_c_bigendian=unknown
12638 # See if we're dealing with a universal compiler.
12639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12640/* end confdefs.h. */
12641#ifndef __APPLE_CC__
12642 not a universal capable compiler
12643 #endif
12644 typedef int dummy;
12645
Skip Montanaro6dead952003-09-25 14:50:04 +000012646_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012647if ac_fn_c_try_compile "$LINENO"; then :
12648
12649 # Check for potential -arch flags. It is not universal unless
12650 # there are at least two -arch flags with different values.
12651 ac_arch=
12652 ac_prev=
12653 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12654 if test -n "$ac_prev"; then
12655 case $ac_word in
12656 i?86 | x86_64 | ppc | ppc64)
12657 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12658 ac_arch=$ac_word
12659 else
12660 ac_cv_c_bigendian=universal
12661 break
12662 fi
12663 ;;
12664 esac
12665 ac_prev=
12666 elif test "x$ac_word" = "x-arch"; then
12667 ac_prev=arch
12668 fi
12669 done
12670fi
12671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12672 if test $ac_cv_c_bigendian = unknown; then
12673 # See if sys/param.h defines the BYTE_ORDER macro.
12674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012676#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012677 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679int
12680main ()
12681{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12683 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12684 && LITTLE_ENDIAN)
12685 bogus endian macros
12686 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
12688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012692if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012693 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012696#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012697 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012698
Martin v. Löwis11437992002-04-12 09:54:03 +000012699int
12700main ()
12701{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012702#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703 not big endian
12704 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
12706 ;
12707 return 0;
12708}
12709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012711 ac_cv_c_bigendian=yes
12712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012714fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012716fi
12717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12718 fi
12719 if test $ac_cv_c_bigendian = unknown; then
12720 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012722/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723#include <limits.h>
12724
Martin v. Löwis11437992002-04-12 09:54:03 +000012725int
12726main ()
12727{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012728#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12729 bogus endian macros
12730 #endif
12731
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ;
12733 return 0;
12734}
12735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012736if ac_fn_c_try_compile "$LINENO"; then :
12737 # It does; now see whether it defined to _BIG_ENDIAN or not.
12738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12739/* end confdefs.h. */
12740#include <limits.h>
12741
12742int
12743main ()
12744{
12745#ifndef _BIG_ENDIAN
12746 not big endian
12747 #endif
12748
12749 ;
12750 return 0;
12751}
12752_ACEOF
12753if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012754 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12759fi
12760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761 fi
12762 if test $ac_cv_c_bigendian = unknown; then
12763 # Compile a test program.
12764 if test "$cross_compiling" = yes; then :
12765 # Try to guess by grepping values from an object file.
12766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12767/* end confdefs.h. */
12768short int ascii_mm[] =
12769 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12770 short int ascii_ii[] =
12771 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12772 int use_ascii (int i) {
12773 return ascii_mm[i] + ascii_ii[i];
12774 }
12775 short int ebcdic_ii[] =
12776 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12777 short int ebcdic_mm[] =
12778 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12779 int use_ebcdic (int i) {
12780 return ebcdic_mm[i] + ebcdic_ii[i];
12781 }
12782 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784int
12785main ()
12786{
12787return use_ascii (foo) == use_ebcdic (foo);
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792if ac_fn_c_try_compile "$LINENO"; then :
12793 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12794 ac_cv_c_bigendian=yes
12795 fi
12796 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12797 if test "$ac_cv_c_bigendian" = unknown; then
12798 ac_cv_c_bigendian=no
12799 else
12800 # finding both strings is unlikely to happen, but who knows?
12801 ac_cv_c_bigendian=unknown
12802 fi
12803 fi
12804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012808/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012809$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012810int
12811main ()
12812{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012814 /* Are we little or big endian? From Harbison&Steele. */
12815 union
12816 {
12817 long int l;
12818 char c[sizeof (long int)];
12819 } u;
12820 u.l = 1;
12821 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822
12823 ;
12824 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000012825}
Martin v. Löwis11437992002-04-12 09:54:03 +000012826_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012828 ac_cv_c_bigendian=no
12829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000012831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000012834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12839$as_echo "$ac_cv_c_bigendian" >&6; }
12840 case $ac_cv_c_bigendian in #(
12841 yes)
12842 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12843;; #(
12844 no)
12845 ;; #(
12846 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000012849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850 ;; #(
12851 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012852 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010012853 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000012855
Michael W. Hudson54241132001-12-07 15:38:26 +000012856
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012857# Check whether right shifting a negative integer extends the sign bit
12858# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
12860$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012861if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000012863else
Martin v. Löwis11437992002-04-12 09:54:03 +000012864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012865if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000012866 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012870
12871int main()
12872{
Vladimir Marangozova6180282000-07-12 05:05:06 +000012873 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012874}
12875
Martin v. Löwis11437992002-04-12 09:54:03 +000012876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000012878 ac_cv_rshift_extends_sign=yes
12879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000012881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000012884fi
12885
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886fi
12887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
12889$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000012890if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012891then
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012894
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012895fi
12896
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012897# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
12899$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012900if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012902else
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012906#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012907int
12908main ()
12909{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012910
12911 FILE *f = fopen("/dev/null", "r");
12912 flockfile(f);
12913 getc_unlocked(f);
12914 funlockfile(f);
12915
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ;
12917 return 0;
12918}
12919_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012921 ac_cv_have_getc_unlocked=yes
12922else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923 ac_cv_have_getc_unlocked=no
12924fi
12925rm -f core conftest.err conftest.$ac_objext \
12926 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
12930$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012931if test "$ac_cv_have_getc_unlocked" = yes
12932then
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000012935
12936fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000012937
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012938# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000012939# save the value of LIBS so we don't actually link Python with readline
12940LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012941
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012942# On some systems we need to link readline to a termcap compatible
12943# library. NOTE: Keep the precedence of listed libraries synchronised
12944# with setup.py.
12945py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
12947$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012948for py_libtermcap in "" ncursesw ncurses curses termcap; do
12949 if test -z "$py_libtermcap"; then
12950 READLINE_LIBS="-lreadline"
12951 else
12952 READLINE_LIBS="-lreadline -l$py_libtermcap"
12953 fi
12954 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012956/* end confdefs.h. */
12957
Martin v. Löwiseba40652007-08-30 20:10:57 +000012958/* Override any GCC internal prototype to avoid an error.
12959 Use char because int might match the return type of a GCC
12960 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012961#ifdef __cplusplus
12962extern "C"
12963#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012964char readline ();
12965int
12966main ()
12967{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012974 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976rm -f core conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012978 if test $py_cv_lib_readline = yes; then
12979 break
12980 fi
12981done
12982# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
12983#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000012984if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
12986$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
12989$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000012990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012992
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000012993fi
12994
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012995# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
12997$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012998if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013000else
13001 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013002LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013004/* end confdefs.h. */
13005
Martin v. Löwiseba40652007-08-30 20:10:57 +000013006/* Override any GCC internal prototype to avoid an error.
13007 Use char because int might match the return type of a GCC
13008 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013009#ifdef __cplusplus
13010extern "C"
13011#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013012char rl_callback_handler_install ();
13013int
13014main ()
13015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013017 ;
13018 return 0;
13019}
13020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022 ac_cv_lib_readline_rl_callback_handler_install=yes
13023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026rm -f core conftest.err conftest.$ac_objext \
13027 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013028LIBS=$ac_check_lib_save_LIBS
13029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13031$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013032if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035
13036fi
13037
13038
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013039# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013041/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013042#include <readline/readline.h>
13043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013045 have_readline=yes
13046else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013047 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013048
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013049fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013050rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013051if test $have_readline = yes
13052then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013055#include <readline/readline.h>
13056
13057_ACEOF
13058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013062
13063fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013064rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013067/* end confdefs.h. */
13068#include <readline/readline.h>
13069
13070_ACEOF
13071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013072 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013074$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013075
13076fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013077rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013078
13079fi
13080
Martin v. Löwis0daad592001-09-30 21:09:59 +000013081# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13083$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013084if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013086else
Martin v. Löwis11437992002-04-12 09:54:03 +000013087 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013088LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013090/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013091
Martin v. Löwiseba40652007-08-30 20:10:57 +000013092/* Override any GCC internal prototype to avoid an error.
13093 Use char because int might match the return type of a GCC
13094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013095#ifdef __cplusplus
13096extern "C"
13097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013098char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013099int
13100main ()
13101{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013102return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013103 ;
13104 return 0;
13105}
13106_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013110 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112rm -f core conftest.err conftest.$ac_objext \
13113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013114LIBS=$ac_check_lib_save_LIBS
13115fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13117$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013118if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013121
Martin v. Löwis0daad592001-09-30 21:09:59 +000013122fi
13123
Michael W. Hudson54241132001-12-07 15:38:26 +000013124
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013125# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13127$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013128if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013130else
13131 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013132LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013134/* end confdefs.h. */
13135
13136/* Override any GCC internal prototype to avoid an error.
13137 Use char because int might match the return type of a GCC
13138 builtin and then its argument prototype would still apply. */
13139#ifdef __cplusplus
13140extern "C"
13141#endif
13142char rl_completion_display_matches_hook ();
13143int
13144main ()
13145{
13146return rl_completion_display_matches_hook ();
13147 ;
13148 return 0;
13149}
13150_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013152 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013154 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156rm -f core conftest.err conftest.$ac_objext \
13157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013158LIBS=$ac_check_lib_save_LIBS
13159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13161$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013162if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013165
13166fi
13167
13168
Martin v. Löwis0daad592001-09-30 21:09:59 +000013169# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13171$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013172if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013173 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013174else
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013176LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
Martin v. Löwiseba40652007-08-30 20:10:57 +000013180/* Override any GCC internal prototype to avoid an error.
13181 Use char because int might match the return type of a GCC
13182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013183#ifdef __cplusplus
13184extern "C"
13185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013186char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013187int
13188main ()
13189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013190return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 ;
13192 return 0;
13193}
13194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013198 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013199fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200rm -f core conftest.err conftest.$ac_objext \
13201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013202LIBS=$ac_check_lib_save_LIBS
13203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13205$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013206if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013208$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013209
Guido van Rossum353ae582001-07-10 16:45:32 +000013210fi
13211
Jack Jansendd19cf82001-12-06 22:36:17 +000013212
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013213# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013215/* end confdefs.h. */
13216#include <readline/readline.h>
13217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013219 have_readline=yes
13220else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013221 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013222
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013223fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013224rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013225if test $have_readline = yes
13226then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013228/* end confdefs.h. */
13229#include <readline/readline.h>
13230
13231_ACEOF
13232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013236
13237fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013238rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013239
13240fi
13241
Martin v. Löwis82bca632006-02-10 20:49:30 +000013242# End of readline checks: restore LIBS
13243LIBS=$LIBS_no_readline
13244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13246$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013247if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013249else
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013252 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013253else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013255/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013256
13257int main()
13258{
13259 int val1 = nice(1);
13260 if (val1 != -1 && val1 == nice(2))
13261 exit(0);
13262 exit(1);
13263}
13264
Martin v. Löwis11437992002-04-12 09:54:03 +000013265_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013267 ac_cv_broken_nice=yes
13268else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13272 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013273fi
13274
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275fi
13276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13278$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013279if test "$ac_cv_broken_nice" = yes
13280then
Martin v. Löwis11437992002-04-12 09:54:03 +000013281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013283
13284fi
13285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13287$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013288if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013291 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013292 ac_cv_broken_poll=no
13293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013295/* end confdefs.h. */
13296
13297#include <poll.h>
13298
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013299int main()
13300{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013301 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013302 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013303
13304 close (42);
13305
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013306 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013307 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013308 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013309 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013310 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013311 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013312 return 1;
13313}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013314
13315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013316if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013317 ac_cv_broken_poll=yes
13318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013319 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013320fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13322 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013324
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013325fi
13326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13328$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013329if test "$ac_cv_broken_poll" = yes
13330then
13331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013332$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013333
13334fi
13335
Brett Cannon43802422005-02-10 20:48:03 +000013336# 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 +000013337# (which is not required by ISO C or UNIX spec) and/or if we support
13338# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339ac_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 +000013340#include <$ac_cv_struct_tm>
13341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013343if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013344
13345cat >>confdefs.h <<_ACEOF
13346#define HAVE_STRUCT_TM_TM_ZONE 1
13347_ACEOF
13348
13349
13350fi
13351
13352if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013354$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013355
13356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13358"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013359if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013360 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000013361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363fi
13364
Martin v. Löwiseba40652007-08-30 20:10:57 +000013365cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000013367_ACEOF
13368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13370$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013371if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013372 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000013373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013375/* end confdefs.h. */
13376#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000013377#if !HAVE_DECL_TZNAME
13378extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013379#endif
13380
13381int
13382main ()
13383{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013384return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013385 ;
13386 return 0;
13387}
13388_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013389if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013390 ac_cv_var_tzname=yes
13391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013393fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013394rm -f core conftest.err conftest.$ac_objext \
13395 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13398$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013399 if test $ac_cv_var_tzname = yes; then
13400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013402
13403 fi
13404fi
13405
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013406
Martin v. Löwis1d459062005-03-14 21:23:33 +000013407# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13409$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013410if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013411 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013412else
13413
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013414if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013415 ac_cv_working_tzset=no
13416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013418/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013419
13420#include <stdlib.h>
13421#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013422#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013423
13424#if HAVE_TZNAME
13425extern char *tzname[];
13426#endif
13427
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013428int main()
13429{
Brett Cannon18367812003-09-19 00:59:16 +000013430 /* Note that we need to ensure that not only does tzset(3)
13431 do 'something' with localtime, but it works as documented
13432 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013433 This includes making sure that tzname is set properly if
13434 tm->tm_zone does not exist since it is the alternative way
13435 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013436
13437 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013438 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013439 */
13440
Martin v. Löwis1d459062005-03-14 21:23:33 +000013441 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013442 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13443
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013444 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013445 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013446 if (localtime(&groundhogday)->tm_hour != 0)
13447 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013448#if HAVE_TZNAME
13449 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13450 if (strcmp(tzname[0], "UTC") ||
13451 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13452 exit(1);
13453#endif
Brett Cannon18367812003-09-19 00:59:16 +000013454
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013455 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013456 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013457 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013458 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013459#if HAVE_TZNAME
13460 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13461 exit(1);
13462#endif
Brett Cannon18367812003-09-19 00:59:16 +000013463
13464 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13465 tzset();
13466 if (localtime(&groundhogday)->tm_hour != 11)
13467 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013468#if HAVE_TZNAME
13469 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13470 exit(1);
13471#endif
13472
13473#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013474 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13475 exit(1);
13476 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13477 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013478#endif
Brett Cannon18367812003-09-19 00:59:16 +000013479
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013480 exit(0);
13481}
13482
13483_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013485 ac_cv_working_tzset=yes
13486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013487 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013491fi
13492
Martin v. Löwiseba40652007-08-30 20:10:57 +000013493fi
13494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13496$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013497if test "$ac_cv_working_tzset" = yes
13498then
13499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013501
13502fi
13503
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013504# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13506$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013507if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013508 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013511/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013512#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013513int
13514main ()
13515{
13516
13517struct stat st;
13518st.st_mtim.tv_nsec = 1;
13519
13520 ;
13521 return 0;
13522}
13523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013525 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013528fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530fi
13531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13533$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013534if test "$ac_cv_stat_tv_nsec" = yes
13535then
13536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013538
13539fi
13540
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013541# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13543$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013544if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013546else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013548/* end confdefs.h. */
13549#include <sys/stat.h>
13550int
13551main ()
13552{
13553
13554struct stat st;
13555st.st_mtimespec.tv_nsec = 1;
13556
13557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013562 ac_cv_stat_tv_nsec2=yes
13563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013564 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567fi
13568
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13570$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013571if test "$ac_cv_stat_tv_nsec2" = yes
13572then
13573
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013575
13576fi
13577
Jack Jansen666b1e72001-10-31 12:11:48 +000013578# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13580$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013581if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013585/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013586#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013587int
13588main ()
13589{
Jack Jansen666b1e72001-10-31 12:11:48 +000013590
13591 int rtn;
13592 rtn = mvwdelch(0,0,0);
13593
Martin v. Löwis11437992002-04-12 09:54:03 +000013594 ;
13595 return 0;
13596}
13597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013599 ac_cv_mvwdelch_is_expression=yes
13600else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013601 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13604fi
13605
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13607$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013608
13609if test "$ac_cv_mvwdelch_is_expression" = yes
13610then
Martin v. Löwis11437992002-04-12 09:54:03 +000013611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013613
13614fi
13615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13617$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013618if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013622/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013623#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013624int
13625main ()
13626{
Jack Jansen666b1e72001-10-31 12:11:48 +000013627
13628 WINDOW *w;
13629 w->_flags = 0;
13630
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013636 ac_cv_window_has_flags=yes
13637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641fi
13642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13644$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013645
Jack Jansen666b1e72001-10-31 12:11:48 +000013646
13647if test "$ac_cv_window_has_flags" = yes
13648then
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013651
13652fi
13653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
13655$as_echo_n "checking for is_term_resized... " >&6; }
13656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013657/* end confdefs.h. */
13658#include <curses.h>
13659int
13660main ()
13661{
13662void *x=is_term_resized
13663 ;
13664 return 0;
13665}
13666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013669$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013670
Matthias Klosec511b472010-05-08 11:01:39 +000013671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13675$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013676
13677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
13681$as_echo_n "checking for resize_term... " >&6; }
13682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013683/* end confdefs.h. */
13684#include <curses.h>
13685int
13686main ()
13687{
13688void *x=resize_term
13689 ;
13690 return 0;
13691}
13692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013693if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013695$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013696
Matthias Klosec511b472010-05-08 11:01:39 +000013697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013698$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13701$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013702
13703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
13707$as_echo_n "checking for resizeterm... " >&6; }
13708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000013709/* end confdefs.h. */
13710#include <curses.h>
13711int
13712main ()
13713{
13714void *x=resizeterm
13715 ;
13716 return 0;
13717}
13718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013719if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000013720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013721$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000013722
Matthias Klosec511b472010-05-08 11:01:39 +000013723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013724$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13727$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000013728
13729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
13733$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013734
13735if test -r /dev/ptmx
13736then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13738$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013740$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013741
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13744$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000013745fi
13746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13748$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013749
13750if test -r /dev/ptc
13751then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13753$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000013756
Martin v. Löwisfefbc202006-10-17 18:59:23 +000013757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13759$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000013760fi
13761
Mark Dickinson82864d12009-11-15 16:18:58 +000013762if test "$have_long_long" = yes
13763then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
13765$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013766 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000013768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013769 if test "$cross_compiling" = yes; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013770 ac_cv_have_long_long_format=no
13771else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013773/* end confdefs.h. */
13774
13775 #include <stdio.h>
13776 #include <stddef.h>
13777 #include <string.h>
13778
13779 #ifdef HAVE_SYS_TYPES_H
13780 #include <sys/types.h>
13781 #endif
13782
13783 int main()
13784 {
13785 char buffer[256];
13786
13787 if (sprintf(buffer, "%lld", (long long)123) < 0)
13788 return 1;
13789 if (strcmp(buffer, "123"))
13790 return 1;
13791
13792 if (sprintf(buffer, "%lld", (long long)-123) < 0)
13793 return 1;
13794 if (strcmp(buffer, "-123"))
13795 return 1;
13796
13797 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
13798 return 1;
13799 if (strcmp(buffer, "123"))
13800 return 1;
13801
13802 return 0;
13803 }
13804
13805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000013807 ac_cv_have_long_long_format=yes
13808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000013810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000013813fi
13814
13815
Mark Dickinson82864d12009-11-15 16:18:58 +000013816fi
13817
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
13819$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000013820fi
13821
Mark Dickinson5ce84742009-12-31 20:48:04 +000013822if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000013823then
13824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000013826
13827fi
13828
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000013829if test $ac_sys_system = Darwin
13830then
13831 LIBS="$LIBS -framework CoreFoundation"
13832fi
13833
Mark Dickinson82864d12009-11-15 16:18:58 +000013834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
13836$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013837if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013841 ac_cv_have_size_t_format="cross -- assuming yes"
13842
Brett Cannon09d12362006-05-11 05:11:33 +000013843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000013845/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013846
Brett Cannon09d12362006-05-11 05:11:33 +000013847#include <stdio.h>
13848#include <stddef.h>
13849#include <string.h>
13850
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013851#ifdef HAVE_SYS_TYPES_H
13852#include <sys/types.h>
13853#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013854
13855#ifdef HAVE_SSIZE_T
13856typedef ssize_t Py_ssize_t;
13857#elif SIZEOF_VOID_P == SIZEOF_LONG
13858typedef long Py_ssize_t;
13859#else
13860typedef int Py_ssize_t;
13861#endif
Brett Cannon09d12362006-05-11 05:11:33 +000013862
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000013863int main()
13864{
13865 char buffer[256];
13866
Brett Cannon09d12362006-05-11 05:11:33 +000013867 if(sprintf(buffer, "%zd", (size_t)123) < 0)
13868 return 1;
13869
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000013870 if (strcmp(buffer, "123"))
13871 return 1;
13872
13873 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
13874 return 1;
13875
13876 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000013877 return 1;
13878
13879 return 0;
13880}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013881
Brett Cannon09d12362006-05-11 05:11:33 +000013882_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013883if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013884 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013887fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013890fi
13891
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
13894$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000013895if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013897$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013898
13899fi
13900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013901ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000013902#ifdef HAVE_SYS_TYPES_H
13903#include <sys/types.h>
13904#endif
13905#ifdef HAVE_SYS_SOCKET_H
13906#include <sys/socket.h>
13907#endif
13908
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013910if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000013911
Martin v. Löwis11437992002-04-12 09:54:03 +000013912else
Guido van Rossum95713eb2000-05-18 20:53:31 +000013913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000013915
13916fi
13917
Michael W. Hudson54241132001-12-07 15:38:26 +000013918
Benjamin Peterson7497e912010-10-16 00:53:39 +000013919case $ac_sys_system in
13920AIX*)
13921
13922$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
13923 ;;
13924esac
13925
13926
Michael W. Hudson54241132001-12-07 15:38:26 +000013927
13928
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000013929for h in `(cd $srcdir;echo Python/thread_*.h)`
13930do
13931 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
13932done
13933
Michael W. Hudson54241132001-12-07 15:38:26 +000013934
Neal Norwitzd24499d2005-12-18 21:36:39 +000013935SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
13937$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013938for dir in $SRCDIRS; do
13939 if test ! -d $dir; then
13940 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000013941 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013942done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
13944$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000013945
Guido van Rossum627b2d71993-12-24 10:39:16 +000013946# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000013947ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000013948
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000013949ac_config_files="$ac_config_files Modules/ld_so_aix"
13950
Martin v. Löwis11437992002-04-12 09:54:03 +000013951cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013952# This file is a shell script that caches the results of configure
13953# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000013954# scripts and configure runs, see configure's option --config-cache.
13955# It is not useful on other systems. If it contains results you don't
13956# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013957#
Martin v. Löwis11437992002-04-12 09:54:03 +000013958# config.status only pays attention to the cache file if you give it
13959# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013960#
Skip Montanaro6dead952003-09-25 14:50:04 +000013961# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000013962# loading this file, other *unset* `ac_cv_foo' will be assigned the
13963# following values.
13964
13965_ACEOF
13966
Guido van Rossumf78abae1997-01-21 22:02:36 +000013967# The following way of writing the cache mishandles newlines in values,
13968# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013969# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013970# Ultrix sh set writes to stderr and can't be redirected directly,
13971# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013972(
13973 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13974 eval ac_val=\$$ac_var
13975 case $ac_val in #(
13976 *${as_nl}*)
13977 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13979$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013980 esac
13981 case $ac_var in #(
13982 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013983 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13984 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013985 esac ;;
13986 esac
13987 done
13988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000013990 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13991 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013992 # `set' does not quote correctly, so add quotes: double-quote
13993 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013995 "s/'/'\\\\''/g;
13996 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000013998 *)
13999 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002 esac |
14003 sort
14004) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014005 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014009 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14010 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000014011 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14012 :end' >>confcache
14013if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14014 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014015 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14017$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010014018 if test ! -f "$cache_file" || test -h "$cache_file"; then
14019 cat confcache >"$cache_file"
14020 else
14021 case $cache_file in #(
14022 */* | ?:*)
14023 mv -f confcache "$cache_file"$$ &&
14024 mv -f "$cache_file"$$ "$cache_file" ;; #(
14025 *)
14026 mv -f confcache "$cache_file" ;;
14027 esac
14028 fi
14029 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014030 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14032$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014033 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014034fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014035rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014037test "x$prefix" = xNONE && prefix=$ac_default_prefix
14038# Let make expand exec_prefix.
14039test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014040
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014041DEFS=-DHAVE_CONFIG_H
14042
Skip Montanaro6dead952003-09-25 14:50:04 +000014043ac_libobjs=
14044ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014045U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014046for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14047 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014048 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14051 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14053 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014054done
14055LIBOBJS=$ac_libobjs
14056
14057LTLIBOBJS=$ac_ltlibobjs
14058
14059
Martin v. Löwis11437992002-04-12 09:54:03 +000014060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061
Matthias Klose3cef2a92012-03-14 23:39:33 +010014062: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014063ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014064ac_clean_files_save=$ac_clean_files
14065ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014066{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14067$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14068as_write_fail=0
14069cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014070#! $SHELL
14071# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014072# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014073# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014074# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014075
Martin v. Löwis11437992002-04-12 09:54:03 +000014076debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014077ac_cs_recheck=false
14078ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080SHELL=\${CONFIG_SHELL-$SHELL}
14081export SHELL
14082_ASEOF
14083cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14084## -------------------- ##
14085## M4sh Initialization. ##
14086## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014087
Martin v. Löwiseba40652007-08-30 20:10:57 +000014088# Be more Bourne compatible
14089DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014090if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014091 emulate sh
14092 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014094 # is contrary to our usage. Disable this feature.
14095 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000014097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014098 case `(set -o) 2>/dev/null` in #(
14099 *posix*) :
14100 set -o posix ;; #(
14101 *) :
14102 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014103esac
Martin v. Löwis11437992002-04-12 09:54:03 +000014104fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014105
Skip Montanaro6dead952003-09-25 14:50:04 +000014106
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014107as_nl='
14108'
14109export as_nl
14110# Printing a long string crashes Solaris 7 /usr/bin/printf.
14111as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14112as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14113as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14114# Prefer a ksh shell builtin over an external printf program on Solaris,
14115# but without wasting forks for bash or zsh.
14116if test -z "$BASH_VERSION$ZSH_VERSION" \
14117 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14118 as_echo='print -r --'
14119 as_echo_n='print -rn --'
14120elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14121 as_echo='printf %s\n'
14122 as_echo_n='printf %s'
14123else
14124 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14125 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14126 as_echo_n='/usr/ucb/echo -n'
14127 else
14128 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14129 as_echo_n_body='eval
14130 arg=$1;
14131 case $arg in #(
14132 *"$as_nl"*)
14133 expr "X$arg" : "X\\(.*\\)$as_nl";
14134 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14135 esac;
14136 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14137 '
14138 export as_echo_n_body
14139 as_echo_n='sh -c $as_echo_n_body as_echo'
14140 fi
14141 export as_echo_body
14142 as_echo='sh -c $as_echo_body as_echo'
14143fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014144
14145# The user is always right.
14146if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014147 PATH_SEPARATOR=:
14148 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14149 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14150 PATH_SEPARATOR=';'
14151 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014152fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154
14155# IFS
14156# We need space, tab and new line, in precisely that order. Quoting is
14157# there to prevent editors from complaining about space-tab.
14158# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14159# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014160IFS=" "" $as_nl"
14161
14162# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010014163as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014164case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165 *[\\/]* ) as_myself=$0 ;;
14166 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014167for as_dir in $PATH
14168do
14169 IFS=$as_save_IFS
14170 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014171 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14172 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014173IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
Martin v. Löwiseba40652007-08-30 20:10:57 +000014175 ;;
14176esac
14177# We did not find ourselves, most probably we were run as `sh COMMAND'
14178# in which case we are not to be found in the path.
14179if test "x$as_myself" = x; then
14180 as_myself=$0
14181fi
14182if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14184 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014185fi
14186
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187# Unset variables that we do not need and which cause bugs (e.g. in
14188# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14189# suppresses any "Segmentation fault" message there. '((' could
14190# trigger a bug in pdksh 5.2.14.
14191for as_var in BASH_ENV ENV MAIL MAILPATH
14192do eval test x\${$as_var+set} = xset \
14193 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194done
14195PS1='$ '
14196PS2='> '
14197PS4='+ '
14198
14199# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200LC_ALL=C
14201export LC_ALL
14202LANGUAGE=C
14203export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205# CDPATH.
14206(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14207
14208
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014209# as_fn_error STATUS ERROR [LINENO LOG_FD]
14210# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014211# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14212# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014213# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014214as_fn_error ()
14215{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014216 as_status=$1; test $as_status -eq 0 && as_status=1
14217 if test "$4"; then
14218 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14219 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014221 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014222 as_fn_exit $as_status
14223} # as_fn_error
14224
14225
14226# as_fn_set_status STATUS
14227# -----------------------
14228# Set $? to STATUS, without forking.
14229as_fn_set_status ()
14230{
14231 return $1
14232} # as_fn_set_status
14233
14234# as_fn_exit STATUS
14235# -----------------
14236# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14237as_fn_exit ()
14238{
14239 set +e
14240 as_fn_set_status $1
14241 exit $1
14242} # as_fn_exit
14243
14244# as_fn_unset VAR
14245# ---------------
14246# Portably unset VAR.
14247as_fn_unset ()
14248{
14249 { eval $1=; unset $1;}
14250}
14251as_unset=as_fn_unset
14252# as_fn_append VAR VALUE
14253# ----------------------
14254# Append the text in VALUE to the end of the definition contained in VAR. Take
14255# advantage of any shell optimizations that allow amortized linear growth over
14256# repeated appends, instead of the typical quadratic growth present in naive
14257# implementations.
14258if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14259 eval 'as_fn_append ()
14260 {
14261 eval $1+=\$2
14262 }'
14263else
14264 as_fn_append ()
14265 {
14266 eval $1=\$$1\$2
14267 }
14268fi # as_fn_append
14269
14270# as_fn_arith ARG...
14271# ------------------
14272# Perform arithmetic evaluation on the ARGs, and store the result in the
14273# global $as_val. Take advantage of shells that can avoid forks. The arguments
14274# must be portable across $(()) and expr.
14275if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14276 eval 'as_fn_arith ()
14277 {
14278 as_val=$(( $* ))
14279 }'
14280else
14281 as_fn_arith ()
14282 {
14283 as_val=`expr "$@" || test $? -eq 1`
14284 }
14285fi # as_fn_arith
14286
14287
Martin v. Löwiseba40652007-08-30 20:10:57 +000014288if expr a : '\(a\)' >/dev/null 2>&1 &&
14289 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14290 as_expr=expr
14291else
14292 as_expr=false
14293fi
14294
14295if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14296 as_basename=basename
14297else
14298 as_basename=false
14299fi
14300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014301if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14302 as_dirname=dirname
14303else
14304 as_dirname=false
14305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306
Martin v. Löwiseba40652007-08-30 20:10:57 +000014307as_me=`$as_basename -- "$0" ||
14308$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14309 X"$0" : 'X\(//\)$' \| \
14310 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312 sed '/^.*\/\([^/][^/]*\)\/*$/{
14313 s//\1/
14314 q
14315 }
14316 /^X\/\(\/\/\)$/{
14317 s//\1/
14318 q
14319 }
14320 /^X\/\(\/\).*/{
14321 s//\1/
14322 q
14323 }
14324 s/.*/./; q'`
14325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014326# Avoid depending upon Character Ranges.
14327as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14328as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14329as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14330as_cr_digits='0123456789'
14331as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000014332
14333ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014334case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014335-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014336 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000014337 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338 xy) ECHO_C='\c';;
14339 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14340 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341 esac;;
14342*)
14343 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014344esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000014347if test -d conf$$.dir; then
14348 rm -f conf$$.dir/conf$$.file
14349else
14350 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014353if (echo >conf$$.file) 2>/dev/null; then
14354 if ln -s conf$$.file conf$$ 2>/dev/null; then
14355 as_ln_s='ln -s'
14356 # ... but there are two gotchas:
14357 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14358 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14359 # In both cases, we have to default to `cp -p'.
14360 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14361 as_ln_s='cp -p'
14362 elif ln conf$$.file conf$$ 2>/dev/null; then
14363 as_ln_s=ln
14364 else
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 as_ln_s='cp -p'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014367else
14368 as_ln_s='cp -p'
14369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14371rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373
14374# as_fn_mkdir_p
14375# -------------
14376# Create "$as_dir" as a directory, including parents if necessary.
14377as_fn_mkdir_p ()
14378{
14379
14380 case $as_dir in #(
14381 -*) as_dir=./$as_dir;;
14382 esac
14383 test -d "$as_dir" || eval $as_mkdir_p || {
14384 as_dirs=
14385 while :; do
14386 case $as_dir in #(
14387 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14388 *) as_qdir=$as_dir;;
14389 esac
14390 as_dirs="'$as_qdir' $as_dirs"
14391 as_dir=`$as_dirname -- "$as_dir" ||
14392$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14393 X"$as_dir" : 'X\(//\)[^/]' \| \
14394 X"$as_dir" : 'X\(//\)$' \| \
14395 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14396$as_echo X"$as_dir" |
14397 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14398 s//\1/
14399 q
14400 }
14401 /^X\(\/\/\)[^/].*/{
14402 s//\1/
14403 q
14404 }
14405 /^X\(\/\/\)$/{
14406 s//\1/
14407 q
14408 }
14409 /^X\(\/\).*/{
14410 s//\1/
14411 q
14412 }
14413 s/.*/./; q'`
14414 test -d "$as_dir" && break
14415 done
14416 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014417 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418
14419
14420} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000014421if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014422 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000014423else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014424 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000014425 as_mkdir_p=false
14426fi
14427
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428if test -x / >/dev/null 2>&1; then
14429 as_test_x='test -x'
14430else
14431 if ls -dL / >/dev/null 2>&1; then
14432 as_ls_L_option=L
14433 else
14434 as_ls_L_option=
14435 fi
14436 as_test_x='
14437 eval sh -c '\''
14438 if test -d "$1"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014439 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000014440 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014441 case $1 in #(
14442 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014443 esac;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014444 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000014445 ???[sx]*):;;*)false;;esac;fi
14446 '\'' sh
14447 '
14448fi
14449as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
14451# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014452as_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 +000014453
14454# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000014455as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014456
14457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014459## ----------------------------------- ##
14460## Main body of $CONFIG_STATUS script. ##
14461## ----------------------------------- ##
14462_ASEOF
14463test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014465cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14466# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000014467# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000014468# values after options handling.
14469ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000014470This file was extended by python $as_me 2.7, which was
Matthias Klose3cef2a92012-03-14 23:39:33 +010014471generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
14473 CONFIG_FILES = $CONFIG_FILES
14474 CONFIG_HEADERS = $CONFIG_HEADERS
14475 CONFIG_LINKS = $CONFIG_LINKS
14476 CONFIG_COMMANDS = $CONFIG_COMMANDS
14477 $ $0 $@
14478
Martin v. Löwiseba40652007-08-30 20:10:57 +000014479on `(hostname || uname -n) 2>/dev/null | sed 1q`
14480"
14481
Martin v. Löwis11437992002-04-12 09:54:03 +000014482_ACEOF
14483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484case $ac_config_files in *"
14485"*) set x $ac_config_files; shift; ac_config_files=$*;;
14486esac
14487
14488case $ac_config_headers in *"
14489"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14490esac
14491
14492
14493cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014494# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014495config_files="$ac_config_files"
14496config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Martin v. Löwiseba40652007-08-30 20:10:57 +000014498_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014501ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502\`$as_me' instantiates files and other configuration actions
14503from templates according to the current configuration. Unless the files
14504and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000014507
14508 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000014509 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510 --config print configuration, then exit
14511 -q, --quiet, --silent
14512 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000014513 -d, --debug don't remove temporary files
14514 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014515 --file=FILE[:TEMPLATE]
14516 instantiate the configuration file FILE
14517 --header=FILE[:TEMPLATE]
14518 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
14520Configuration files:
14521$config_files
14522
14523Configuration headers:
14524$config_headers
14525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000014527
Martin v. Löwiseba40652007-08-30 20:10:57 +000014528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14530ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000014531ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000014532python config.status 2.7
Matthias Klose3cef2a92012-03-14 23:39:33 +010014533configured by $0, generated by GNU Autoconf 2.68,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000014535
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014536Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000014537This config.status script is free software; the Free Software Foundation
14538gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539
14540ac_pwd='$ac_pwd'
14541srcdir='$srcdir'
14542INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000014543MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000014545_ACEOF
14546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14548# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000014549ac_need_defaults=:
14550while test $# != 0
14551do
14552 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014553 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014554 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14555 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000014556 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014558 --*=)
14559 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14560 ac_optarg=
14561 ac_shift=:
14562 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000014564 ac_option=$1
14565 ac_optarg=$2
14566 ac_shift=shift
14567 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 esac
14569
Skip Montanaro6dead952003-09-25 14:50:04 +000014570 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000014572 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14573 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014575 $as_echo "$ac_cs_version"; exit ;;
14576 --config | --confi | --conf | --con | --co | --c )
14577 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 debug=: ;;
14580 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000014581 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582 case $ac_optarg in
14583 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014584 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585 esac
14586 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 ac_need_defaults=false;;
14588 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000014589 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014590 case $ac_optarg in
14591 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14592 esac
14593 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014595 --he | --h)
14596 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014597 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014598Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014599 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014600 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000014601 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14602 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14603 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014604
14605 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014606 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014607Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014610 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
14612 esac
14613 shift
14614done
14615
Skip Montanaro6dead952003-09-25 14:50:04 +000014616ac_configure_extra_args=
14617
14618if $ac_cs_silent; then
14619 exec 6>/dev/null
14620 ac_configure_extra_args="$ac_configure_extra_args --silent"
14621fi
14622
14623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000014625if \$ac_cs_recheck; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014626 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14627 shift
14628 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14629 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014630 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000014632fi
14633
Martin v. Löwis11437992002-04-12 09:54:03 +000014634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636exec 5>>config.log
14637{
14638 echo
14639 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14640## Running $as_me. ##
14641_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014644
Martin v. Löwiseba40652007-08-30 20:10:57 +000014645_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014647_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014648
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650
14651# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000014652for ac_config_target in $ac_config_targets
14653do
Martin v. Löwiseba40652007-08-30 20:10:57 +000014654 case $ac_config_target in
14655 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
14656 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
14657 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
14658 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000014659 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
14660 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014661 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
14662 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014663 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014664 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014665
Matthias Klose3cef2a92012-03-14 23:39:33 +010014666 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 esac
14668done
14669
Martin v. Löwiseba40652007-08-30 20:10:57 +000014670
Martin v. Löwis11437992002-04-12 09:54:03 +000014671# If the user did not use the arguments to specify the items to instantiate,
14672# then the envvar interface is used. Set only those that are not.
14673# We use the long form for the default assignment because of an extremely
14674# bizarre bug on SunOS 4.1.3.
14675if $ac_need_defaults; then
14676 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14677 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14678fi
14679
Skip Montanaro6dead952003-09-25 14:50:04 +000014680# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000014681# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000014682# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014683# Hook for its removal unless debugging.
14684# Note that there is a small window in which the directory will not be cleaned:
14685# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000014686$debug ||
14687{
Matthias Klose3cef2a92012-03-14 23:39:33 +010014688 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000014689 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010014690 : "${ac_tmp:=$tmp}"
14691 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000014692' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000014694}
Martin v. Löwis11437992002-04-12 09:54:03 +000014695# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000014696
Martin v. Löwis11437992002-04-12 09:54:03 +000014697{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014698 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010014699 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000014700} ||
14701{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014702 tmp=./conf$$-$RANDOM
14703 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014704} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010014705ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000014706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014707# Set up the scripts for CONFIG_FILES section.
14708# No need to generate them if there are no CONFIG_FILES.
14709# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014710if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014712
14713ac_cr=`echo X | tr X '\015'`
14714# On cygwin, bash can eat \r inside `` if the user requested igncr.
14715# But we know of no other shell where ac_cr would be empty at this
14716# point, so we can use a bashism as a fallback.
14717if test "x$ac_cr" = x; then
14718 eval ac_cr=\$\'\\r\'
14719fi
14720ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14721if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014722 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014723else
14724 ac_cs_awk_cr=$ac_cr
14725fi
14726
Matthias Klose3cef2a92012-03-14 23:39:33 +010014727echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000014728_ACEOF
14729
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014731{
14732 echo "cat >conf$$subs.awk <<_ACEOF" &&
14733 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14734 echo "_ACEOF"
14735} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014736 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14737ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014738ac_delim='%!_!# '
14739for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014740 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014741 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014743 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14744 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745 break
14746 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014747 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014748 else
14749 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000014753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010014755cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014757sed -n '
14758h
14759s/^/S["/; s/!.*/"]=/
14760p
14761g
14762s/^[^!]*!//
14763:repl
14764t repl
14765s/'"$ac_delim"'$//
14766t delim
14767:nl
14768h
14769s/\(.\{148\}\)..*/\1/
14770t more1
14771s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14772p
14773n
14774b repl
14775:more1
14776s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14777p
14778g
14779s/.\{148\}//
14780t nl
14781:delim
14782h
14783s/\(.\{148\}\)..*/\1/
14784t more2
14785s/["\\]/\\&/g; s/^/"/; s/$/"/
14786p
14787b
14788:more2
14789s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14790p
14791g
14792s/.\{148\}//
14793t delim
14794' <conf$$subs.awk | sed '
14795/^[^""]/{
14796 N
14797 s/\n//
14798}
14799' >>$CONFIG_STATUS || ac_write_fail=1
14800rm -f conf$$subs.awk
14801cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14802_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010014803cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014804 for (key in S) S_is_set[key] = 1
14805 FS = ""
14806
14807}
14808{
14809 line = $ 0
14810 nfields = split(line, field, "@")
14811 substed = 0
14812 len = length(field[1])
14813 for (i = 2; i < nfields; i++) {
14814 key = field[i]
14815 keylen = length(key)
14816 if (S_is_set[key]) {
14817 value = S[key]
14818 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14819 len += length(value) + length(field[++i])
14820 substed = 1
14821 } else
14822 len += 1 + keylen
14823 }
14824
14825 print line
14826}
14827
14828_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000014829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14831if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14832 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14833else
14834 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010014835fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014836 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014837_ACEOF
14838
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014839# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14840# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000014841# trailing colons and then remove the whole line if VPATH becomes empty
14842# (actually we leave an empty line to preserve line numbers).
14843if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014844 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14845h
14846s///
14847s/^/:/
14848s/[ ]*$/:/
14849s/:\$(srcdir):/:/g
14850s/:\${srcdir}:/:/g
14851s/:@srcdir@:/:/g
14852s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014853s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014854x
14855s/\(=[ ]*\).*/\1/
14856G
14857s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000014858s/^[^=]*=[ ]*$//
14859}'
14860fi
14861
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014863fi # test -n "$CONFIG_FILES"
14864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014865# Set up the scripts for CONFIG_HEADERS section.
14866# No need to generate them if there are no CONFIG_HEADERS.
14867# This happens for instance with `./config.status Makefile'.
14868if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010014869cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014870BEGIN {
14871_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014873# Transform confdefs.h into an awk script `defines.awk', embedded as
14874# here-document in config.status, that substitutes the proper values into
14875# config.h.in to produce config.h.
14876
14877# Create a delimiter string that does not exist in confdefs.h, to ease
14878# handling of long lines.
14879ac_delim='%!_!# '
14880for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010014881 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14882 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014883 break
14884 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014885 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014886 else
14887 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14888 fi
14889done
14890
14891# For the awk script, D is an array of macro values keyed by name,
14892# likewise P contains macro parameters if any. Preserve backslash
14893# newline sequences.
14894
14895ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14896sed -n '
14897s/.\{148\}/&'"$ac_delim"'/g
14898t rset
14899:rset
14900s/^[ ]*#[ ]*define[ ][ ]*/ /
14901t def
14902d
14903:def
14904s/\\$//
14905t bsnl
14906s/["\\]/\\&/g
14907s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14908D["\1"]=" \3"/p
14909s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14910d
14911:bsnl
14912s/["\\]/\\&/g
14913s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14914D["\1"]=" \3\\\\\\n"\\/p
14915t cont
14916s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14917t cont
14918d
14919:cont
14920n
14921s/.\{148\}/&'"$ac_delim"'/g
14922t clear
14923:clear
14924s/\\$//
14925t bsnlc
14926s/["\\]/\\&/g; s/^/"/; s/$/"/p
14927d
14928:bsnlc
14929s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14930b cont
14931' <confdefs.h | sed '
14932s/'"$ac_delim"'/"\\\
14933"/g' >>$CONFIG_STATUS || ac_write_fail=1
14934
14935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14936 for (key in D) D_is_set[key] = 1
14937 FS = ""
14938}
14939/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14940 line = \$ 0
14941 split(line, arg, " ")
14942 if (arg[1] == "#") {
14943 defundef = arg[2]
14944 mac1 = arg[3]
14945 } else {
14946 defundef = substr(arg[1], 2)
14947 mac1 = arg[2]
14948 }
14949 split(mac1, mac2, "(") #)
14950 macro = mac2[1]
14951 prefix = substr(line, 1, index(line, defundef) - 1)
14952 if (D_is_set[macro]) {
14953 # Preserve the white space surrounding the "#".
14954 print prefix "define", macro P[macro] D[macro]
14955 next
14956 } else {
14957 # Replace #undef with comments. This is necessary, for example,
14958 # in the case of _POSIX_SOURCE, which is predefined and required
14959 # on some systems where configure will not decide to define it.
14960 if (defundef == "undef") {
14961 print "/*", prefix defundef, macro, "*/"
14962 next
14963 }
14964 }
14965}
14966{ print }
14967_ACAWK
14968_ACEOF
14969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014970 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014971fi # test -n "$CONFIG_HEADERS"
14972
14973
14974eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
14975shift
14976for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977do
14978 case $ac_tag in
14979 :[FHLC]) ac_mode=$ac_tag; continue;;
14980 esac
14981 case $ac_mode$ac_tag in
14982 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010014983 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984 :[FH]-) ac_tag=-:-;;
14985 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14986 esac
14987 ac_save_IFS=$IFS
14988 IFS=:
14989 set x $ac_tag
14990 IFS=$ac_save_IFS
14991 shift
14992 ac_file=$1
14993 shift
14994
14995 case $ac_mode in
14996 :L) ac_source=$1;;
14997 :[FH])
14998 ac_file_inputs=
14999 for ac_f
15000 do
15001 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015002 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015003 *) # Look for the file first in the build tree, then in the source tree
15004 # (if the path is not absolute). The absolute path cannot be DOS-style,
15005 # because $ac_f cannot contain `:'.
15006 test -f "$ac_f" ||
15007 case $ac_f in
15008 [\\/$]*) false;;
15009 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15010 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010015011 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015013 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15014 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015 done
15016
15017 # Let's still pretend it is `configure' which instantiates (i.e., don't
15018 # use $as_me), people would be surprised to read:
15019 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015020 configure_input='Generated from '`
15021 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15022 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023 if test x"$ac_file" != x-; then
15024 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015025 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15026$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015028 # Neutralize special characters interpreted by sed in replacement strings.
15029 case $configure_input in #(
15030 *\&* | *\|* | *\\* )
15031 ac_sed_conf_input=`$as_echo "$configure_input" |
15032 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15033 *) ac_sed_conf_input=$configure_input;;
15034 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035
15036 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015037 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15038 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039 esac
15040 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 esac
15042
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015044$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015045 X"$ac_file" : 'X\(//\)[^/]' \| \
15046 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000015047 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015048$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15050 s//\1/
15051 q
15052 }
15053 /^X\(\/\/\)[^/].*/{
15054 s//\1/
15055 q
15056 }
15057 /^X\(\/\/\)$/{
15058 s//\1/
15059 q
15060 }
15061 /^X\(\/\).*/{
15062 s//\1/
15063 q
15064 }
15065 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015066 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 ac_builddir=.
15068
Martin v. Löwiseba40652007-08-30 20:10:57 +000015069case "$ac_dir" in
15070.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15071*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015072 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015073 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015074 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015075 case $ac_top_builddir_sub in
15076 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15077 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15078 esac ;;
15079esac
15080ac_abs_top_builddir=$ac_pwd
15081ac_abs_builddir=$ac_pwd$ac_dir_suffix
15082# for backward compatibility:
15083ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015084
15085case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015087 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088 ac_top_srcdir=$ac_top_builddir_sub
15089 ac_abs_top_srcdir=$ac_pwd ;;
15090 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092 ac_top_srcdir=$srcdir
15093 ac_abs_top_srcdir=$srcdir ;;
15094 *) # Relative name.
15095 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15096 ac_top_srcdir=$ac_top_build_prefix$srcdir
15097 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015098esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015099ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015100
Martin v. Löwis11437992002-04-12 09:54:03 +000015101
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102 case $ac_mode in
15103 :F)
15104 #
15105 # CONFIG_FILE
15106 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015107
15108 case $INSTALL in
15109 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015110 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000015112 ac_MKDIR_P=$MKDIR_P
15113 case $MKDIR_P in
15114 [\\/$]* | ?:[\\/]* ) ;;
15115 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15116 esac
Brett Cannon19fab762007-06-02 03:02:29 +000015117_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015119cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015120# If the template does not know about datarootdir, expand it.
15121# FIXME: This hack should be removed a few years after 2.60.
15122ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015123ac_sed_dataroot='
15124/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125 p
15126 q
15127}
15128/@datadir@/p
15129/@docdir@/p
15130/@infodir@/p
15131/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015132/@mandir@/p'
15133case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134*datarootdir*) ac_datarootdir_seen=yes;;
15135*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15137$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015138_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015139cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140 ac_datarootdir_hack='
15141 s&@datadir@&$datadir&g
15142 s&@docdir@&$docdir&g
15143 s&@infodir@&$infodir&g
15144 s&@localedir@&$localedir&g
15145 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015146 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015147esac
15148_ACEOF
15149
15150# Neutralize VPATH when `$srcdir' = `.'.
15151# Shell code in configure.ac might set extrasub.
15152# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15154ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015155$extrasub
15156_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015158:t
15159/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015160s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015161s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015162s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015163s&@srcdir@&$ac_srcdir&;t t
15164s&@abs_srcdir@&$ac_abs_srcdir&;t t
15165s&@top_srcdir@&$ac_top_srcdir&;t t
15166s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15167s&@builddir@&$ac_builddir&;t t
15168s&@abs_builddir@&$ac_abs_builddir&;t t
15169s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15170s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000015171s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015173"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015174eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15175 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015178 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15179 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15180 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015181 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015182which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015183$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015184which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015185
Matthias Klose3cef2a92012-03-14 23:39:33 +010015186 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010015188 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15189 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015190 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015191 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192 ;;
15193 :H)
15194 #
15195 # CONFIG_HEADER
15196 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015198 {
15199 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015200 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15201 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015202 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015203 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015204 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15205$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015207 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015208 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015209 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 fi
15211 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015212 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010015213 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015214 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015216 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015217
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218
15219 esac
15220
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015221
15222 case $ac_file$ac_mode in
15223 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15224
15225 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226done # for ac_tag
15227
Guido van Rossum627b2d71993-12-24 10:39:16 +000015228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015229as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015230_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015231ac_clean_files=$ac_clean_files_save
15232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015233test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015234 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015235
Martin v. Löwis11437992002-04-12 09:54:03 +000015236
15237# configure is writing to config.log, and then calls config.status.
15238# config.status does its own redirection, appending to config.log.
15239# Unfortunately, on DOS this fails, as config.log is still kept open
15240# by configure, so config.status won't be able to write to it; its
15241# output is simply discarded. So we exec the FD to /dev/null,
15242# effectively closing config.log, so it can be properly (re)opened and
15243# appended to by config.status. When coming back to configure, we
15244# need to make the FD available again.
15245if test "$no_create" != yes; then
15246 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015247 ac_config_status_args=
15248 test "$silent" = yes &&
15249 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015251 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 exec 5>>config.log
15253 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15254 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015255 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015256fi
15257if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15258 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15259$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015260fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015261
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015262
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015263echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015264if test ! -f Modules/Setup
15265then
15266 cp $srcdir/Modules/Setup.dist Modules/Setup
15267fi
15268
Martin v. Löwisf7afe952006-04-14 15:16:15 +000015269echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015270if test ! -f Modules/Setup.local
15271then
15272 echo "# Edit this file for local setup changes" >Modules/Setup.local
15273fi
15274
15275echo "creating Makefile"
15276$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15277 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015278 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000015279
15280case $ac_sys_system in
15281BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015283
15284 Support for BeOS is deprecated as of Python 2.6.
15285 See PEP 11 for the gory details.
15286 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015287$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000015288
15289 Support for BeOS is deprecated as of Python 2.6.
15290 See PEP 11 for the gory details.
15291 " >&2;}
15292 ;;
15293*) ;;
15294esac
15295
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015296mv config.c Modules