blob: 816b8e89279efcdbc696c3cead63e20d0e6516f7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200172test x\$exitcode = x0 || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $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 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200489 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200491 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200498 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_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 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200649ac_ct_READELF
650READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200652ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000653AR
654RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000655USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000656GNULD
657LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000658LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000662PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000663BLDLIBRARY
664DLLLIBRARY
665LDLIBRARY
666LIBRARY
667BUILDEXEEXT
668EGREP
669GREP
670CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200671NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673MAINCC
674CXX
675OBJEXT
676EXEEXT
677ac_ct_CC
678CPPFLAGS
679LDFLAGS
680CFLAGS
681CC
682EXPORT_MACOSX_DEPLOYMENT_TARGET
683CONFIGURE_MACOSX_DEPLOYMENT_TARGET
684SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200685_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000686MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000687FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000688FRAMEWORKUNIXTOOLSPREFIX
689FRAMEWORKALTINSTALLLAST
690FRAMEWORKALTINSTALLFIRST
691FRAMEWORKINSTALLLAST
692FRAMEWORKINSTALLFIRST
693PYTHONFRAMEWORKINSTALLDIR
694PYTHONFRAMEWORKPREFIX
695PYTHONFRAMEWORKDIR
696PYTHONFRAMEWORKIDENTIFIER
697PYTHONFRAMEWORK
698LIPO_32BIT_FLAGS
699ARCH_RUN_32BIT
700UNIVERSALSDK
701CONFIG_ARGS
702SOVERSION
703VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200704PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100705host_os
706host_vendor
707host_cpu
708host
709build_os
710build_vendor
711build_cpu
712build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500713HAS_HG
714HGBRANCH
715HGTAG
716HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000717target_alias
718host_alias
719build_alias
720LIBS
721ECHO_T
722ECHO_N
723ECHO_C
724DEFS
725mandir
726localedir
727libdir
728psdir
729pdfdir
730dvidir
731htmldir
732infodir
733docdir
734oldincludedir
735includedir
736localstatedir
737sharedstatedir
738sysconfdir
739datadir
740datarootdir
741libexecdir
742sbindir
743bindir
744program_transform_name
745prefix
746exec_prefix
747PACKAGE_URL
748PACKAGE_BUGREPORT
749PACKAGE_STRING
750PACKAGE_VERSION
751PACKAGE_TARNAME
752PACKAGE_NAME
753PATH_SEPARATOR
754SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000755ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000756ac_user_opts='
757enable_option_checking
758enable_universalsdk
759with_universal_archs
760with_framework_name
761enable_framework
762with_gcc
763with_cxx_main
764with_suffix
765enable_shared
766enable_profiling
767with_pydebug
768with_libs
769with_system_expat
770with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100771with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000772enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000773with_dbmliborder
774with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000775with_threads
776with_thread
777enable_ipv6
778with_doc_strings
779with_tsc
780with_pymalloc
781with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000782with_fpectl
783with_libm
784with_libc
785enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000786with_computed_gotos
787'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788 ac_precious_vars='build_alias
789host_alias
790target_alias
791CC
792CFLAGS
793LDFLAGS
794LIBS
795CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200796CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000800ac_init_help=
801ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000802ac_unrecognized_opts=
803ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804# The variables have the same names as the options, with
805# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000806cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809no_recursion=
810prefix=NONE
811program_prefix=NONE
812program_suffix=NONE
813program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818x_includes=NONE
819x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000820
821# Installation directory options.
822# These are left unexpanded so users can "make install exec_prefix=/foo"
823# and all the variables that are supposed to be based on exec_prefix
824# by default will actually change.
825# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827bindir='${exec_prefix}/bin'
828sbindir='${exec_prefix}/sbin'
829libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830datarootdir='${prefix}/share'
831datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000832sysconfdir='${prefix}/etc'
833sharedstatedir='${prefix}/com'
834localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835includedir='${prefix}/include'
836oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
838infodir='${datarootdir}/info'
839htmldir='${docdir}'
840dvidir='${docdir}'
841pdfdir='${docdir}'
842psdir='${docdir}'
843libdir='${exec_prefix}/lib'
844localedir='${datarootdir}/locale'
845mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 # If the previous option needs an argument, assign it.
852 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854 ac_prev=
855 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200859 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
860 *=) ac_optarg= ;;
861 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 # Accept the important Cygnus configure options, so we can diagnose typos.
865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 case $ac_dashdash$ac_option in
867 --)
868 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870 -bindir | --bindir | --bindi | --bind | --bin | --bi)
871 ac_prev=bindir ;;
872 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874
875 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 -cache-file | --cache-file | --cache-fil | --cache-fi \
881 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
882 ac_prev=cache_file ;;
883 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
884 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 cache_file=$ac_optarg ;;
886
887 --config-cache | -C)
888 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
896 | --dataroo | --dataro | --datar)
897 ac_prev=datarootdir ;;
898 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
899 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
900 datarootdir=$ac_optarg ;;
901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200906 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 ac_useropt_orig=$ac_useropt
908 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
909 case $ac_user_opts in
910 *"
911"enable_$ac_useropt"
912"*) ;;
913 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
914 ac_unrecognized_sep=', ';;
915 esac
916 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917
918 -docdir | --docdir | --docdi | --doc | --do)
919 ac_prev=docdir ;;
920 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
921 docdir=$ac_optarg ;;
922
923 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
924 ac_prev=dvidir ;;
925 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
926 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
928 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200932 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 ac_useropt_orig=$ac_useropt
934 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
935 case $ac_user_opts in
936 *"
937"enable_$ac_useropt"
938"*) ;;
939 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
940 ac_unrecognized_sep=', ';;
941 esac
942 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
945 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
946 | --exec | --exe | --ex)
947 ac_prev=exec_prefix ;;
948 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
949 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
950 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --with-gas.
955 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 -help | --help | --hel | --he | -h)
958 ac_init_help=long ;;
959 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
960 ac_init_help=recursive ;;
961 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
962 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000969 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
970 ac_prev=htmldir ;;
971 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
972 | --ht=*)
973 htmldir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -includedir | --includedir | --includedi | --included | --include \
976 | --includ | --inclu | --incl | --inc)
977 ac_prev=includedir ;;
978 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
979 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -infodir | --infodir | --infodi | --infod | --info | --inf)
983 ac_prev=infodir ;;
984 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -libdir | --libdir | --libdi | --libd)
988 ac_prev=libdir ;;
989 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
993 | --libexe | --libex | --libe)
994 ac_prev=libexecdir ;;
995 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
996 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 -localedir | --localedir | --localedi | --localed | --locale)
1000 ac_prev=localedir ;;
1001 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1002 localedir=$ac_optarg ;;
1003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006 ac_prev=localstatedir ;;
1007 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001008 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1012 ac_prev=mandir ;;
1013 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --without-fp.
1018 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 no_create=yes ;;
1023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1025 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1026 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1029 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1030 | --oldin | --oldi | --old | --ol | --o)
1031 ac_prev=oldincludedir ;;
1032 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1033 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1034 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1038 ac_prev=prefix ;;
1039 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1043 | --program-pre | --program-pr | --program-p)
1044 ac_prev=program_prefix ;;
1045 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1046 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
1049 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1050 | --program-suf | --program-su | --program-s)
1051 ac_prev=program_suffix ;;
1052 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1053 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -program-transform-name | --program-transform-name \
1057 | --program-transform-nam | --program-transform-na \
1058 | --program-transform-n | --program-transform- \
1059 | --program-transform | --program-transfor \
1060 | --program-transfo | --program-transf \
1061 | --program-trans | --program-tran \
1062 | --progr-tra | --program-tr | --program-t)
1063 ac_prev=program_transform_name ;;
1064 -program-transform-name=* | --program-transform-name=* \
1065 | --program-transform-nam=* | --program-transform-na=* \
1066 | --program-transform-n=* | --program-transform-=* \
1067 | --program-transform=* | --program-transfor=* \
1068 | --program-transfo=* | --program-transf=* \
1069 | --program-trans=* | --program-tran=* \
1070 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1074 ac_prev=pdfdir ;;
1075 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1076 pdfdir=$ac_optarg ;;
1077
1078 -psdir | --psdir | --psdi | --psd | --ps)
1079 ac_prev=psdir ;;
1080 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1081 psdir=$ac_optarg ;;
1082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1084 | -silent | --silent | --silen | --sile | --sil)
1085 silent=yes ;;
1086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1088 ac_prev=sbindir ;;
1089 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1090 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
1093 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1094 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1095 | --sharedst | --shareds | --shared | --share | --shar \
1096 | --sha | --sh)
1097 ac_prev=sharedstatedir ;;
1098 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1099 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1100 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1101 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104 -site | --site | --sit)
1105 ac_prev=site ;;
1106 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1110 ac_prev=srcdir ;;
1111 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1115 | --syscon | --sysco | --sysc | --sys | --sy)
1116 ac_prev=sysconfdir ;;
1117 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1118 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1127 verbose=yes ;;
1128
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 -version | --version | --versio | --versi | --vers | -V)
1130 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001151 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001152 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001153 ac_useropt_orig=$ac_useropt
1154 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1155 case $ac_user_opts in
1156 *"
1157"with_$ac_useropt"
1158"*) ;;
1159 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1160 ac_unrecognized_sep=', ';;
1161 esac
1162 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 --x)
1165 # Obsolete; use --with-x.
1166 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1169 | --x-incl | --x-inc | --x-in | --x-i)
1170 ac_prev=x_includes ;;
1171 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1172 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1176 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1177 ac_prev=x_libraries ;;
1178 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1179 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001182 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1183Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ;;
1185
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 *=*)
1187 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1188 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 case $ac_envvar in #(
1190 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001191 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 export $ac_envvar ;;
1195
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001196 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001201 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202 ;;
1203
1204 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205done
1206
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210fi
1211
Matthias Kloseb9621712010-04-24 17:59:49 +00001212if test -n "$ac_unrecognized_opts"; then
1213 case $enable_option_checking in
1214 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1217 esac
1218fi
1219
1220# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1222 datadir sysconfdir sharedstatedir localstatedir includedir \
1223 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1224 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 # Remove trailing slashes.
1228 case $ac_val in
1229 */ )
1230 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1231 eval $ac_var=\$ac_val;;
1232 esac
1233 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 [\\/$]* | ?:[\\/]* ) continue;;
1236 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001238 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001239done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241# There might be people who depend on the old broken behavior: `$host'
1242# used to hold the argument of --host etc.
1243# FIXME: To remove some day.
1244build=$build_alias
1245host=$host_alias
1246target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248# FIXME: To remove some day.
1249if test "x$host_alias" != x; then
1250 if test "x$build_alias" = x; then
1251 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001252 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1253 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 elif test "x$build_alias" != "x$host_alias"; then
1255 cross_compiling=yes
1256 fi
1257fi
1258
1259ac_tool_prefix=
1260test -n "$host_alias" && ac_tool_prefix=$host_alias-
1261
1262test "$silent" = yes && exec 6>/dev/null
1263
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265ac_pwd=`pwd` && test -n "$ac_pwd" &&
1266ac_ls_di=`ls -di .` &&
1267ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271
1272
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273# Find the source files, if location was not specified.
1274if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 ac_confdir=`$as_dirname -- "$as_myself" ||
1278$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1279 X"$as_myself" : 'X\(//\)[^/]' \| \
1280 X"$as_myself" : 'X\(//\)$' \| \
1281 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1282$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1284 s//\1/
1285 q
1286 }
1287 /^X\(\/\/\)[^/].*/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\/\)$/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\).*/{
1296 s//\1/
1297 q
1298 }
1299 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302 srcdir=..
1303 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304else
1305 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307if test ! -r "$srcdir/$ac_unique_file"; then
1308 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1312ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001314 pwd)`
1315# When building in place, set srcdir=.
1316if test "$ac_abs_confdir" = "$ac_pwd"; then
1317 srcdir=.
1318fi
1319# Remove unnecessary trailing slashes from srcdir.
1320# Double slashes in file names in object file debugging info
1321# mess up M-x gdb in Emacs.
1322case $srcdir in
1323*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1324esac
1325for ac_var in $ac_precious_vars; do
1326 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1327 eval ac_env_${ac_var}_value=\$${ac_var}
1328 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1329 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331
Martin v. Löwis11437992002-04-12 09:54:03 +00001332#
1333# Report the --help message.
1334#
1335if test "$ac_init_help" = "long"; then
1336 # Omit some internal or obsolete options to make the list less imposing.
1337 # This message is too long to be a string in the A/UX 3.1 sh.
1338 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001339\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341Usage: $0 [OPTION]... [VAR=VALUE]...
1342
1343To assign environment variables (e.g., CC, CFLAGS...), specify them as
1344VAR=VALUE. See below for descriptions of some of the useful variables.
1345
1346Defaults for the options are specified in brackets.
1347
1348Configuration:
1349 -h, --help display this help and exit
1350 --help=short display options specific to this package
1351 --help=recursive display the short help of all the included packages
1352 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001353 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 --cache-file=FILE cache test results in FILE [disabled]
1355 -C, --config-cache alias for \`--cache-file=config.cache'
1356 -n, --no-create do not create output files
1357 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1358
Martin v. Löwis11437992002-04-12 09:54:03 +00001359Installation directories:
1360 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001361 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001362 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001363 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364
1365By default, \`make install' will install all the files in
1366\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1367an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1368for instance \`--prefix=\$HOME'.
1369
1370For better control, use the options below.
1371
1372Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 --bindir=DIR user executables [EPREFIX/bin]
1374 --sbindir=DIR system admin executables [EPREFIX/sbin]
1375 --libexecdir=DIR program executables [EPREFIX/libexec]
1376 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1377 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1378 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1379 --libdir=DIR object code libraries [EPREFIX/lib]
1380 --includedir=DIR C header files [PREFIX/include]
1381 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1382 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1383 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1384 --infodir=DIR info documentation [DATAROOTDIR/info]
1385 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1386 --mandir=DIR man documentation [DATAROOTDIR/man]
1387 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1388 --htmldir=DIR html documentation [DOCDIR]
1389 --dvidir=DIR dvi documentation [DOCDIR]
1390 --pdfdir=DIR pdf documentation [DOCDIR]
1391 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392_ACEOF
1393
1394 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001395
1396System types:
1397 --build=BUILD configure for building on BUILD [guessed]
1398 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001399_ACEOF
1400fi
1401
1402if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001403 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001404 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001405 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 cat <<\_ACEOF
1407
1408Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001409 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1411 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001412 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001413 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --enable-framework[=INSTALLDIR]
1415 Build (MacOSX|Darwin) framework
1416 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001417 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001418 --enable-loadable-sqlite-extensions
1419 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --enable-ipv6 Enable ipv6 (with ipv4) support
1421 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001422 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425Optional Packages:
1426 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1427 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001428 --with-universal-archs=ARCH
1429 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001430 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001431 --with-framework-name=FRAMEWORK
1432 specify an alternate name of the framework built
1433 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001435 --with-cxx-main=<compiler>
1436 compile main() and link python executable with C++
1437 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-suffix=.exe set executable suffix
1439 --with-pydebug build with Py_DEBUG defined
1440 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001441 --with-system-expat build pyexpat module using an installed expat
1442 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001443 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001444 --with-system-libmpdec build _decimal module using an installed libmpdec
1445 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001446 --with-dbmliborder=db1:db2:...
1447 order to check db backends for dbm. Valid value is a
1448 colon separated string with the backend names
1449 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with(out)-threads[=DIRECTORY]
1452 disable/enable thread support
1453 --with(out)-thread[=DIRECTORY]
1454 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001456 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001458 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with-fpectl enable SIGFPE catching
1460 --with-libm=STRING math library
1461 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001462 --with(out)-computed-gotos
1463 Use computed gotos in evaluation loop (enabled by
1464 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001465
1466Some influential environment variables:
1467 CC C compiler command
1468 CFLAGS C compiler flags
1469 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1470 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 CPP C preprocessor
1475
1476Use these variables to override the choices made by `configure' or to help
1477it to find libraries and programs with nonstandard names/locations.
1478
Georg Brandle2e15612009-05-20 18:25:10 +00001479Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001482fi
1483
1484if test "$ac_init_help" = "recursive"; then
1485 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 test -d "$ac_dir" ||
1488 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1489 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_builddir=.
1491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492case "$ac_dir" in
1493.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1494*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 case $ac_top_builddir_sub in
1499 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1501 esac ;;
1502esac
1503ac_abs_top_builddir=$ac_pwd
1504ac_abs_builddir=$ac_pwd$ac_dir_suffix
1505# for backward compatibility:
1506ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001507
1508case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 ac_top_srcdir=$ac_top_builddir_sub
1512 ac_abs_top_srcdir=$ac_pwd ;;
1513 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 ac_top_srcdir=$srcdir
1516 ac_abs_top_srcdir=$srcdir ;;
1517 *) # Relative name.
1518 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1519 ac_top_srcdir=$ac_top_build_prefix$srcdir
1520 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001521esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 cd "$ac_dir" || { ac_status=$?; continue; }
1525 # Check for guested configure.
1526 if test -f "$ac_srcdir/configure.gnu"; then
1527 echo &&
1528 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1529 elif test -f "$ac_srcdir/configure"; then
1530 echo &&
1531 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 fi || ac_status=$?
1535 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 done
1537fi
1538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001540if $ac_init_version; then
1541 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001542python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001543generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001545Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546This configure script is free software; the Free Software Foundation
1547gives unlimited permission to copy, distribute and modify it.
1548_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001551
1552## ------------------------ ##
1553## Autoconf initialization. ##
1554## ------------------------ ##
1555
1556# ac_fn_c_try_compile LINENO
1557# --------------------------
1558# Try to compile conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_compile ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 rm -f conftest.$ac_objext
1563 if { { ac_try="$ac_compile"
1564case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567esac
1568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569$as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_compile") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } && {
1579 test -z "$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 } && test -s conftest.$ac_objext; then :
1582 ac_retval=0
1583else
1584 $as_echo "$as_me: failed program was:" >&5
1585sed 's/^/| /' conftest.$ac_ext >&5
1586
1587 ac_retval=1
1588fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001589 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 as_fn_set_status $ac_retval
1591
1592} # ac_fn_c_try_compile
1593
Matthias Kloseb9621712010-04-24 17:59:49 +00001594# ac_fn_c_try_link LINENO
1595# -----------------------
1596# Try to link conftest.$ac_ext, and return whether this succeeded.
1597ac_fn_c_try_link ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 rm -f conftest.$ac_objext conftest$ac_exeext
1601 if { { ac_try="$ac_link"
1602case "(($ac_try" in
1603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1604 *) ac_try_echo=$ac_try;;
1605esac
1606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1607$as_echo "$ac_try_echo"; } >&5
1608 (eval "$ac_link") 2>conftest.err
1609 ac_status=$?
1610 if test -s conftest.err; then
1611 grep -v '^ *+' conftest.err >conftest.er1
1612 cat conftest.er1 >&5
1613 mv -f conftest.er1 conftest.err
1614 fi
1615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1616 test $ac_status = 0; } && {
1617 test -z "$ac_c_werror_flag" ||
1618 test ! -s conftest.err
1619 } && test -s conftest$ac_exeext && {
1620 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001621 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 }; then :
1623 ac_retval=0
1624else
1625 $as_echo "$as_me: failed program was:" >&5
1626sed 's/^/| /' conftest.$ac_ext >&5
1627
1628 ac_retval=1
1629fi
1630 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1631 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1632 # interfere with the next link command; also delete a directory that is
1633 # left behind by Apple's compiler. We do this before executing the actions.
1634 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001635 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 as_fn_set_status $ac_retval
1637
1638} # ac_fn_c_try_link
1639
Matthias Kloseb9621712010-04-24 17:59:49 +00001640# ac_fn_c_try_cpp LINENO
1641# ----------------------
1642# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_cpp ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 if { { ac_try="$ac_cpp conftest.$ac_ext"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001661 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001662 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 }; then :
1665 ac_retval=0
1666else
1667 $as_echo "$as_me: failed program was:" >&5
1668sed 's/^/| /' conftest.$ac_ext >&5
1669
1670 ac_retval=1
1671fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001672 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 as_fn_set_status $ac_retval
1674
1675} # ac_fn_c_try_cpp
1676
1677# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1678# -------------------------------------------------------
1679# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1680# the include files in INCLUDES and setting the cache variable VAR
1681# accordingly.
1682ac_fn_c_check_header_mongrel ()
1683{
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001685 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1687$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001688if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001689 $as_echo_n "(cached) " >&6
1690fi
1691eval ac_res=\$$3
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1693$as_echo "$ac_res" >&6; }
1694else
1695 # Is the header compilable?
1696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1697$as_echo_n "checking $2 usability... " >&6; }
1698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699/* end confdefs.h. */
1700$4
1701#include <$2>
1702_ACEOF
1703if ac_fn_c_try_compile "$LINENO"; then :
1704 ac_header_compiler=yes
1705else
1706 ac_header_compiler=no
1707fi
1708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1710$as_echo "$ac_header_compiler" >&6; }
1711
1712# Is the header present?
1713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1714$as_echo_n "checking $2 presence... " >&6; }
1715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1716/* end confdefs.h. */
1717#include <$2>
1718_ACEOF
1719if ac_fn_c_try_cpp "$LINENO"; then :
1720 ac_header_preproc=yes
1721else
1722 ac_header_preproc=no
1723fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001724rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1726$as_echo "$ac_header_preproc" >&6; }
1727
1728# So? What about this header?
1729case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1730 yes:no: )
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1732$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1734$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1735 ;;
1736 no:yes:* )
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1738$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1740$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1742$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1744$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1746$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001747( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001748## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001749## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 ) | sed "s/^/$as_me: WARNING: /" >&2
1751 ;;
1752esac
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1754$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001755if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 $as_echo_n "(cached) " >&6
1757else
1758 eval "$3=\$ac_header_compiler"
1759fi
1760eval ac_res=\$$3
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1762$as_echo "$ac_res" >&6; }
1763fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765
1766} # ac_fn_c_check_header_mongrel
1767
1768# ac_fn_c_try_run LINENO
1769# ----------------------
1770# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1771# that executables *can* be run.
1772ac_fn_c_try_run ()
1773{
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775 if { { ac_try="$ac_link"
1776case "(($ac_try" in
1777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778 *) ac_try_echo=$ac_try;;
1779esac
1780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781$as_echo "$ac_try_echo"; } >&5
1782 (eval "$ac_link") 2>&5
1783 ac_status=$?
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1786 { { case "(($ac_try" in
1787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1788 *) ac_try_echo=$ac_try;;
1789esac
1790eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1791$as_echo "$ac_try_echo"; } >&5
1792 (eval "$ac_try") 2>&5
1793 ac_status=$?
1794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1795 test $ac_status = 0; }; }; then :
1796 ac_retval=0
1797else
1798 $as_echo "$as_me: program exited with status $ac_status" >&5
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=$ac_status
1803fi
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_run
1809
1810# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1811# -------------------------------------------------------
1812# Tests whether HEADER exists and can be compiled using the include files in
1813# INCLUDES, setting the cache variable VAR accordingly.
1814ac_fn_c_check_header_compile ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001819if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821else
1822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823/* end confdefs.h. */
1824$4
1825#include <$2>
1826_ACEOF
1827if ac_fn_c_try_compile "$LINENO"; then :
1828 eval "$3=yes"
1829else
1830 eval "$3=no"
1831fi
1832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1833fi
1834eval ac_res=\$$3
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001838
1839} # ac_fn_c_check_header_compile
1840
Matthias Kloseb9621712010-04-24 17:59:49 +00001841# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1842# -------------------------------------------
1843# Tests whether TYPE exists after having included INCLUDES, setting cache
1844# variable VAR accordingly.
1845ac_fn_c_check_type ()
1846{
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1849$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001850if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 $as_echo_n "(cached) " >&6
1852else
1853 eval "$3=no"
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855/* end confdefs.h. */
1856$4
1857int
1858main ()
1859{
1860if (sizeof ($2))
1861 return 0;
1862 ;
1863 return 0;
1864}
1865_ACEOF
1866if ac_fn_c_try_compile "$LINENO"; then :
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870int
1871main ()
1872{
1873if (sizeof (($2)))
1874 return 0;
1875 ;
1876 return 0;
1877}
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880
1881else
1882 eval "$3=yes"
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885fi
1886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1887fi
1888eval ac_res=\$$3
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1890$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001891 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001892
1893} # ac_fn_c_check_type
1894
1895# ac_fn_c_find_uintX_t LINENO BITS VAR
1896# ------------------------------------
1897# Finds an unsigned integer type with width BITS, setting cache variable VAR
1898# accordingly.
1899ac_fn_c_find_uintX_t ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1903$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001904if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905 $as_echo_n "(cached) " >&6
1906else
1907 eval "$3=no"
1908 # Order is important - never check a type that is potentially smaller
1909 # than half of the expected target width.
1910 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1911 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$ac_includes_default
1915int
1916main ()
1917{
1918static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001919test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925if ac_fn_c_try_compile "$LINENO"; then :
1926 case $ac_type in #(
1927 uint$2_t) :
1928 eval "$3=yes" ;; #(
1929 *) :
1930 eval "$3=\$ac_type" ;;
1931esac
1932fi
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001934 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935
1936else
1937 break
1938fi
1939 done
1940fi
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001945
1946} # ac_fn_c_find_uintX_t
1947
1948# ac_fn_c_find_intX_t LINENO BITS VAR
1949# -----------------------------------
1950# Finds a signed integer type with width BITS, setting cache variable VAR
1951# accordingly.
1952ac_fn_c_find_intX_t ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1956$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 $as_echo_n "(cached) " >&6
1959else
1960 eval "$3=no"
1961 # Order is important - never check a type that is potentially smaller
1962 # than half of the expected target width.
1963 for ac_type in int$2_t 'int' 'long int' \
1964 'long long int' 'short int' 'signed char'; do
1965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966/* end confdefs.h. */
1967$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001969int
1970main ()
1971{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001972static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001973test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001983 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001984int
1985main ()
1986{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001987static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001988 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001989test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991 ;
1992 return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"; then :
1996
1997else
1998 case $ac_type in #(
1999 int$2_t) :
2000 eval "$3=yes" ;; #(
2001 *) :
2002 eval "$3=\$ac_type" ;;
2003esac
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002008 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002009
2010else
2011 break
2012fi
2013 done
2014fi
2015eval ac_res=\$$3
2016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2017$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002018 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020} # ac_fn_c_find_intX_t
2021
2022# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2023# --------------------------------------------
2024# Tries to find the compile-time value of EXPR in a program that includes
2025# INCLUDES, setting VAR accordingly. Returns whether the value could be
2026# computed
2027ac_fn_c_compute_int ()
2028{
2029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030 if test "$cross_compiling" = yes; then
2031 # Depending upon the size, compute the lo and hi bounds.
2032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
2036main ()
2037{
2038static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002039test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_lo=0 ac_mid=0
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002055test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=$ac_mid; break
2063else
2064 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2065 if test $ac_lo -le $ac_mid; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002081test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_hi=-1 ac_mid=-1
2089 while :; do
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002097test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_lo=$ac_mid; break
2105else
2106 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2107 if test $ac_mid -le $ac_hi; then
2108 ac_lo= ac_hi=
2109 break
2110 fi
2111 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114 done
2115else
2116 ac_lo= ac_hi=
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121# Binary search between lo and hi bounds.
2122while test "x$ac_lo" != "x$ac_hi"; do
2123 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002131test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_hi=$ac_mid
2139else
2140 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143done
2144case $ac_lo in #((
2145?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2146'') ac_retval=1 ;;
2147esac
2148 else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152static long int longval () { return $2; }
2153static unsigned long int ulongval () { return $2; }
2154#include <stdio.h>
2155#include <stdlib.h>
2156int
2157main ()
2158{
2159
2160 FILE *f = fopen ("conftest.val", "w");
2161 if (! f)
2162 return 1;
2163 if (($2) < 0)
2164 {
2165 long int i = longval ();
2166 if (i != ($2))
2167 return 1;
2168 fprintf (f, "%ld", i);
2169 }
2170 else
2171 {
2172 unsigned long int i = ulongval ();
2173 if (i != ($2))
2174 return 1;
2175 fprintf (f, "%lu", i);
2176 }
2177 /* Do not output a trailing newline, as this causes \r\n confusion
2178 on some platforms. */
2179 return ferror (f) || fclose (f) != 0;
2180
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_run "$LINENO"; then :
2186 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2187else
2188 ac_retval=1
2189fi
2190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2191 conftest.$ac_objext conftest.beam conftest.$ac_ext
2192rm -f conftest.val
2193
2194 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002195 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002196 as_fn_set_status $ac_retval
2197
2198} # ac_fn_c_compute_int
2199
2200# ac_fn_c_check_func LINENO FUNC VAR
2201# ----------------------------------
2202# Tests whether FUNC exists, setting the cache variable VAR accordingly
2203ac_fn_c_check_func ()
2204{
2205 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002208if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002209 $as_echo_n "(cached) " >&6
2210else
2211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212/* end confdefs.h. */
2213/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2214 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2215#define $2 innocuous_$2
2216
2217/* System header to define __stub macros and hopefully few prototypes,
2218 which can conflict with char $2 (); below.
2219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2220 <limits.h> exists even on freestanding compilers. */
2221
2222#ifdef __STDC__
2223# include <limits.h>
2224#else
2225# include <assert.h>
2226#endif
2227
2228#undef $2
2229
2230/* Override any GCC internal prototype to avoid an error.
2231 Use char because int might match the return type of a GCC
2232 builtin and then its argument prototype would still apply. */
2233#ifdef __cplusplus
2234extern "C"
2235#endif
2236char $2 ();
2237/* The GNU C library defines this for functions which it implements
2238 to always fail with ENOSYS. Some functions are actually named
2239 something starting with __ and the normal name is an alias. */
2240#if defined __stub_$2 || defined __stub___$2
2241choke me
2242#endif
2243
2244int
2245main ()
2246{
2247return $2 ();
2248 ;
2249 return 0;
2250}
2251_ACEOF
2252if ac_fn_c_try_link "$LINENO"; then :
2253 eval "$3=yes"
2254else
2255 eval "$3=no"
2256fi
2257rm -f core conftest.err conftest.$ac_objext \
2258 conftest$ac_exeext conftest.$ac_ext
2259fi
2260eval ac_res=\$$3
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2262$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002263 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002264
2265} # ac_fn_c_check_func
2266
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002267# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2268# ---------------------------------------------
2269# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2270# accordingly.
2271ac_fn_c_check_decl ()
2272{
2273 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274 as_decl_name=`echo $2|sed 's/ *(.*//'`
2275 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2277$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2278if eval \${$3+:} false; then :
2279 $as_echo_n "(cached) " >&6
2280else
2281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h. */
2283$4
2284int
2285main ()
2286{
2287#ifndef $as_decl_name
2288#ifdef __cplusplus
2289 (void) $as_decl_use;
2290#else
2291 (void) $as_decl_name;
2292#endif
2293#endif
2294
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_compile "$LINENO"; then :
2300 eval "$3=yes"
2301else
2302 eval "$3=no"
2303fi
2304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305fi
2306eval ac_res=\$$3
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2308$as_echo "$ac_res" >&6; }
2309 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310
2311} # ac_fn_c_check_decl
2312
Matthias Kloseb9621712010-04-24 17:59:49 +00002313# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2314# ----------------------------------------------------
2315# Tries to find if the field MEMBER exists in type AGGR, after including
2316# INCLUDES, setting cache variable VAR accordingly.
2317ac_fn_c_check_member ()
2318{
2319 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2321$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002322if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002323 $as_echo_n "(cached) " >&6
2324else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h. */
2327$5
2328int
2329main ()
2330{
2331static $2 ac_aggr;
2332if (ac_aggr.$3)
2333return 0;
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$4=yes"
2340else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342/* end confdefs.h. */
2343$5
2344int
2345main ()
2346{
2347static $2 ac_aggr;
2348if (sizeof ac_aggr.$3)
2349return 0;
2350 ;
2351 return 0;
2352}
2353_ACEOF
2354if ac_fn_c_try_compile "$LINENO"; then :
2355 eval "$4=yes"
2356else
2357 eval "$4=no"
2358fi
2359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363eval ac_res=\$$4
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002366 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002367
2368} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002370This file contains any messages produced by compilers while
2371running configure, to aid debugging if configure makes a mistake.
2372
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002373It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002374generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002375
2376 $ $0 $@
2377
2378_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002380{
2381cat <<_ASUNAME
2382## --------- ##
2383## Platform. ##
2384## --------- ##
2385
2386hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2387uname -m = `(uname -m) 2>/dev/null || echo unknown`
2388uname -r = `(uname -r) 2>/dev/null || echo unknown`
2389uname -s = `(uname -s) 2>/dev/null || echo unknown`
2390uname -v = `(uname -v) 2>/dev/null || echo unknown`
2391
2392/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2393/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2394
2395/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2396/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2397/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002399/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2400/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2401/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2402
2403_ASUNAME
2404
2405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2406for as_dir in $PATH
2407do
2408 IFS=$as_save_IFS
2409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 $as_echo "PATH: $as_dir"
2411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002413
2414} >&5
2415
2416cat >&5 <<_ACEOF
2417
2418
2419## ----------- ##
2420## Core tests. ##
2421## ----------- ##
2422
2423_ACEOF
2424
2425
2426# Keep a trace of the command line.
2427# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002428# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002429# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002430# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002431ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002432ac_configure_args0=
2433ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002434ac_must_keep_next=false
2435for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002436do
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 for ac_arg
2438 do
2439 case $ac_arg in
2440 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2441 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2442 | -silent | --silent | --silen | --sile | --sil)
2443 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 esac
2447 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002452 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002454 case $ac_arg in
2455 *=* | --config-cache | -C | -disable-* | --disable-* \
2456 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2457 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2458 | -with-* | --with-* | -without-* | --without-* | --x)
2459 case "$ac_configure_args0 " in
2460 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2461 esac
2462 ;;
2463 -* ) ac_must_keep_next=true ;;
2464 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470done
Matthias Kloseb9621712010-04-24 17:59:49 +00002471{ ac_configure_args0=; unset ac_configure_args0;}
2472{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002473
2474# When interrupted or exit'd, cleanup temporary files, and complete
2475# config.log. We remove comments because anyway the quotes in there
2476# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477# WARNING: Use '\'' to represent an apostrophe within the trap.
2478# 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 +00002479trap 'exit_status=$?
2480 # Save into config.log some information that might help in debugging.
2481 {
2482 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002483
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002484 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002485## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
2488 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489(
2490 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2491 eval ac_val=\$$ac_var
2492 case $ac_val in #(
2493 *${as_nl}*)
2494 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2496$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
2498 case $ac_var in #(
2499 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2501 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 esac ;;
2503 esac
2504 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2507 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 "s/'\''/'\''\\\\'\'''\''/g;
2510 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2511 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002512 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002514 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac |
2516 sort
2517)
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002519
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002521## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 echo
2524 for ac_var in $ac_subst_vars
2525 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 eval ac_val=\$$ac_var
2527 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 done | sort
2532 echo
2533
2534 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 echo
2539 for ac_var in $ac_subst_files
2540 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 eval ac_val=\$$ac_var
2542 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 done | sort
2547 echo
2548 fi
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002552## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 echo
2557 fi
2558 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 $as_echo "$as_me: caught signal $ac_signal"
2560 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 rm -f core *.core core.conftest.* &&
2563 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002566for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002567 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002568done
2569ac_signal=0
2570
2571# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
Matthias Kloseb9621712010-04-24 17:59:49 +00002574$as_echo "/* confdefs.h */" > confdefs.h
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576# Predefined preprocessor variables.
2577
2578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_NAME "$PACKAGE_NAME"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2584_ACEOF
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586cat >>confdefs.h <<_ACEOF
2587#define PACKAGE_VERSION "$PACKAGE_VERSION"
2588_ACEOF
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_STRING "$PACKAGE_STRING"
2592_ACEOF
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2596_ACEOF
2597
Matthias Kloseb9621712010-04-24 17:59:49 +00002598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_URL "$PACKAGE_URL"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602
2603# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002604# Prefer an explicitly selected file to automatically selected ones.
2605ac_site_file1=NONE
2606ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 # We do not want a PATH search for config.site.
2609 case $CONFIG_SITE in #((
2610 -*) ac_site_file1=./$CONFIG_SITE;;
2611 */*) ac_site_file1=$CONFIG_SITE;;
2612 *) ac_site_file1=./$CONFIG_SITE;;
2613 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 ac_site_file1=$prefix/share/config.site
2616 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 ac_site_file1=$ac_default_prefix/share/config.site
2619 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002621for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622do
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 test "x$ac_site_file" = xNONE && continue
2624 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2626$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002628 . "$ac_site_file" \
2629 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2631as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002632See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633 fi
2634done
2635
2636if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 # Some versions of bash will fail to source /dev/null (special files
2638 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2639 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2641$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2644 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 esac
2646 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647else
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2649$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 >$cache_file
2651fi
2652
2653# Check that the precious variables saved in the cache have kept the same
2654# value.
2655ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2658 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2660 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 case $ac_old_set,$ac_new_set in
2662 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2664$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 +00002665 ac_cache_corrupted=: ;;
2666 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2668$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_cache_corrupted=: ;;
2670 ,);;
2671 *)
2672 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 # differences in whitespace do not lead to failure.
2674 ac_old_val_w=`echo x $ac_old_val`
2675 ac_new_val_w=`echo x $ac_new_val`
2676 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2678$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2679 ac_cache_corrupted=:
2680 else
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2682$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2683 eval $ac_var=\$ac_old_val
2684 fi
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2686$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2688$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 fi;;
2690 esac
2691 # Pass precious variables to config.status.
2692 if test "$ac_new_set" = set; then
2693 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 *) ac_arg=$ac_var=$ac_new_val ;;
2696 esac
2697 case " $ac_configure_args " in
2698 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002699 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 esac
2701 fi
2702done
2703if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2707$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002708 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002710## -------------------- ##
2711## Main body of script. ##
2712## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713
Guido van Rossum7f43da71994-08-01 12:15:30 +00002714ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2718ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002719
Guido van Rossum627b2d71993-12-24 10:39:16 +00002720
Michael W. Hudson54241132001-12-07 15:38:26 +00002721
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722
2723
2724
2725
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002726if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727then
2728# Extract the first word of "hg", so it can be a program name with args.
2729set dummy hg; ac_word=$2
2730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2731$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002732if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo_n "(cached) " >&6
2734else
2735 if test -n "$HAS_HG"; then
2736 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2737else
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
2743 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745 ac_cv_prog_HAS_HG="found"
2746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2747 break 2
2748 fi
2749done
2750 done
2751IFS=$as_save_IFS
2752
2753 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2754fi
2755fi
2756HAS_HG=$ac_cv_prog_HAS_HG
2757if test -n "$HAS_HG"; then
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2759$as_echo "$HAS_HG" >&6; }
2760else
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2762$as_echo "no" >&6; }
2763fi
2764
2765
2766else
2767HAS_HG=no-repository
2768fi
2769if test $HAS_HG = found
2770then
2771 HGVERSION="hg id -i \$(srcdir)"
2772 HGTAG="hg id -t \$(srcdir)"
2773 HGBRANCH="hg id -b \$(srcdir)"
2774else
2775 HGVERSION=""
2776 HGTAG=""
2777 HGBRANCH=""
2778fi
2779
2780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002781ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002782
2783
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002784ac_aux_dir=
2785for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2786 if test -f "$ac_dir/install-sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install-sh -c"
2789 break
2790 elif test -f "$ac_dir/install.sh"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/install.sh -c"
2793 break
2794 elif test -f "$ac_dir/shtool"; then
2795 ac_aux_dir=$ac_dir
2796 ac_install_sh="$ac_aux_dir/shtool install -c"
2797 break
2798 fi
2799done
2800if test -z "$ac_aux_dir"; then
2801 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2802fi
2803
2804# These three variables are undocumented and unsupported,
2805# and are intended to be withdrawn in a future Autoconf release.
2806# They can cause serious problems if a builder's source tree is in a directory
2807# whose full name contains unusual characters.
2808ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2809ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2810ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2811
2812
2813# Make sure we can run config.sub.
2814$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2815 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2816
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2818$as_echo_n "checking build system type... " >&6; }
2819if ${ac_cv_build+:} false; then :
2820 $as_echo_n "(cached) " >&6
2821else
2822 ac_build_alias=$build_alias
2823test "x$ac_build_alias" = x &&
2824 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2825test "x$ac_build_alias" = x &&
2826 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2827ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2828 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2829
2830fi
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2832$as_echo "$ac_cv_build" >&6; }
2833case $ac_cv_build in
2834*-*-*) ;;
2835*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2836esac
2837build=$ac_cv_build
2838ac_save_IFS=$IFS; IFS='-'
2839set x $ac_cv_build
2840shift
2841build_cpu=$1
2842build_vendor=$2
2843shift; shift
2844# Remember, the first character of IFS is used to create $*,
2845# except with old shells:
2846build_os=$*
2847IFS=$ac_save_IFS
2848case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2849
2850
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2852$as_echo_n "checking host system type... " >&6; }
2853if ${ac_cv_host+:} false; then :
2854 $as_echo_n "(cached) " >&6
2855else
2856 if test "x$host_alias" = x; then
2857 ac_cv_host=$ac_cv_build
2858else
2859 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2860 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2861fi
2862
2863fi
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2865$as_echo "$ac_cv_host" >&6; }
2866case $ac_cv_host in
2867*-*-*) ;;
2868*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2869esac
2870host=$ac_cv_host
2871ac_save_IFS=$IFS; IFS='-'
2872set x $ac_cv_host
2873shift
2874host_cpu=$1
2875host_vendor=$2
2876shift; shift
2877# Remember, the first character of IFS is used to create $*,
2878# except with old shells:
2879host_os=$*
2880IFS=$ac_save_IFS
2881case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2882
2883
2884
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002885if test "$cross_compiling" = yes; then
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2887$as_echo_n "checking for python interpreter for cross build... " >&6; }
2888 if test -z "$PYTHON_FOR_BUILD"; then
2889 for interp in python$PACKAGE_VERSION python3 python; do
2890 which $interp >/dev/null 2>&1 || continue
2891 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2892 break
2893 fi
2894 interp=
2895 done
2896 if test x$interp = x; then
2897 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2898 fi
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2900$as_echo "$interp" >&6; }
2901 PYTHON_FOR_BUILD="_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
2902 fi
2903else
2904 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2905fi
2906
2907
Martin v. Löwis11437992002-04-12 09:54:03 +00002908
Benjamin Petersond23f8222009-04-05 19:13:16 +00002909if test "$prefix" != "/"; then
2910 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2911fi
2912
2913
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
2915
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002916# We don't use PACKAGE_ variables, and they cause conflicts
2917# with other autoconf-based packages that include Python.h
2918grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2919rm confdefs.h
2920mv confdefs.h.new confdefs.h
2921
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002922
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002923VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002924
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002925# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002926
2927SOVERSION=1.0
2928
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002929# The later defininition of _XOPEN_SOURCE disables certain features
2930# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2931
Matthias Kloseb9621712010-04-24 17:59:49 +00002932$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002933
2934
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002935# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2936# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2937# them.
2938
Matthias Kloseb9621712010-04-24 17:59:49 +00002939$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002940
2941
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002942# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2943# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2944# them.
2945
Matthias Kloseb9621712010-04-24 17:59:49 +00002946$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002947
2948
Martin v. Löwisd6320502004-08-12 13:45:08 +00002949# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2950# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2951
Matthias Kloseb9621712010-04-24 17:59:49 +00002952$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002953
2954
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002955# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2956# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2957# them.
2958
Matthias Kloseb9621712010-04-24 17:59:49 +00002959$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002960
2961
2962
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002963define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002965# Arguments passed to configure.
2966
2967CONFIG_ARGS="$ac_configure_args"
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2970$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002971# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002972if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002973 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002974 case $enableval in
2975 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002976 # Locate the best usable SDK, see Mac/README.txt for more
2977 # information
2978 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2979 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002980 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002981 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2982 if test ! -d "${enableval}"
2983 then
2984 enableval=/
2985 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002986 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002987 ;;
2988 esac
2989 case $enableval in
2990 no)
2991 UNIVERSALSDK=
2992 enable_universalsdk=
2993 ;;
2994 *)
2995 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002996 if test ! -d "${UNIVERSALSDK}"
2997 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002998 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002999 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003000 ;;
3001 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003002
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003003
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004else
3005
3006 UNIVERSALSDK=
3007 enable_universalsdk=
3008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011if test -n "${UNIVERSALSDK}"
3012then
Matthias Kloseb9621712010-04-24 17:59:49 +00003013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3014$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015else
Matthias Kloseb9621712010-04-24 17:59:49 +00003016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3017$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003021
3022
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023# For backward compatibility reasons we prefer to select '32-bit' if available,
3024# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026if test "`uname -s`" = "Darwin"
3027then
3028 if test -n "${UNIVERSALSDK}"
3029 then
3030 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3031 then
3032 UNIVERSAL_ARCHS="intel"
3033 fi
3034 fi
3035fi
3036
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3039$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003040
3041# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003042if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3045$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003046 UNIVERSAL_ARCHS="$withval"
3047
3048else
3049
Ned Deilycbfb9a52012-06-23 16:02:19 -07003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3051$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003052
3053fi
3054
3055
3056
3057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003058
3059# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003060if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003061 withval=$with_framework_name;
3062 PYTHONFRAMEWORK=${withval}
3063 PYTHONFRAMEWORKDIR=${withval}.framework
3064 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3065
3066else
3067
3068 PYTHONFRAMEWORK=Python
3069 PYTHONFRAMEWORKDIR=Python.framework
3070 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3071
3072fi
3073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003075if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003077 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003078 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003079 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003080 esac
3081 case $enableval in
3082 no)
3083 PYTHONFRAMEWORK=
3084 PYTHONFRAMEWORKDIR=no-framework
3085 PYTHONFRAMEWORKPREFIX=
3086 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087 FRAMEWORKINSTALLFIRST=
3088 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003089 FRAMEWORKALTINSTALLFIRST=
3090 FRAMEWORKALTINSTALLLAST=
3091 if test "x${prefix}" = "xNONE"; then
3092 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3093 else
3094 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3095 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003096 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003097 ;;
3098 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003099 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003101 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003102 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003103 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3104 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003105 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003107 if test "x${prefix}" = "xNONE" ; then
3108 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003109
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003113
3114 case "${enableval}" in
3115 /System*)
3116 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3117 if test "${prefix}" = "NONE" ; then
3118 # See below
3119 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3120 fi
3121 ;;
3122
3123 /Library*)
3124 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3125 ;;
3126
3127 */Library/Frameworks)
3128 MDIR="`dirname "${enableval}"`"
3129 MDIR="`dirname "${MDIR}"`"
3130 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3131
3132 if test "${prefix}" = "NONE"; then
3133 # User hasn't specified the
3134 # --prefix option, but wants to install
3135 # the framework in a non-default location,
3136 # ensure that the compatibility links get
3137 # installed relative to that prefix as well
3138 # instead of in /usr/local.
3139 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3140 fi
3141 ;;
3142
3143 *)
3144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3145 ;;
3146 esac
3147
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003150 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003156 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3157
3158 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3159
Jack Jansene578a632001-08-15 01:27:14 +00003160 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Guido van Rossum563e7081996-09-10 18:20:48 +00003162else
Martin v. Löwis11437992002-04-12 09:54:03 +00003163
Jack Jansene578a632001-08-15 01:27:14 +00003164 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003165 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003166 PYTHONFRAMEWORKPREFIX=
3167 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168 FRAMEWORKINSTALLFIRST=
3169 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003170 FRAMEWORKALTINSTALLFIRST=
3171 FRAMEWORKALTINSTALLLAST=
3172 if test "x${prefix}" = "xNONE" ; then
3173 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3174 else
3175 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3176 fi
Jack Jansene578a632001-08-15 01:27:14 +00003177 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003178
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180fi
3181
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
3183
Michael W. Hudson54241132001-12-07 15:38:26 +00003184
3185
3186
3187
Jack Jansene578a632001-08-15 01:27:14 +00003188
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189
3190
3191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003193
Jack Jansene578a632001-08-15 01:27:14 +00003194##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003195## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003196## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003197##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003198# Set name for machine-dependent library files
3199
Matthias Kloseb9621712010-04-24 17:59:49 +00003200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3201$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202if test -z "$MACHDEP"
3203then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003204 # avoid using uname for cross builds
3205 if test "$cross_compiling" = yes; then
3206 # ac_sys_system and ac_sys_release are only used for setting
3207 # `define_xopen_source' in the case statement below. For the
3208 # current supported cross builds, this macro is not adjusted.
3209 case "$host" in
3210 *-*-linux*)
3211 ac_sys_system=Linux
3212 ;;
3213 *-*-cygwin*)
3214 ac_sys_system=Cygwin
3215 ;;
3216 *)
3217 # for now, limit cross builds to known configurations
3218 MACHDEP="unknown"
3219 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3220 esac
3221 ac_sys_release=
3222 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003223 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003224 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003225 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003226 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003228 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003230 fi
3231 ac_md_system=`echo $ac_sys_system |
3232 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3233 ac_md_release=`echo $ac_sys_release |
3234 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3235 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003236
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003237 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003238 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003239 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003240 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003241 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003242 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244fi
Guido van Rossum91922671997-10-09 20:24:13 +00003245
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003246
3247if test "$cross_compiling" = yes; then
3248 case "$host" in
3249 *-*-linux*)
3250 case "$host_cpu" in
3251 arm*)
3252 _host_cpu=arm
3253 ;;
3254 *)
3255 _host_cpu=$host_cpu
3256 esac
3257 ;;
3258 *-*-cygwin*)
3259 _host_cpu=
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3267fi
3268
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003269# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3270# disable features if it is defined, without any means to access these
3271# features as extensions. For these systems, we skip the definition of
3272# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3273# some feature, make sure there is no alternative way to access this
3274# feature. Also, when using wildcards, make sure you have verified the
3275# need for not defining _XOPEN_SOURCE on all systems matching the
3276# wildcard, and that the wildcard does not include future systems
3277# (which may remove their limitations).
3278case $ac_sys_system/$ac_sys_release in
3279 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3280 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003281 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003282 # In addition, Stefan Krah confirms that issue #1244610 exists through
3283 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003284 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003285 define_xopen_source=no
3286 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3287 # also defined. This can be overridden by defining _BSD_SOURCE
3288 # As this has a different meaning on Linux, only define it on OpenBSD
3289
Matthias Kloseb9621712010-04-24 17:59:49 +00003290$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003291
3292 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003293 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003294 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3295 # also defined. This can be overridden by defining _BSD_SOURCE
3296 # As this has a different meaning on Linux, only define it on OpenBSD
3297
Matthias Kloseb9621712010-04-24 17:59:49 +00003298$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003299
3300 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003301 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3302 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3303 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003304 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003305 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003306 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3307 # request to enable features supported by the standard as a request
3308 # to disable features not supported by the standard. The best way
3309 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3310 # entirely and define __EXTENSIONS__ instead.
3311 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003312 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003313 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3314 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003315 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003316 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003317 define_xopen_source=no;;
3318 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003319 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003320 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003321 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003322 # On FreeBSD 4, the math functions C89 does not cover are never defined
3323 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3324 FreeBSD/4.*)
3325 define_xopen_source=no;;
3326 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3327 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3328 # identifies itself as Darwin/7.*
3329 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3330 # disables platform specific features beyond repair.
3331 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3332 # has no effect, don't bother defining them
3333 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003334 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003335 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003336 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003337 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3338 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3339 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003340 AIX/4)
3341 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003342 AIX/5)
3343 if test `uname -r` -eq 1; then
3344 define_xopen_source=no
3345 fi
3346 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003347 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3348 # defining NI_NUMERICHOST.
3349 QNX/6.3.2)
3350 define_xopen_source=no
3351 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003353esac
3354
3355if test $define_xopen_source = yes
3356then
Victor Stinner14d098d2011-09-07 22:29:43 +02003357 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003358
Victor Stinner14d098d2011-09-07 22:29:43 +02003359$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003360
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003361
3362 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3363 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3364 # several APIs are not declared. Since this is also needed in some
3365 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003366
Matthias Kloseb9621712010-04-24 17:59:49 +00003367$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003368
3369
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003370
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003371$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003372
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003373fi
3374
Guido van Rossum91922671997-10-09 20:24:13 +00003375#
3376# SGI compilers allow the specification of the both the ABI and the
3377# ISA on the command line. Depending on the values of these switches,
3378# different and often incompatable code will be generated.
3379#
3380# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3381# thus supply support for various ABI/ISA combinations. The MACHDEP
3382# variable is also adjusted.
3383#
3384
3385if test ! -z "$SGI_ABI"
3386then
3387 CC="cc $SGI_ABI"
3388 LDFLAGS="$SGI_ABI $LDFLAGS"
3389 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3392$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003393
Jack Jansen6b08a402004-06-03 12:41:45 +00003394# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3395# it may influence the way we can build extensions, so distutils
3396# needs to check it
3397
Thomas Wouters477c8d52006-05-27 19:21:47 +00003398
Jack Jansen6b08a402004-06-03 12:41:45 +00003399CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003400EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003401
Guido van Rossum627b2d71993-12-24 10:39:16 +00003402# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003403
3404# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3405# for debug/optimization stuff. BASECFLAGS is for flags that are required
3406# just to get things to compile and link. Users are free to override OPT
3407# when running configure or make. The build should not break if they do.
3408# BASECFLAGS should generally not be messed with, however.
3409
3410# XXX shouldn't some/most/all of this code be merged with the stuff later
3411# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3413$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003415# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003416if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003418 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003419 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003420 without_gcc=yes;;
3421 yes) CC=gcc
3422 without_gcc=no;;
3423 *) CC=$withval
3424 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003425 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003426else
Martin v. Löwis11437992002-04-12 09:54:03 +00003427
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003428 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003429 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003430 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003431 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003432 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433fi
3434
Matthias Kloseb9621712010-04-24 17:59:49 +00003435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3436$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003437
Guido van Rossum8b131c51995-03-09 14:10:13 +00003438# If the user switches compilers, we can't believe the cache
3439if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3440then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003441 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003442(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003443fi
3444
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003445# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3446# when the compiler supports them, but we don't always want -O2, and
3447# we set -g later.
3448if test -z "$CFLAGS"; then
3449 CFLAGS=
3450fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003451
3452if test "$ac_sys_system" = "Darwin"
3453then
3454 # Compiler selection on MacOSX is more complicated than
3455 # AC_PROG_CC can handle, see Mac/README.txt for more
3456 # information
3457 if test -z "${CC}"
3458 then
3459 found_gcc=
3460 found_clang=
3461 as_save_IFS=$IFS; IFS=:
3462 for as_dir in $PATH
3463 do
3464 IFS=$as_save_IFS
3465 if test -x $as_dir/gcc; then
3466 if test -z "${found_gcc}"; then
3467 found_gcc=$as_dir/gcc
3468 fi
3469 fi
3470 if test -x $as_dir/clang; then
3471 if test -z "${found_clang}"; then
3472 found_clang=$as_dir/clang
3473 fi
3474 fi
3475 done
3476 IFS=$as_save_IFS
3477
3478 if test -n "$found_gcc" -a -n "$found_clang"
3479 then
3480 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3481 then
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3483$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3484 CC="$found_clang"
3485 CXX="$found_clang++"
3486 fi
3487
3488
3489 elif test -z "$found_gcc" -a -n "$found_clang"
3490 then
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3492$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3493 CC="$found_clang"
3494 CXX="$found_clang++"
3495
3496 elif test -z "$found_gcc" -a -z "$found_clang"
3497 then
3498 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3499 if test -n "${found_clang}"
3500 then
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3502$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3503 CC="${found_clang}"
3504 CXX="`/usr/bin/xcrun -find clang++`"
3505
3506 # else: use default behaviour
3507 fi
3508 fi
3509 fi
3510fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003511ac_ext=c
3512ac_cpp='$CPP $CPPFLAGS'
3513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3515ac_compiler_gnu=$ac_cv_c_compiler_gnu
3516if test -n "$ac_tool_prefix"; then
3517 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3518set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3520$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003521if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003523else
3524 if test -n "$CC"; then
3525 ac_cv_prog_CC="$CC" # Let the user override the test.
3526else
Martin v. Löwis11437992002-04-12 09:54:03 +00003527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3528for as_dir in $PATH
3529do
3530 IFS=$as_save_IFS
3531 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003533 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 +00003534 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003535 $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 +00003536 break 2
3537 fi
3538done
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003541
Jack Jansendd19cf82001-12-06 22:36:17 +00003542fi
3543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003544CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003545if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3547$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003548else
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3550$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003551fi
3552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554fi
3555if test -z "$ac_cv_prog_CC"; then
3556 ac_ct_CC=$CC
3557 # Extract the first word of "gcc", so it can be a program name with args.
3558set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3560$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003561if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003563else
3564 if test -n "$ac_ct_CC"; then
3565 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3566else
3567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568for as_dir in $PATH
3569do
3570 IFS=$as_save_IFS
3571 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003573 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 +00003574 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 $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 +00003576 break 2
3577 fi
3578done
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003581
3582fi
3583fi
3584ac_ct_CC=$ac_cv_prog_ac_ct_CC
3585if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3587$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003588else
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3590$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591fi
3592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 if test "x$ac_ct_CC" = x; then
3594 CC=""
3595 else
3596 case $cross_compiling:$ac_tool_warned in
3597yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600ac_tool_warned=yes ;;
3601esac
3602 CC=$ac_ct_CC
3603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604else
3605 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003606fi
3607
Jack Jansendd19cf82001-12-06 22:36:17 +00003608if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 if test -n "$ac_tool_prefix"; then
3610 # 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 +00003611set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003614if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003616else
3617 if test -n "$CC"; then
3618 ac_cv_prog_CC="$CC" # Let the user override the test.
3619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003626 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 +00003627 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $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 +00003629 break 2
3630 fi
3631done
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003634
3635fi
3636fi
3637CC=$ac_cv_prog_CC
3638if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3640$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641else
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003648fi
3649if test -z "$CC"; then
3650 # Extract the first word of "cc", so it can be a program name with args.
3651set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003654if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
3657 if test -n "$CC"; then
3658 ac_cv_prog_CC="$CC" # Let the user override the test.
3659else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003660 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003667 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 +00003668 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3669 ac_prog_rejected=yes
3670 continue
3671 fi
3672 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $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 +00003674 break 2
3675 fi
3676done
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003680if test $ac_prog_rejected = yes; then
3681 # We found a bogon in the path, so make sure we never use it.
3682 set dummy $ac_cv_prog_CC
3683 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003685 # We chose a different compiler from the bogus one.
3686 # However, it has the same basename, so the bogon will be chosen
3687 # first if we set CC to just the basename; use the full file name.
3688 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003689 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690 fi
3691fi
3692fi
3693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003694CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3697$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701fi
3702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705if test -z "$CC"; then
3706 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 do
3709 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3710set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003725 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 +00003726 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $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 +00003728 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730done
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
3734fi
3735fi
3736CC=$ac_cv_prog_CC
3737if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3739$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003743fi
3744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 test -n "$CC" && break
3747 done
3748fi
3749if test -z "$CC"; then
3750 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003752do
3753 # Extract the first word of "$ac_prog", so it can be a program name with args.
3754set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3756$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003757if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003759else
3760 if test -n "$ac_ct_CC"; then
3761 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3762else
3763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003769 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 +00003770 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $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 +00003772 break 2
3773 fi
3774done
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
3779fi
3780ac_ct_CC=$ac_cv_prog_ac_ct_CC
3781if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3783$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003784else
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 test -n "$ac_ct_CC" && break
3791done
Michael W. Hudson54241132001-12-07 15:38:26 +00003792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 if test "x$ac_ct_CC" = x; then
3794 CC=""
3795 else
3796 case $cross_compiling:$ac_tool_warned in
3797yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800ac_tool_warned=yes ;;
3801esac
3802 CC=$ac_ct_CC
3803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
3805
3806fi
3807
3808
Matthias Kloseb9621712010-04-24 17:59:49 +00003809test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003811as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003812See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
3814# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003815$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3816set X $ac_compile
3817ac_compiler=$2
3818for ac_option in --version -v -V -qversion; do
3819 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820case "(($ac_try" in
3821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822 *) ac_try_echo=$ac_try;;
3823esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3825$as_echo "$ac_try_echo"; } >&5
3826 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 if test -s conftest.err; then
3829 sed '10a\
3830... rest of stderr output deleted ...
3831 10q' conftest.err >conftest.er1
3832 cat conftest.er1 >&5
3833 fi
3834 rm -f conftest.er1 conftest.err
3835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3836 test $ac_status = 0; }
3837done
Martin v. Löwis11437992002-04-12 09:54:03 +00003838
Matthias Kloseb9621712010-04-24 17:59:49 +00003839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003840/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842int
3843main ()
3844{
3845
3846 ;
3847 return 0;
3848}
3849_ACEOF
3850ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003851ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003852# Try to create an executable without -o first, disregard a.out.
3853# It will help us diagnose broken compilers, and finding out an intuition
3854# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3856$as_echo_n "checking whether the C compiler works... " >&6; }
3857ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3858
3859# The possible output files:
3860ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862ac_rmfiles=
3863for ac_file in $ac_files
3864do
3865 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3868 esac
3869done
3870rm -f $ac_rmfiles
3871
Matthias Kloseb9621712010-04-24 17:59:49 +00003872if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3878$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3882 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3884# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3885# in a Makefile. We should not override ac_cv_exeext if it was cached,
3886# so that the user can short-circuit this test for compilers unknown to
3887# Autoconf.
3888for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003889do
3890 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003893 ;;
3894 [ab].out )
3895 # We found the default executable, but exeext='' is most
3896 # certainly right.
3897 break;;
3898 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 then :; else
3901 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3902 fi
3903 # We set ac_cv_exeext here because the later test for it is not
3904 # safe: cross compilers may not add the suffix if given an `-o'
3905 # argument, so we may need to know it at that point already.
3906 # Even if this section looks crufty: it has the advantage of
3907 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003908 break;;
3909 * )
3910 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 esac
3912done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913test "$ac_cv_exeext" = no && ac_cv_exeext=
3914
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003915else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 ac_file=''
3917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003918if test -z "$ac_file"; then :
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3920$as_echo "no" >&6; }
3921$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003922sed 's/^/| /' conftest.$ac_ext >&5
3923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003926as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003927See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003928else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3930$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3933$as_echo_n "checking for C compiler default output file name... " >&6; }
3934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3935$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003937
Matthias Kloseb9621712010-04-24 17:59:49 +00003938rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003939ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3941$as_echo_n "checking for suffix of executables... " >&6; }
3942if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943case "(($ac_try" in
3944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3945 *) ac_try_echo=$ac_try;;
3946esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3948$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3952 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3954# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3955# work properly (i.e., refer to `conftest.exe'), while it won't with
3956# `rm'.
3957for ac_file in conftest.exe conftest conftest.*; do
3958 test -f "$ac_file" || continue
3959 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3962 break;;
3963 * ) break;;
3964 esac
3965done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966else
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003972rm -f conftest conftest$ac_cv_exeext
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3974$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975
3976rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003977EXEEXT=$ac_cv_exeext
3978ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h. */
3981#include <stdio.h>
3982int
3983main ()
3984{
3985FILE *f = fopen ("conftest.out", "w");
3986 return ferror (f) || fclose (f) != 0;
3987
3988 ;
3989 return 0;
3990}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003992ac_clean_files="$ac_clean_files conftest.out"
3993# Check that the compiler produces executables we can run. If not, either
3994# the compiler is broken, or we cross compile.
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3996$as_echo_n "checking whether we are cross compiling... " >&6; }
3997if test "$cross_compiling" != yes; then
3998 { { ac_try="$ac_link"
3999case "(($ac_try" in
4000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4001 *) ac_try_echo=$ac_try;;
4002esac
4003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4004$as_echo "$ac_try_echo"; } >&5
4005 (eval "$ac_link") 2>&5
4006 ac_status=$?
4007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4008 test $ac_status = 0; }
4009 if { ac_try='./conftest$ac_cv_exeext'
4010 { { case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
4016 (eval "$ac_try") 2>&5
4017 ac_status=$?
4018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }; }; then
4020 cross_compiling=no
4021 else
4022 if test "$cross_compiling" = maybe; then
4023 cross_compiling=yes
4024 else
4025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004027as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004028If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 fi
4031 fi
4032fi
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4034$as_echo "$cross_compiling" >&6; }
4035
4036rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4037ac_clean_files=$ac_clean_files_save
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4039$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004040if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 $as_echo_n "(cached) " >&6
4042else
4043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044/* end confdefs.h. */
4045
4046int
4047main ()
4048{
4049
4050 ;
4051 return 0;
4052}
4053_ACEOF
4054rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004055if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004056case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004063 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004066 for ac_file in conftest.o conftest.obj conftest.*; do
4067 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4071 break;;
4072 esac
4073done
4074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004076sed 's/^/| /' conftest.$ac_ext >&5
4077
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004080as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004081See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004082fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4086$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004087OBJEXT=$ac_cv_objext
4088ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4090$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004091if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004093else
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004096
Martin v. Löwis11437992002-04-12 09:54:03 +00004097int
4098main ()
4099{
4100#ifndef __GNUC__
4101 choke me
4102#endif
4103
4104 ;
4105 return 0;
4106}
4107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 ac_compiler_gnu=yes
4110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004114ac_cv_c_compiler_gnu=$ac_compiler_gnu
4115
4116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4118$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4119if test $ac_compiler_gnu = yes; then
4120 GCC=yes
4121else
4122 GCC=
4123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004124ac_test_CFLAGS=${CFLAGS+set}
4125ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4127$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004128if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004130else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131 ac_save_c_werror_flag=$ac_c_werror_flag
4132 ac_c_werror_flag=yes
4133 ac_cv_prog_cc_g=no
4134 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004137
Martin v. Löwis11437992002-04-12 09:54:03 +00004138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004146if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004147 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148else
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 CFLAGS=""
4150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151/* end confdefs.h. */
4152
4153int
4154main ()
4155{
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004161if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162
Matthias Kloseb9621712010-04-24 17:59:49 +00004163else
4164 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004167/* end confdefs.h. */
4168
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004177if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4185 ac_c_werror_flag=$ac_save_c_werror_flag
4186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4188$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004189if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004191elif test $ac_cv_prog_cc_g = yes; then
4192 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193 CFLAGS="-g -O2"
4194 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004195 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196 fi
4197else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004198 if test "$GCC" = yes; then
4199 CFLAGS="-O2"
4200 else
4201 CFLAGS=
4202 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4205$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004206if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004208else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004210ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004212/* end confdefs.h. */
4213#include <stdarg.h>
4214#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004215#include <sys/types.h>
4216#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4218struct buf { int x; };
4219FILE * (*rcsopen) (struct buf *, struct stat *, int);
4220static char *e (p, i)
4221 char **p;
4222 int i;
4223{
4224 return p[i];
4225}
4226static char *f (char * (*g) (char **, int), char **p, ...)
4227{
4228 char *s;
4229 va_list v;
4230 va_start (v,p);
4231 s = g (p, va_arg (v,int));
4232 va_end (v);
4233 return s;
4234}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004235
4236/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4237 function prototypes and stuff, but not '\xHH' hex character constants.
4238 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004240 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4241 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4246 inside strings and character constants. */
4247#define FOO(x) 'x'
4248int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4249
Skip Montanaro6dead952003-09-25 14:50:04 +00004250int test (int i, double x);
4251struct s1 {int (*f) (int a);};
4252struct s2 {int (*f) (double a);};
4253int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4254int argc;
4255char **argv;
4256int
4257main ()
4258{
4259return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4260 ;
4261 return 0;
4262}
4263_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4265 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004266do
4267 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext
4272 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004273done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275CC=$ac_save_CC
4276
4277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278# AC_CACHE_VAL
4279case "x$ac_cv_prog_cc_c89" in
4280 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4282$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4285$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004286 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4289$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004292
Matthias Kloseb9621712010-04-24 17:59:49 +00004293fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295ac_ext=c
4296ac_cpp='$CPP $CPPFLAGS'
4297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4299ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004301
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004302
4303
Matthias Kloseb9621712010-04-24 17:59:49 +00004304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4305$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004310
4311 case $withval in
4312 no) with_cxx_main=no
4313 MAINCC='$(CC)';;
4314 yes) with_cxx_main=yes
4315 MAINCC='$(CXX)';;
4316 *) with_cxx_main=yes
4317 MAINCC=$withval
4318 if test -z "$CXX"
4319 then
4320 CXX=$withval
4321 fi;;
4322 esac
4323else
4324
4325 with_cxx_main=no
4326 MAINCC='$(CC)'
4327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328fi
4329
Matthias Kloseb9621712010-04-24 17:59:49 +00004330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4331$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004332
4333preset_cxx="$CXX"
4334if test -z "$CXX"
4335then
4336 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004337 gcc) if test -n "$ac_tool_prefix"; then
4338 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4339set dummy ${ac_tool_prefix}g++; ac_word=$2
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4341$as_echo_n "checking for $ac_word... " >&6; }
4342if ${ac_cv_path_CXX+:} false; then :
4343 $as_echo_n "(cached) " >&6
4344else
4345 case $CXX in
4346 [\\/]* | ?:[\\/]*)
4347 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4348 ;;
4349 *)
4350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4351for as_dir in notfound
4352do
4353 IFS=$as_save_IFS
4354 test -z "$as_dir" && as_dir=.
4355 for ac_exec_ext in '' $ac_executable_extensions; do
4356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4357 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4358 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4359 break 2
4360 fi
4361done
4362 done
4363IFS=$as_save_IFS
4364
4365 ;;
4366esac
4367fi
4368CXX=$ac_cv_path_CXX
4369if test -n "$CXX"; then
4370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4371$as_echo "$CXX" >&6; }
4372else
4373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4374$as_echo "no" >&6; }
4375fi
4376
4377
4378fi
4379if test -z "$ac_cv_path_CXX"; then
4380 ac_pt_CXX=$CXX
4381 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004382set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4384$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004385if ${ac_cv_path_ac_pt_CXX+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 case $ac_pt_CXX in
4389 [\\/]* | ?:[\\/]*)
4390 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4391 ;;
4392 *)
4393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4394for as_dir in notfound
4395do
4396 IFS=$as_save_IFS
4397 test -z "$as_dir" && as_dir=.
4398 for ac_exec_ext in '' $ac_executable_extensions; do
4399 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4400 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4401 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4402 break 2
4403 fi
4404done
4405 done
4406IFS=$as_save_IFS
4407
4408 ;;
4409esac
4410fi
4411ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4412if test -n "$ac_pt_CXX"; then
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4414$as_echo "$ac_pt_CXX" >&6; }
4415else
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417$as_echo "no" >&6; }
4418fi
4419
4420 if test "x$ac_pt_CXX" = x; then
4421 CXX="g++"
4422 else
4423 case $cross_compiling:$ac_tool_warned in
4424yes:)
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4426$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4427ac_tool_warned=yes ;;
4428esac
4429 CXX=$ac_pt_CXX
4430 fi
4431else
4432 CXX="$ac_cv_path_CXX"
4433fi
4434 ;;
4435 cc) if test -n "$ac_tool_prefix"; then
4436 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4437set dummy ${ac_tool_prefix}c++; ac_word=$2
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004440if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004442else
4443 case $CXX in
4444 [\\/]* | ?:[\\/]*)
4445 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4446 ;;
4447 *)
4448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449for as_dir in notfound
4450do
4451 IFS=$as_save_IFS
4452 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004455 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004457 break 2
4458 fi
4459done
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004462
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004463 ;;
4464esac
4465fi
4466CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004467if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4469$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004470else
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4472$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004475
4476fi
4477if test -z "$ac_cv_path_CXX"; then
4478 ac_pt_CXX=$CXX
4479 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004480set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4482$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004483if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004484 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004485else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004486 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004488 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004489 ;;
4490 *)
4491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4492for as_dir in notfound
4493do
4494 IFS=$as_save_IFS
4495 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4498 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004500 break 2
4501 fi
4502done
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004504IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506 ;;
4507esac
4508fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004509ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4510if test -n "$ac_pt_CXX"; then
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4512$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004513else
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004517
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004518 if test "x$ac_pt_CXX" = x; then
4519 CXX="c++"
4520 else
4521 case $cross_compiling:$ac_tool_warned in
4522yes:)
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4524$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4525ac_tool_warned=yes ;;
4526esac
4527 CXX=$ac_pt_CXX
4528 fi
4529else
4530 CXX="$ac_cv_path_CXX"
4531fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004532 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533 clang|*/clang) if test -n "$ac_tool_prefix"; then
4534 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4535set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4537$as_echo_n "checking for $ac_word... " >&6; }
4538if ${ac_cv_path_CXX+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 case $CXX in
4542 [\\/]* | ?:[\\/]*)
4543 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4544 ;;
4545 *)
4546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4547for as_dir in notfound
4548do
4549 IFS=$as_save_IFS
4550 test -z "$as_dir" && as_dir=.
4551 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004553 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4555 break 2
4556 fi
4557done
4558 done
4559IFS=$as_save_IFS
4560
Ned Deilycbfb9a52012-06-23 16:02:19 -07004561 ;;
4562esac
4563fi
4564CXX=$ac_cv_path_CXX
4565if test -n "$CXX"; then
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4567$as_echo "$CXX" >&6; }
4568else
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4570$as_echo "no" >&6; }
4571fi
4572
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004573
4574fi
4575if test -z "$ac_cv_path_CXX"; then
4576 ac_pt_CXX=$CXX
4577 # Extract the first word of "clang++", so it can be a program name with args.
4578set dummy clang++; ac_word=$2
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580$as_echo_n "checking for $ac_word... " >&6; }
4581if ${ac_cv_path_ac_pt_CXX+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 case $ac_pt_CXX in
4585 [\\/]* | ?:[\\/]*)
4586 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4587 ;;
4588 *)
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in notfound
4591do
4592 IFS=$as_save_IFS
4593 test -z "$as_dir" && as_dir=.
4594 for ac_exec_ext in '' $ac_executable_extensions; do
4595 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4596 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598 break 2
4599 fi
4600done
4601 done
4602IFS=$as_save_IFS
4603
4604 ;;
4605esac
4606fi
4607ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4608if test -n "$ac_pt_CXX"; then
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4610$as_echo "$ac_pt_CXX" >&6; }
4611else
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613$as_echo "no" >&6; }
4614fi
4615
4616 if test "x$ac_pt_CXX" = x; then
4617 CXX="clang++"
4618 else
4619 case $cross_compiling:$ac_tool_warned in
4620yes:)
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4623ac_tool_warned=yes ;;
4624esac
4625 CXX=$ac_pt_CXX
4626 fi
4627else
4628 CXX="$ac_cv_path_CXX"
4629fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004630 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004631 esac
4632 if test "$CXX" = "notfound"
4633 then
4634 CXX=""
4635 fi
4636fi
4637if test -z "$CXX"
4638then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004639 if test -n "$ac_tool_prefix"; then
4640 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4641 do
4642 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004646if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648else
4649 if test -n "$CXX"; then
4650 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4651else
4652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4653for as_dir in $PATH
4654do
4655 IFS=$as_save_IFS
4656 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004657 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4659 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004661 break 2
4662 fi
4663done
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004665IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
4667fi
4668fi
4669CXX=$ac_cv_prog_CXX
4670if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4672$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673else
Matthias Kloseb9621712010-04-24 17:59:49 +00004674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4675$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004676fi
4677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004678
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 test -n "$CXX" && break
4680 done
4681fi
4682if test -z "$CXX"; then
4683 ac_ct_CXX=$CXX
4684 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4685do
4686 # Extract the first word of "$ac_prog", so it can be a program name with args.
4687set dummy $ac_prog; ac_word=$2
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
4690if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692else
4693 if test -n "$ac_ct_CXX"; then
4694 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4695else
4696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
4702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4703 ac_cv_prog_ac_ct_CXX="$ac_prog"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004707done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708 done
4709IFS=$as_save_IFS
4710
4711fi
4712fi
4713ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4714if test -n "$ac_ct_CXX"; then
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4716$as_echo "$ac_ct_CXX" >&6; }
4717else
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
4720fi
4721
4722
4723 test -n "$ac_ct_CXX" && break
4724done
4725
4726 if test "x$ac_ct_CXX" = x; then
4727 CXX="notfound"
4728 else
4729 case $cross_compiling:$ac_tool_warned in
4730yes:)
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4733ac_tool_warned=yes ;;
4734esac
4735 CXX=$ac_ct_CXX
4736 fi
4737fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738
4739 if test "$CXX" = "notfound"
4740 then
4741 CXX=""
4742 fi
4743fi
4744if test "$preset_cxx" != "$CXX"
4745then
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747
4748 By default, distutils will build C++ extension modules with \"$CXX\".
4749 If this is not intended, then set CXX on the configure command line.
4750 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004751$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752
4753 By default, distutils will build C++ extension modules with \"$CXX\".
4754 If this is not intended, then set CXX on the configure command line.
4755 " >&2;}
4756fi
4757
4758
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4760$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4761save_LDFLAGS="$LDFLAGS"
4762LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004763
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4765/* end confdefs.h. */
4766
4767int
4768main ()
4769{
4770
4771 ;
4772 return 0;
4773}
4774_ACEOF
4775if ac_fn_c_try_link "$LINENO"; then :
4776 NO_AS_NEEDED="-Wl,--no-as-needed"
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4778$as_echo "yes" >&6; }
4779else
4780 NO_AS_NEEDED=""
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784rm -f core conftest.err conftest.$ac_objext \
4785 conftest$ac_exeext conftest.$ac_ext
4786LDFLAGS="$save_LDFLAGS"
4787
4788
4789
4790# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004791ac_ext=c
4792ac_cpp='$CPP $CPPFLAGS'
4793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4797$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004798# On Suns, sometimes $CPP names a directory.
4799if test -n "$CPP" && test -d "$CPP"; then
4800 CPP=
4801fi
4802if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004803 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004805else
Martin v. Löwis11437992002-04-12 09:54:03 +00004806 # Double quotes because CPP needs to be expanded
4807 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4808 do
4809 ac_preproc_ok=false
4810for ac_c_preproc_warn_flag in '' yes
4811do
4812 # Use a header file that comes with gcc, so configuring glibc
4813 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004814 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4815 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004816 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004819/* end confdefs.h. */
4820#ifdef __STDC__
4821# include <limits.h>
4822#else
4823# include <assert.h>
4824#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004825 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004827if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004828
Matthias Kloseb9621712010-04-24 17:59:49 +00004829else
Martin v. Löwis11437992002-04-12 09:54:03 +00004830 # Broken: fails on valid input.
4831continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004832fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004833rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004836 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004839#include <ac_nonexistent.h>
4840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 # Broken: success on invalid input.
4843continue
4844else
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # Passes both tests.
4846ac_preproc_ok=:
4847break
4848fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004849rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004850
4851done
4852# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004853rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004854if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 break
4856fi
4857
4858 done
4859 ac_cv_prog_CPP=$CPP
4860
4861fi
4862 CPP=$ac_cv_prog_CPP
4863else
4864 ac_cv_prog_CPP=$CPP
4865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4867$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004868ac_preproc_ok=false
4869for ac_c_preproc_warn_flag in '' yes
4870do
4871 # Use a header file that comes with gcc, so configuring glibc
4872 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004873 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4874 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 # On the NeXT, cc -E runs the code through the compiler's parser,
4876 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004878/* end confdefs.h. */
4879#ifdef __STDC__
4880# include <limits.h>
4881#else
4882# include <assert.h>
4883#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004884 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004886if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004887
Matthias Kloseb9621712010-04-24 17:59:49 +00004888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 # Broken: fails on valid input.
4890continue
4891fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004892rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004894 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004898#include <ac_nonexistent.h>
4899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004900if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 # Broken: success on invalid input.
4902continue
4903else
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 # Passes both tests.
4905ac_preproc_ok=:
4906break
4907fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004908rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004909
4910done
4911# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004912rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004913if $ac_preproc_ok; then :
4914
Martin v. Löwis11437992002-04-12 09:54:03 +00004915else
Matthias Kloseb9621712010-04-24 17:59:49 +00004916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004918as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004919See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004920fi
4921
4922ac_ext=c
4923ac_cpp='$CPP $CPPFLAGS'
4924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4926ac_compiler_gnu=$ac_cv_c_compiler_gnu
4927
4928
Matthias Kloseb9621712010-04-24 17:59:49 +00004929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4930$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004931if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004933else
Matthias Kloseb9621712010-04-24 17:59:49 +00004934 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004935 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 # Loop through the user's path and test for each of PROGNAME-LIST
4937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004938for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4939do
4940 IFS=$as_save_IFS
4941 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004942 for ac_prog in grep ggrep; do
4943 for ac_exec_ext in '' $ac_executable_extensions; do
4944 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004945 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004946# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004947 # Check for GNU $ac_path_GREP
4948case `"$ac_path_GREP" --version 2>&1` in
4949*GNU*)
4950 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4951*)
4952 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954 while :
4955 do
4956 cat "conftest.in" "conftest.in" >"conftest.tmp"
4957 mv "conftest.tmp" "conftest.in"
4958 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004960 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4961 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004963 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4964 # Best one so far, save it but keep looking for a better one
4965 ac_cv_path_GREP="$ac_path_GREP"
4966 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004967 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004968 # 10*(2^10) chars as input seems more than enough
4969 test $ac_count -gt 10 && break
4970 done
4971 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4972esac
4973
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $ac_path_GREP_found && break 3
4975 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004976 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004978IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004980 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982else
4983 ac_cv_path_GREP=$GREP
4984fi
4985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4988$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 GREP="$ac_cv_path_GREP"
4990
4991
Matthias Kloseb9621712010-04-24 17:59:49 +00004992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4993$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004994if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996else
4997 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4998 then ac_cv_path_EGREP="$GREP -E"
4999 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005000 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005001 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 # Loop through the user's path and test for each of PROGNAME-LIST
5003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5005do
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005008 for ac_prog in egrep; do
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005011 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005012# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013 # Check for GNU $ac_path_EGREP
5014case `"$ac_path_EGREP" --version 2>&1` in
5015*GNU*)
5016 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5017*)
5018 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 while :
5021 do
5022 cat "conftest.in" "conftest.in" >"conftest.tmp"
5023 mv "conftest.tmp" "conftest.in"
5024 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5027 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5030 # Best one so far, save it but keep looking for a better one
5031 ac_cv_path_EGREP="$ac_path_EGREP"
5032 ac_path_EGREP_max=$ac_count
5033 fi
5034 # 10*(2^10) chars as input seems more than enough
5035 test $ac_count -gt 10 && break
5036 done
5037 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5038esac
5039
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 $ac_path_EGREP_found && break 3
5041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005046 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048else
5049 ac_cv_path_EGREP=$EGREP
5050fi
5051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 fi
5053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5055$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005057
5058
Matthias Kloseb9621712010-04-24 17:59:49 +00005059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5060$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005061if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $as_echo_n "(cached) " >&6
5063else
5064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005065/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005066#include <stdlib.h>
5067#include <stdarg.h>
5068#include <string.h>
5069#include <float.h>
5070
5071int
5072main ()
5073{
5074
5075 ;
5076 return 0;
5077}
5078_ACEOF
5079if ac_fn_c_try_compile "$LINENO"; then :
5080 ac_cv_header_stdc=yes
5081else
5082 ac_cv_header_stdc=no
5083fi
5084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5085
5086if test $ac_cv_header_stdc = yes; then
5087 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5089/* end confdefs.h. */
5090#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005091
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005092_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005096else
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005099rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100
Matthias Kloseb9621712010-04-24 17:59:49 +00005101fi
5102
5103if test $ac_cv_header_stdc = yes; then
5104 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106/* end confdefs.h. */
5107#include <stdlib.h>
5108
5109_ACEOF
5110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5111 $EGREP "free" >/dev/null 2>&1; then :
5112
5113else
5114 ac_cv_header_stdc=no
5115fi
5116rm -f conftest*
5117
5118fi
5119
5120if test $ac_cv_header_stdc = yes; then
5121 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5122 if test "$cross_compiling" = yes; then :
5123 :
5124else
5125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126/* end confdefs.h. */
5127#include <ctype.h>
5128#include <stdlib.h>
5129#if ((' ' & 0x0FF) == 0x020)
5130# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5131# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5132#else
5133# define ISLOWER(c) \
5134 (('a' <= (c) && (c) <= 'i') \
5135 || ('j' <= (c) && (c) <= 'r') \
5136 || ('s' <= (c) && (c) <= 'z'))
5137# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5138#endif
5139
5140#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5141int
5142main ()
5143{
5144 int i;
5145 for (i = 0; i < 256; i++)
5146 if (XOR (islower (i), ISLOWER (i))
5147 || toupper (i) != TOUPPER (i))
5148 return 2;
5149 return 0;
5150}
5151_ACEOF
5152if ac_fn_c_try_run "$LINENO"; then :
5153
5154else
5155 ac_cv_header_stdc=no
5156fi
5157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5158 conftest.$ac_objext conftest.beam conftest.$ac_ext
5159fi
5160
5161fi
5162fi
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5164$as_echo "$ac_cv_header_stdc" >&6; }
5165if test $ac_cv_header_stdc = yes; then
5166
5167$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5168
5169fi
5170
5171# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5172for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5173 inttypes.h stdint.h unistd.h
5174do :
5175 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5176ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5177"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005178if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 cat >>confdefs.h <<_ACEOF
5180#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5181_ACEOF
5182
5183fi
5184
5185done
5186
5187
5188
5189 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005190if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 MINIX=yes
5192else
5193 MINIX=
5194fi
5195
5196
5197 if test "$MINIX" = yes; then
5198
5199$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5200
5201
5202$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5203
5204
5205$as_echo "#define _MINIX 1" >>confdefs.h
5206
5207 fi
5208
5209
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5211$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005212if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005213 $as_echo_n "(cached) " >&6
5214else
5215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5216/* end confdefs.h. */
5217
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005218# define __EXTENSIONS__ 1
5219 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005220int
5221main ()
5222{
5223
5224 ;
5225 return 0;
5226}
5227_ACEOF
5228if ac_fn_c_try_compile "$LINENO"; then :
5229 ac_cv_safe_to_define___extensions__=yes
5230else
5231 ac_cv_safe_to_define___extensions__=no
5232fi
5233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5234fi
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5236$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5237 test $ac_cv_safe_to_define___extensions__ = yes &&
5238 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5239
5240 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5241
5242 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5243
5244 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5245
5246 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5247
5248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250# Check for unsupported systems
5251case $ac_sys_system/$ac_sys_release in
5252atheos*|Linux*/1*)
5253 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5254 echo See README for details.
5255 exit 1;;
5256esac
5257
5258
Matthias Kloseb9621712010-04-24 17:59:49 +00005259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5260$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005261
5262# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005263if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264 withval=$with_suffix;
5265 case $withval in
5266 no) EXEEXT=;;
5267 yes) EXEEXT=.exe;;
5268 *) EXEEXT=$withval;;
5269 esac
5270fi
5271
Matthias Kloseb9621712010-04-24 17:59:49 +00005272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5273$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274
5275# Test whether we're running on a non-case-sensitive system, in which
5276# case we give a warning if no ext is given
5277
Matthias Kloseb9621712010-04-24 17:59:49 +00005278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5279$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280if test ! -d CaseSensitiveTestDir; then
5281mkdir CaseSensitiveTestDir
5282fi
5283
5284if test -d casesensitivetestdir
5285then
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5287$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288 BUILDEXEEXT=.exe
5289else
Matthias Kloseb9621712010-04-24 17:59:49 +00005290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5291$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 BUILDEXEEXT=$EXEEXT
5293fi
5294rmdir CaseSensitiveTestDir
5295
5296case $MACHDEP in
5297bsdos*)
5298 case $CC in
5299 gcc) CC="$CC -D_HAVE_BSDI";;
5300 esac;;
5301esac
5302
5303case $ac_sys_system in
5304hp*|HP*)
5305 case $CC in
5306 cc|*/cc) CC="$CC -Ae";;
5307 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308esac
5309
5310
5311
Matthias Kloseb9621712010-04-24 17:59:49 +00005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5313$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314if test -z "$LIBRARY"
5315then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005316 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5319$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320
5321# LDLIBRARY is the name of the library to link against (as opposed to the
5322# name of the library into which to insert object files). BLDLIBRARY is also
5323# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5324# is blank as the main program is not linked directly against LDLIBRARY.
5325# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5326# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5327# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5328# DLLLIBRARY is the shared (i.e., DLL) library.
5329#
5330# RUNSHARED is used to run shared python without installed libraries
5331#
5332# INSTSONAME is the name of the shared library that will be use to install
5333# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005334#
5335# LDVERSION is the shared library version number, normally the Python version
5336# with the ABI build flags appended.
5337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338
5339
5340
5341
5342
5343
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345LDLIBRARY="$LIBRARY"
5346BLDLIBRARY='$(LDLIBRARY)'
5347INSTSONAME='$(LDLIBRARY)'
5348DLLLIBRARY=''
5349LDLIBRARYDIR=''
5350RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005351LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353# LINKCC is the command that links the python executable -- default is $(CC).
5354# If CXX is set, and if it is needed to link a main function that was
5355# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5356# python might then depend on the C++ runtime
5357# This is altered for AIX in order to build the export list before
5358# linking.
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5361$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362if test -z "$LINKCC"
5363then
5364 LINKCC='$(PURIFY) $(MAINCC)'
5365 case $ac_sys_system in
5366 AIX*)
5367 exp_extra="\"\""
5368 if test $ac_sys_release -ge 5 -o \
5369 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5370 exp_extra="."
5371 fi
5372 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373 QNX*)
5374 # qcc must be used because the other compilers do not
5375 # support -N.
5376 LINKCC=qcc;;
5377 esac
5378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5380$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381
5382# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5383# make sure we default having it set to "no": this is used by
5384# distutils.unixccompiler to know if it should add --enable-new-dtags
5385# to linker command lines, and failing to detect GNU ld simply results
5386# in the same bahaviour as before.
5387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5389$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390ac_prog=ld
5391if test "$GCC" = yes; then
5392 ac_prog=`$CC -print-prog-name=ld`
5393fi
5394case `"$ac_prog" -V 2>&1 < /dev/null` in
5395 *GNU*)
5396 GNULD=yes;;
5397 *)
5398 GNULD=no;;
5399esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5401$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005402
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5404$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005405if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005406 $as_echo_n "(cached) " >&6
5407else
5408 ac_cv_c_inline=no
5409for ac_kw in inline __inline__ __inline; do
5410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5411/* end confdefs.h. */
5412#ifndef __cplusplus
5413typedef int foo_t;
5414static $ac_kw foo_t static_foo () {return 0; }
5415$ac_kw foo_t foo () {return 0; }
5416#endif
5417
5418_ACEOF
5419if ac_fn_c_try_compile "$LINENO"; then :
5420 ac_cv_c_inline=$ac_kw
5421fi
5422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5423 test "$ac_cv_c_inline" != no && break
5424done
5425
5426fi
5427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5428$as_echo "$ac_cv_c_inline" >&6; }
5429
5430case $ac_cv_c_inline in
5431 inline | yes) ;;
5432 *)
5433 case $ac_cv_c_inline in
5434 no) ac_val=;;
5435 *) ac_val=$ac_cv_c_inline;;
5436 esac
5437 cat >>confdefs.h <<_ACEOF
5438#ifndef __cplusplus
5439#define inline $ac_val
5440#endif
5441_ACEOF
5442 ;;
5443esac
5444
5445if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005446
5447$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005448
5449
5450fi
5451
5452
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5454$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005456if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457 enableval=$enable_shared;
5458fi
5459
5460
5461if test -z "$enable_shared"
5462then
5463 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005464 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465 enable_shared="yes";;
5466 *)
5467 enable_shared="no";;
5468 esac
5469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5471$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5474$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005476if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005477 enableval=$enable_profiling;
5478fi
5479
5480if test "x$enable_profiling" = xyes; then
5481 ac_save_cc="$CC"
5482 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484/* end confdefs.h. */
5485int main() { return 0; }
5486_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005487if ac_fn_c_try_link "$LINENO"; then :
5488
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005490 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005492rm -f core conftest.err conftest.$ac_objext \
5493 conftest$ac_exeext conftest.$ac_ext
5494 CC="$ac_save_cc"
5495else
5496 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5499$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
doko@ubuntu.comba015832012-06-30 16:52:05 +02005501if test "x$enable_profiling" = xyes; then
5502 BASECFLAGS="-pg $BASECFLAGS"
5503 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504fi
5505
Matthias Kloseb9621712010-04-24 17:59:49 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5507$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
5509# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5510# library that we build, but we do not want to link against it (we
5511# will find it with a -framework option). For this reason there is an
5512# extra variable BLDLIBRARY against which Python and the extension
5513# modules are linked, BLDLIBRARY. This is normally the same as
5514# LDLIBRARY, but empty for MacOSX framework builds.
5515if test "$enable_framework"
5516then
5517 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5518 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5519 BLDLIBRARY=''
5520else
5521 BLDLIBRARY='$(LDLIBRARY)'
5522fi
5523
5524# Other platforms follow
5525if test $enable_shared = "yes"; then
5526
Matthias Kloseb9621712010-04-24 17:59:49 +00005527$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528
5529 case $ac_sys_system in
5530 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005531 LDLIBRARY='libpython$(LDVERSION).dll.a'
5532 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533 ;;
5534 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005535 LDLIBRARY='libpython$(LDVERSION).so'
5536 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5538 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005539 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005540 then
5541 PY3LIBRARY=libpython3.so
5542 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005544 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005545 LDLIBRARY='libpython$(LDVERSION).so'
5546 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5548 case $ac_sys_system in
5549 FreeBSD*)
5550 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5551 ;;
5552 esac
5553 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005554 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005555 then
5556 PY3LIBRARY=libpython3.so
5557 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558 ;;
5559 hp*|HP*)
5560 case `uname -m` in
5561 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005562 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 ;;
5564 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005565 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566 ;;
5567 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005568 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5570 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005572 LDLIBRARY='libpython$(LDVERSION).dylib'
5573 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5575 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005576 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005577 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005578 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5579 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
5581 esac
5582else # shared is disabled
5583 case $ac_sys_system in
5584 CYGWIN*)
5585 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005586 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 ;;
5588 esac
5589fi
5590
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005591if test "$cross_compiling" = yes; then
5592 RUNSHARED=
5593fi
5594
Matthias Kloseb9621712010-04-24 17:59:49 +00005595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5596$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
5598if test -n "$ac_tool_prefix"; then
5599 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5600set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005603if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605else
5606 if test -n "$RANLIB"; then
5607 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5608else
5609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612 IFS=$as_save_IFS
5613 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 break 2
5619 fi
5620done
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622IFS=$as_save_IFS
5623
5624fi
5625fi
5626RANLIB=$ac_cv_prog_RANLIB
5627if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5629$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630else
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633fi
5634
5635
5636fi
5637if test -z "$ac_cv_prog_RANLIB"; then
5638 ac_ct_RANLIB=$RANLIB
5639 # Extract the first word of "ranlib", so it can be a program name with args.
5640set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005643if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645else
5646 if test -n "$ac_ct_RANLIB"; then
5647 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5648else
5649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5650for as_dir in $PATH
5651do
5652 IFS=$as_save_IFS
5653 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 break 2
5659 fi
5660done
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662IFS=$as_save_IFS
5663
5664fi
5665fi
5666ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5667if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5669$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670else
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5672$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673fi
5674
5675 if test "x$ac_ct_RANLIB" = x; then
5676 RANLIB=":"
5677 else
5678 case $cross_compiling:$ac_tool_warned in
5679yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682ac_tool_warned=yes ;;
5683esac
5684 RANLIB=$ac_ct_RANLIB
5685 fi
5686else
5687 RANLIB="$ac_cv_prog_RANLIB"
5688fi
5689
5690
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005691if test -n "$ac_tool_prefix"; then
5692 for ac_prog in ar aal
5693 do
5694 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005698if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700else
5701 if test -n "$AR"; then
5702 ac_cv_prog_AR="$AR" # Let the user override the test.
5703else
5704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707 IFS=$as_save_IFS
5708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005710 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5711 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 break 2
5714 fi
5715done
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717IFS=$as_save_IFS
5718
5719fi
5720fi
5721AR=$ac_cv_prog_AR
5722if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5724$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725else
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728fi
5729
5730
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005731 test -n "$AR" && break
5732 done
5733fi
5734if test -z "$AR"; then
5735 ac_ct_AR=$AR
5736 for ac_prog in ar aal
5737do
5738 # Extract the first word of "$ac_prog", so it can be a program name with args.
5739set dummy $ac_prog; ac_word=$2
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
5742if ${ac_cv_prog_ac_ct_AR+:} false; then :
5743 $as_echo_n "(cached) " >&6
5744else
5745 if test -n "$ac_ct_AR"; then
5746 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5747else
5748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751 IFS=$as_save_IFS
5752 test -z "$as_dir" && as_dir=.
5753 for ac_exec_ext in '' $ac_executable_extensions; do
5754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5755 ac_cv_prog_ac_ct_AR="$ac_prog"
5756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5757 break 2
5758 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005760 done
5761IFS=$as_save_IFS
5762
5763fi
5764fi
5765ac_ct_AR=$ac_cv_prog_ac_ct_AR
5766if test -n "$ac_ct_AR"; then
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5768$as_echo "$ac_ct_AR" >&6; }
5769else
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
5772fi
5773
5774
5775 test -n "$ac_ct_AR" && break
5776done
5777
5778 if test "x$ac_ct_AR" = x; then
5779 AR="ar"
5780 else
5781 case $cross_compiling:$ac_tool_warned in
5782yes:)
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5785ac_tool_warned=yes ;;
5786esac
5787 AR=$ac_ct_AR
5788 fi
5789fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
5791
5792# tweak ARFLAGS only if the user didn't set it on the command line
5793
5794if test -z "$ARFLAGS"
5795then
5796 ARFLAGS="rc"
5797fi
5798
doko@ubuntu.com58844492012-06-30 18:25:32 +02005799if test -n "$ac_tool_prefix"; then
5800 for ac_prog in readelf
5801 do
5802 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805$as_echo_n "checking for $ac_word... " >&6; }
5806if ${ac_cv_prog_READELF+:} false; then :
5807 $as_echo_n "(cached) " >&6
5808else
5809 if test -n "$READELF"; then
5810 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5811else
5812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815 IFS=$as_save_IFS
5816 test -z "$as_dir" && as_dir=.
5817 for ac_exec_ext in '' $ac_executable_extensions; do
5818 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5819 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821 break 2
5822 fi
5823done
5824 done
5825IFS=$as_save_IFS
5826
5827fi
5828fi
5829READELF=$ac_cv_prog_READELF
5830if test -n "$READELF"; then
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5832$as_echo "$READELF" >&6; }
5833else
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839 test -n "$READELF" && break
5840 done
5841fi
5842if test -z "$READELF"; then
5843 ac_ct_READELF=$READELF
5844 for ac_prog in readelf
5845do
5846 # Extract the first word of "$ac_prog", so it can be a program name with args.
5847set dummy $ac_prog; ac_word=$2
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849$as_echo_n "checking for $ac_word... " >&6; }
5850if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5851 $as_echo_n "(cached) " >&6
5852else
5853 if test -n "$ac_ct_READELF"; then
5854 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5855else
5856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
5861 for ac_exec_ext in '' $ac_executable_extensions; do
5862 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5863 ac_cv_prog_ac_ct_READELF="$ac_prog"
5864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865 break 2
5866 fi
5867done
5868 done
5869IFS=$as_save_IFS
5870
5871fi
5872fi
5873ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5874if test -n "$ac_ct_READELF"; then
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5876$as_echo "$ac_ct_READELF" >&6; }
5877else
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
5880fi
5881
5882
5883 test -n "$ac_ct_READELF" && break
5884done
5885
5886 if test "x$ac_ct_READELF" = x; then
5887 READELF=":"
5888 else
5889 case $cross_compiling:$ac_tool_warned in
5890yes:)
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5893ac_tool_warned=yes ;;
5894esac
5895 READELF=$ac_ct_READELF
5896 fi
5897fi
5898
5899if test "$cross_compiling" = yes; then
5900 case "$READELF" in
5901 readelf|:)
5902 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5903 ;;
5904 esac
5905fi
5906
5907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005909DISABLE_ASDLGEN=""
5910# Extract the first word of "python", so it can be a program name with args.
5911set dummy python; ac_word=$2
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005914if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005915 $as_echo_n "(cached) " >&6
5916else
5917 if test -n "$HAS_PYTHON"; then
5918 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5919else
5920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH
5922do
5923 IFS=$as_save_IFS
5924 test -z "$as_dir" && as_dir=.
5925 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005927 ac_cv_prog_HAS_PYTHON="found"
5928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929 break 2
5930 fi
5931done
5932 done
5933IFS=$as_save_IFS
5934
5935 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5936fi
5937fi
5938HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5939if test -n "$HAS_PYTHON"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5941$as_echo "$HAS_PYTHON" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948if test $HAS_HG != found -o $HAS_PYTHON != found
5949then
5950 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5951fi
5952
5953
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954case $MACHDEP in
5955bsdos*|hp*|HP*)
5956 # install -d does not work on BSDI or HP-UX
5957 if test -z "$INSTALL"
5958 then
5959 INSTALL="${srcdir}/install-sh -c"
5960 fi
5961esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962# Find a good install program. We prefer a C program (faster),
5963# so one script is as good as another. But avoid the broken or
5964# incompatible versions:
5965# SysV /etc/install, /usr/sbin/install
5966# SunOS /usr/etc/install
5967# IRIX /sbin/install
5968# AIX /bin/install
5969# AmigaOS /C/install, which installs bootblocks on floppy discs
5970# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5971# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5972# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5973# OS/2's system install, which has a completely different semantic
5974# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005975# Reject install programs that cannot install multiple files.
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5977$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005979if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985 IFS=$as_save_IFS
5986 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 # Account for people who put trailing slashes in PATH elements.
5988case $as_dir/ in #((
5989 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 /usr/ucb/* ) ;;
5993 *)
5994 # OSF1 and SCO ODT 3.0 have their own names for install.
5995 # Don't use installbsd from OSF since it installs stuff as root
5996 # by default.
5997 for ac_prog in ginstall scoinst install; do
5998 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005999 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000 if test $ac_prog = install &&
6001 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6002 # AIX install. It has an incompatible calling convention.
6003 :
6004 elif test $ac_prog = install &&
6005 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6006 # program-specific install script used by HP pwplus--don't use.
6007 :
6008 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 rm -rf conftest.one conftest.two conftest.dir
6010 echo one > conftest.one
6011 echo two > conftest.two
6012 mkdir conftest.dir
6013 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6014 test -s conftest.one && test -s conftest.two &&
6015 test -s conftest.dir/conftest.one &&
6016 test -s conftest.dir/conftest.two
6017 then
6018 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6019 break 3
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 fi
6022 fi
6023 done
6024 done
6025 ;;
6026esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006027
6028 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029IFS=$as_save_IFS
6030
Matthias Kloseb9621712010-04-24 17:59:49 +00006031rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033fi
6034 if test "${ac_cv_path_install+set}" = set; then
6035 INSTALL=$ac_cv_path_install
6036 else
6037 # As a last resort, use the slow shell script. Don't cache a
6038 # value for INSTALL within a source directory, because that will
6039 # break other packages using the cache if that directory is
6040 # removed, or if the value is a relative name.
6041 INSTALL=$ac_install_sh
6042 fi
6043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6045$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046
6047# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6048# It thinks the first close brace ends the variable substitution.
6049test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6050
6051test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6052
6053test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6054
Matthias Klose93a0ef12012-03-15 18:08:34 +01006055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6056$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6057if test -z "$MKDIR_P"; then
6058 if ${ac_cv_path_mkdir+:} false; then :
6059 $as_echo_n "(cached) " >&6
6060else
6061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_prog in mkdir gmkdir; do
6067 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006068 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006069 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6070 'mkdir (GNU coreutils) '* | \
6071 'mkdir (coreutils) '* | \
6072 'mkdir (fileutils) '4.1*)
6073 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6074 break 3;;
6075 esac
6076 done
6077 done
6078 done
6079IFS=$as_save_IFS
6080
6081fi
6082
6083 test -d ./--version && rmdir ./--version
6084 if test "${ac_cv_path_mkdir+set}" = set; then
6085 MKDIR_P="$ac_cv_path_mkdir -p"
6086 else
6087 # As a last resort, use the slow shell script. Don't cache a
6088 # value for MKDIR_P within a source directory, because that will
6089 # break other packages using the cache if that directory is
6090 # removed, or if the value is a relative name.
6091 MKDIR_P="$ac_install_sh -d"
6092 fi
6093fi
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6095$as_echo "$MKDIR_P" >&6; }
6096
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097
6098# Not every filesystem supports hard links
6099
6100if test -z "$LN" ; then
6101 case $ac_sys_system in
6102 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103 *) LN=ln;;
6104 esac
6105fi
6106
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006107# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006108
6109ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006110
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6113$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114
6115# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006116if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117 withval=$with_pydebug;
6118if test "$withval" != no
6119then
6120
Matthias Kloseb9621712010-04-24 17:59:49 +00006121$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6124$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006126 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006127else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129fi
6130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133fi
6134
6135
6136# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6137# merged with this chunk of code?
6138
6139# Optimizer/debugger flags
6140# ------------------------
6141# (The following bit of code is complicated enough - please keep things
6142# indented properly. Just pretend you're editing Python code. ;-)
6143
6144# There are two parallel sets of case statements below, one that checks to
6145# see if OPT was set and one that does BASECFLAGS setting based upon
6146# compiler and platform. BASECFLAGS tweaks need to be made even if the
6147# user set OPT.
6148
6149# tweak OPT based on compiler and platform, only if the user didn't set
6150# it on the command line
6151
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006152if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153then
6154 case $GCC in
6155 yes)
6156 if test "$CC" != 'g++' ; then
6157 STRICT_PROTO="-Wstrict-prototypes"
6158 fi
6159 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6160 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6161 WRAP="-fwrapv"
6162 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006163
6164 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006165 case $CC in
6166 *clang*) WRAP="-fwrapv"
6167 ;;
6168 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170 case $ac_cv_prog_cc_g in
6171 yes)
6172 if test "$Py_DEBUG" = 'true' ; then
6173 # Optimization messes up debuggers, so turn it off for
6174 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006175 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176 else
6177 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6178 fi
6179 ;;
6180 *)
6181 OPT="-O3 -Wall $STRICT_PROTO"
6182 ;;
6183 esac
6184 case $ac_sys_system in
6185 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6186 ;;
6187 esac
6188 ;;
6189
6190 *)
6191 OPT="-O"
6192 ;;
6193 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194fi
6195
6196
6197
6198# The -arch flags for universal builds on OSX
6199UNIVERSAL_ARCH_FLAGS=
6200
6201
6202# tweak BASECFLAGS based on compiler and platform
6203case $GCC in
6204yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006205 # Python doesn't violate C99 aliasing rules, but older versions of
6206 # GCC produce warnings for legal Python code. Enable
6207 # -fno-strict-aliasing on versions of GCC that support but produce
6208 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6210$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 ac_save_cc="$CC"
6212 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006213 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006214 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006219
Matthias Kloseb159a552010-04-25 21:00:44 +00006220
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006221int
6222main ()
6223{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006224
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006225 ;
6226 return 0;
6227}
Matthias Kloseb159a552010-04-25 21:00:44 +00006228
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006230if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006231
6232 CC="$ac_save_cc -fstrict-aliasing"
6233 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006235/* end confdefs.h. */
6236
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006237 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006238int
6239main ()
6240{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006241double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006242 ;
6243 return 0;
6244}
Matthias Kloseb159a552010-04-25 21:00:44 +00006245
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006247if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006248
6249 ac_cv_no_strict_aliasing=no
6250
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251else
Matthias Kloseb159a552010-04-25 21:00:44 +00006252
6253 ac_cv_no_strict_aliasing=yes
6254
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006255fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006257
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006258else
Matthias Kloseb159a552010-04-25 21:00:44 +00006259
6260 ac_cv_no_strict_aliasing=no
6261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006264fi
6265
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006266 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6269$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006270 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271 then
6272 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6273 fi
6274
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6276$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6277 ac_save_cc="$CC"
6278 CC="$CC -Wunused-result -Werror"
6279 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006280 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006281 $as_echo_n "(cached) " >&6
6282else
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284/* end confdefs.h. */
6285
6286
6287int
6288main ()
6289{
6290
6291 ;
6292 return 0;
6293}
6294
6295_ACEOF
6296if ac_fn_c_try_compile "$LINENO"; then :
6297
6298 ac_cv_disable_unused_result_warning=yes
6299
6300else
6301
6302 ac_cv_disable_unused_result_warning=no
6303
6304fi
6305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6306fi
6307
6308 CFLAGS="$save_CFLAGS"
6309 CC="$ac_save_cc"
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6311$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6312
6313 if test $ac_cv_disable_unused_result_warning = yes
6314 then
6315 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6316 fi
6317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6319 # support. Without this, treatment of subnormals doesn't follow
6320 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006321 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 alpha*)
6323 BASECFLAGS="$BASECFLAGS -mieee"
6324 ;;
6325 esac
6326
6327 case $ac_sys_system in
6328 SCO_SV*)
6329 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6330 ;;
6331 # is there any other compiler on Darwin besides gcc?
6332 Darwin*)
6333 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6334 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006335 if test "${CC}" = gcc
6336 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6338$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006339 case "${UNIVERSALSDK}" in
6340 */MacOSX10.4u.sdk)
6341 # Build using 10.4 SDK, force usage of gcc when the
6342 # compiler is gcc, otherwise the user will get very
6343 # confusing error messages when building on OSX 10.6
6344 CC=gcc-4.0
6345 CPP=cpp-4.0
6346 ;;
6347 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6349$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351
6352
6353 if test "${enable_universalsdk}"; then
6354 UNIVERSAL_ARCH_FLAGS=""
6355 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6356 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6357 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006358 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6360 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006361 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006362 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
6364 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6365 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006366 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006367 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006369 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6370 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006371 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006372 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006373
6374 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6375 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006376 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006377 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006380 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381
6382 fi
6383
6384
Ronald Oussoren666028b2010-04-18 19:07:43 +00006385 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6386 if test "${UNIVERSALSDK}" != "/"
6387 then
6388 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6389 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006390 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 fi
6392 fi
6393
6394 # Calculate the right deployment target for this build.
6395 #
6396 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006397 if test ${cur_target} '>' 10.2 && \
6398 test ${cur_target} '<' 10.6
6399 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006401 if test ${enable_universalsdk}; then
6402 if test "${UNIVERSAL_ARCHS}" = "all"; then
6403 # Ensure that the default platform for a
6404 # 4-way universal build is OSX 10.5,
6405 # that's the first OS release where
6406 # 4-way builds make sense.
6407 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006408
6409 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6410 cur_target='10.5'
6411
6412 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6413 cur_target='10.5'
6414
6415 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6416 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006417 fi
6418 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006419 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006420 # On Intel macs default to a deployment
6421 # target of 10.4, that's the first OSX
6422 # release with Intel support.
6423 cur_target="10.4"
6424 fi
6425 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426 fi
6427 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6428
6429 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6430 # environment with a value that is the same as what we'll use
6431 # in the Makefile to ensure that we'll get the same compiler
6432 # environment during configure and build time.
6433 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6434 export MACOSX_DEPLOYMENT_TARGET
6435 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6436
6437 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 esac
6439 ;;
6440
6441*)
6442 case $ac_sys_system in
6443 OpenUNIX*|UnixWare*)
6444 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6445 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 SCO_SV*)
6447 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6448 ;;
6449 esac
6450 ;;
6451esac
6452
6453if test "$Py_DEBUG" = 'true'; then
6454 :
6455else
6456 OPT="-DNDEBUG $OPT"
6457fi
6458
6459if test "$ac_arch_flags"
6460then
6461 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6462fi
6463
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464# Check whether GCC supports PyArg_ParseTuple format
6465if test "$GCC" = "yes"
6466then
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6468$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469 save_CFLAGS=$CFLAGS
6470 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472/* end confdefs.h. */
6473
6474 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475int
6476main ()
6477{
6478
6479 ;
6480 return 0;
6481}
Matthias Kloseb159a552010-04-25 21:00:44 +00006482
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006484if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485
Matthias Kloseb159a552010-04-25 21:00:44 +00006486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006488
Matthias Kloseb159a552010-04-25 21:00:44 +00006489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006490$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006491
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492else
Matthias Kloseb159a552010-04-25 21:00:44 +00006493
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006495$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496
6497fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6499 CFLAGS=$save_CFLAGS
6500fi
6501
6502# On some compilers, pthreads are available without further options
6503# (e.g. MacOS X). On some of these systems, the compiler will not
6504# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6505# So we have to see first whether pthreads are available without
6506# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6508$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006509if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511else
Matthias Kloseb9621712010-04-24 17:59:49 +00006512 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513 ac_cv_pthread_is_default=no
6514else
Matthias Kloseb9621712010-04-24 17:59:49 +00006515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516/* end confdefs.h. */
6517
6518#include <pthread.h>
6519
6520void* routine(void* p){return NULL;}
6521
6522int main(){
6523 pthread_t p;
6524 if(pthread_create(&p,NULL,routine,NULL)!=0)
6525 return 1;
6526 (void)pthread_detach(p);
6527 return 0;
6528}
6529
6530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006531if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
6533 ac_cv_pthread_is_default=yes
6534 ac_cv_kthread=no
6535 ac_cv_pthread=no
6536
6537else
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542fi
6543
6544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545fi
6546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6548$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
6550
6551if test $ac_cv_pthread_is_default = yes
6552then
6553 ac_cv_kpthread=no
6554else
6555# -Kpthread, if available, provides the right #defines
6556# and linker options to make pthread_create available
6557# Some compilers won't report that they do not support -Kpthread,
6558# so we need to run a program to see whether it really made the
6559# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6561$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006562if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564else
6565 ac_save_cc="$CC"
6566CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006567if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568 ac_cv_kpthread=no
6569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571/* end confdefs.h. */
6572
6573#include <pthread.h>
6574
6575void* routine(void* p){return NULL;}
6576
6577int main(){
6578 pthread_t p;
6579 if(pthread_create(&p,NULL,routine,NULL)!=0)
6580 return 1;
6581 (void)pthread_detach(p);
6582 return 0;
6583}
6584
6585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006586if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587 ac_cv_kpthread=yes
6588else
Matthias Kloseb9621712010-04-24 17:59:49 +00006589 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593fi
6594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595CC="$ac_save_cc"
6596fi
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6599$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006600fi
6601
6602if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6603then
6604# -Kthread, if available, provides the right #defines
6605# and linker options to make pthread_create available
6606# Some compilers won't report that they do not support -Kthread,
6607# so we need to run a program to see whether it really made the
6608# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6610$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006611if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006612 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613else
6614 ac_save_cc="$CC"
6615CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006616if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617 ac_cv_kthread=no
6618else
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620/* end confdefs.h. */
6621
6622#include <pthread.h>
6623
6624void* routine(void* p){return NULL;}
6625
6626int main(){
6627 pthread_t p;
6628 if(pthread_create(&p,NULL,routine,NULL)!=0)
6629 return 1;
6630 (void)pthread_detach(p);
6631 return 0;
6632}
6633
6634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006635if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636 ac_cv_kthread=yes
6637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642fi
6643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644CC="$ac_save_cc"
6645fi
6646
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6648$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649fi
6650
6651if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6652then
6653# -pthread, if available, provides the right #defines
6654# and linker options to make pthread_create available
6655# Some compilers won't report that they do not support -pthread,
6656# so we need to run a program to see whether it really made the
6657# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6659$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006660if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662else
6663 ac_save_cc="$CC"
6664CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006665if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666 ac_cv_pthread=no
6667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669/* end confdefs.h. */
6670
6671#include <pthread.h>
6672
6673void* routine(void* p){return NULL;}
6674
6675int main(){
6676 pthread_t p;
6677 if(pthread_create(&p,NULL,routine,NULL)!=0)
6678 return 1;
6679 (void)pthread_detach(p);
6680 return 0;
6681}
6682
6683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006684if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685 ac_cv_pthread=yes
6686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
6692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693CC="$ac_save_cc"
6694fi
6695
Matthias Kloseb9621712010-04-24 17:59:49 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6697$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006698fi
6699
6700# If we have set a CC compiler flag for thread support then
6701# check if it works for CXX, too.
6702ac_cv_cxx_thread=no
6703if test ! -z "$CXX"
6704then
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6706$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707ac_save_cxx="$CXX"
6708
6709if test "$ac_cv_kpthread" = "yes"
6710then
6711 CXX="$CXX -Kpthread"
6712 ac_cv_cxx_thread=yes
6713elif test "$ac_cv_kthread" = "yes"
6714then
6715 CXX="$CXX -Kthread"
6716 ac_cv_cxx_thread=yes
6717elif test "$ac_cv_pthread" = "yes"
6718then
6719 CXX="$CXX -pthread"
6720 ac_cv_cxx_thread=yes
6721fi
6722
6723if test $ac_cv_cxx_thread = yes
6724then
6725 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6726 $CXX -c conftest.$ac_ext 2>&5
6727 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6728 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6729 then
6730 ac_cv_cxx_thread=yes
6731 else
6732 ac_cv_cxx_thread=no
6733 fi
6734 rm -fr conftest*
6735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6737$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738fi
6739CXX="$ac_save_cxx"
6740
6741
6742# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6744$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006745if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747else
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749/* end confdefs.h. */
6750#include <stdlib.h>
6751#include <stdarg.h>
6752#include <string.h>
6753#include <float.h>
6754
6755int
6756main ()
6757{
6758
6759 ;
6760 return 0;
6761}
6762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006763if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 ac_cv_header_stdc=yes
6765else
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6769
6770if test $ac_cv_header_stdc = yes; then
6771 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773/* end confdefs.h. */
6774#include <string.h>
6775
6776_ACEOF
6777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 $EGREP "memchr" >/dev/null 2>&1; then :
6779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780else
6781 ac_cv_header_stdc=no
6782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006783rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784
6785fi
6786
6787if test $ac_cv_header_stdc = yes; then
6788 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790/* end confdefs.h. */
6791#include <stdlib.h>
6792
6793_ACEOF
6794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 $EGREP "free" >/dev/null 2>&1; then :
6796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797else
6798 ac_cv_header_stdc=no
6799fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006800rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006801
6802fi
6803
6804if test $ac_cv_header_stdc = yes; then
6805 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807 :
6808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810/* end confdefs.h. */
6811#include <ctype.h>
6812#include <stdlib.h>
6813#if ((' ' & 0x0FF) == 0x020)
6814# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6815# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6816#else
6817# define ISLOWER(c) \
6818 (('a' <= (c) && (c) <= 'i') \
6819 || ('j' <= (c) && (c) <= 'r') \
6820 || ('s' <= (c) && (c) <= 'z'))
6821# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6822#endif
6823
6824#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6825int
6826main ()
6827{
6828 int i;
6829 for (i = 0; i < 256; i++)
6830 if (XOR (islower (i), ISLOWER (i))
6831 || toupper (i) != TOUPPER (i))
6832 return 2;
6833 return 0;
6834}
6835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006836if ac_fn_c_try_run "$LINENO"; then :
6837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843fi
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845fi
6846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6848$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849if test $ac_cv_header_stdc = yes; then
6850
Matthias Kloseb9621712010-04-24 17:59:49 +00006851$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852
6853fi
6854
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006855for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006856fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006857ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006858sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006859unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006860poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006861sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006862sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006863sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006864sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006865sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006866libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006867bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006868do :
6869 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6870ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006871if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006872 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006873#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006874_ACEOF
6875
6876fi
6877
Guido van Rossum627b2d71993-12-24 10:39:16 +00006878done
6879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006880ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006881for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006882 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6884$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006885if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006889/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006890#include <sys/types.h>
6891#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006892
Martin v. Löwis11437992002-04-12 09:54:03 +00006893int
6894main ()
6895{
6896if ((DIR *) 0)
6897return 0;
6898 ;
6899 return 0;
6900}
6901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006902if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006903 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006904else
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006909eval ac_res=\$$as_ac_Header
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6911$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006912if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006914#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006915_ACEOF
6916
6917ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006918fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006920done
6921# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6922if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6924$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006925if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006927else
Martin v. Löwis11437992002-04-12 09:54:03 +00006928 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006932/* Override any GCC internal prototype to avoid an error.
6933 Use char because int might match the return type of a GCC
6934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006935#ifdef __cplusplus
6936extern "C"
6937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006938char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006942return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ;
6944 return 0;
6945}
6946_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006947for ac_lib in '' dir; do
6948 if test -z "$ac_lib"; then
6949 ac_res="none required"
6950 else
6951 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006952 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006957rm -f core conftest.err conftest.$ac_objext \
6958 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006959 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006960 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006962done
Victor Stinnere0be4232011-10-25 13:06:09 +02006963if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965else
6966 ac_cv_search_opendir=no
6967fi
6968rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006969LIBS=$ac_func_search_save_LIBS
6970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6972$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006974if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006978
Michael W. Hudson54241132001-12-07 15:38:26 +00006979else
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6981$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006982if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006984else
6985 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989/* Override any GCC internal prototype to avoid an error.
6990 Use char because int might match the return type of a GCC
6991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006992#ifdef __cplusplus
6993extern "C"
6994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006995char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006996int
6997main ()
6998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006999return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007000 ;
7001 return 0;
7002}
7003_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007004for ac_lib in '' x; do
7005 if test -z "$ac_lib"; then
7006 ac_res="none required"
7007 else
7008 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007009 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007014rm -f core conftest.err conftest.$ac_objext \
7015 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007016 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007017 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019done
Victor Stinnere0be4232011-10-25 13:06:09 +02007020if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022else
7023 ac_cv_search_opendir=no
7024fi
7025rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007026LIBS=$ac_func_search_save_LIBS
7027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7029$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007030ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007032 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007034fi
7035
7036fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007037
Matthias Kloseb9621712010-04-24 17:59:49 +00007038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7039$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007040if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007041 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007042else
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007044/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007045#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007046int
7047main ()
7048{
7049return makedev(0, 0);
7050 ;
7051 return 0;
7052}
7053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007054if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007055 ac_cv_header_sys_types_h_makedev=yes
7056else
Matthias Kloseb9621712010-04-24 17:59:49 +00007057 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007059rm -f core conftest.err conftest.$ac_objext \
7060 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007061
7062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7064$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007065
7066if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007067ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007068if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007069
Matthias Kloseb9621712010-04-24 17:59:49 +00007070$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007071
7072fi
7073
7074
7075
7076 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007078if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007079
Matthias Kloseb9621712010-04-24 17:59:49 +00007080$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007081
7082fi
7083
7084
7085 fi
7086fi
7087
Michael W. Hudson54241132001-12-07 15:38:26 +00007088
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007089# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7090for ac_header in net/if.h
7091do :
7092 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7093#ifdef STDC_HEADERS
7094# include <stdlib.h>
7095# include <stddef.h>
7096#else
7097# ifdef HAVE_STDLIB_H
7098# include <stdlib.h>
7099# endif
7100#endif
7101#ifdef HAVE_SYS_SOCKET_H
7102# include <sys/socket.h>
7103#endif
7104
7105"
Victor Stinnere0be4232011-10-25 13:06:09 +02007106if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007107 cat >>confdefs.h <<_ACEOF
7108#define HAVE_NET_IF_H 1
7109_ACEOF
7110
7111fi
7112
7113done
7114
7115
7116
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007117# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007118for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007119do :
7120 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007121#ifdef HAVE_CURSES_H
7122#include <curses.h>
7123#endif
7124
Matthias Kloseb9621712010-04-24 17:59:49 +00007125"
Victor Stinnere0be4232011-10-25 13:06:09 +02007126if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007127 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007128#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007129_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007130
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007131fi
7132
7133done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007134
7135
Martin v. Löwis11017b12006-01-14 18:12:57 +00007136# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007137for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007138do :
7139 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 +00007140#ifdef HAVE_ASM_TYPES_H
7141#include <asm/types.h>
7142#endif
7143#ifdef HAVE_SYS_SOCKET_H
7144#include <sys/socket.h>
7145#endif
7146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147"
Victor Stinnere0be4232011-10-25 13:06:09 +02007148if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007149 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007150#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007151_ACEOF
7152
7153fi
7154
7155done
7156
7157
Charles-François Natali47413c12011-10-06 19:47:44 +02007158# On Linux, can.h and can/raw.h require sys/socket.h
7159for ac_header in linux/can.h linux/can/raw.h
7160do :
7161 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7162ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7163#ifdef HAVE_SYS_SOCKET_H
7164#include <sys/socket.h>
7165#endif
7166
7167"
7168if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7169 cat >>confdefs.h <<_ACEOF
7170#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7171_ACEOF
7172
7173fi
7174
7175done
7176
7177
Guido van Rossum627b2d71993-12-24 10:39:16 +00007178# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007179was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7181$as_echo_n "checking for clock_t in time.h... " >&6; }
7182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007183/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007184#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007185
7186_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007189 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007190else
Martin v. Löwis11437992002-04-12 09:54:03 +00007191
7192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007194
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007195
Guido van Rossum627b2d71993-12-24 10:39:16 +00007196fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007197rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007198
Matthias Kloseb9621712010-04-24 17:59:49 +00007199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7200$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007201
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7203$as_echo_n "checking for makedev... " >&6; }
7204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007205/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007206
Jesus Cea740f53a2010-04-28 11:35:30 +00007207#if defined(MAJOR_IN_MKDEV)
7208#include <sys/mkdev.h>
7209#elif defined(MAJOR_IN_SYSMACROS)
7210#include <sys/sysmacros.h>
7211#else
7212#include <sys/types.h>
7213#endif
7214
Neal Norwitz11690112002-07-30 01:08:28 +00007215int
7216main ()
7217{
Jesus Cea740f53a2010-04-28 11:35:30 +00007218
7219 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007220 ;
7221 return 0;
7222}
Matthias Kloseb159a552010-04-25 21:00:44 +00007223
Neal Norwitz11690112002-07-30 01:08:28 +00007224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007225if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007226 ac_cv_has_makedev=yes
7227else
Matthias Kloseb9621712010-04-24 17:59:49 +00007228 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007230rm -f core conftest.err conftest.$ac_objext \
7231 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7233$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007234if test "$ac_cv_has_makedev" = "yes"; then
7235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007237
7238fi
7239
Martin v. Löwis399a6892002-10-04 10:22:02 +00007240# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7241# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7242# defined, but the compiler does not support pragma redefine_extname,
7243# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7244# structures (such as rlimit64) without declaring them. As a
7245# work-around, disable LFS on such configurations
7246
7247use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7249$as_echo_n "checking Solaris LFS bug... " >&6; }
7250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007251/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007252
7253#define _LARGEFILE_SOURCE 1
7254#define _FILE_OFFSET_BITS 64
7255#include <sys/resource.h>
7256
Martin v. Löwis399a6892002-10-04 10:22:02 +00007257int
7258main ()
7259{
7260struct rlimit foo;
7261 ;
7262 return 0;
7263}
7264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007266 sol_lfs_bug=no
7267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7272$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007273if test "$sol_lfs_bug" = "yes"; then
7274 use_lfs=no
7275fi
7276
7277if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007278# Two defines needed to enable largefile support on various platforms
7279# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007280case $ac_sys_system/$ac_sys_release in
7281AIX*)
7282
7283$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7284
7285 ;;
7286esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007287
Matthias Kloseb9621712010-04-24 17:59:49 +00007288$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007289
7290
Matthias Kloseb9621712010-04-24 17:59:49 +00007291$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007292
Martin v. Löwis399a6892002-10-04 10:22:02 +00007293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007294
Guido van Rossum84e7b241996-08-19 21:59:00 +00007295# Add some code to confdefs.h so that the test for off_t works on SCO
7296cat >> confdefs.h <<\EOF
7297#if defined(SCO_DS)
7298#undef _OFF_T
7299#endif
7300EOF
7301
Guido van Rossumef2255b2000-03-10 22:30:29 +00007302# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007303ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007304if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306else
Martin v. Löwis11437992002-04-12 09:54:03 +00007307
7308cat >>confdefs.h <<_ACEOF
7309#define mode_t int
7310_ACEOF
7311
7312fi
7313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007315if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007317else
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
7319cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007320#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007321_ACEOF
7322
7323fi
7324
Matthias Kloseb9621712010-04-24 17:59:49 +00007325ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007326if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007328else
Martin v. Löwis11437992002-04-12 09:54:03 +00007329
7330cat >>confdefs.h <<_ACEOF
7331#define pid_t int
7332_ACEOF
7333
7334fi
7335
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007336
Martin v. Löwis11437992002-04-12 09:54:03 +00007337cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007338#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007339_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007342if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007343
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007344else
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
7346cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007347#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007348_ACEOF
7349
7350fi
7351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7353$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007354if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007356else
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007358/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007359#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007360
7361_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007364 ac_cv_type_uid_t=yes
7365else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007366 ac_cv_type_uid_t=no
7367fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007368rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7372$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007373if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007374
Matthias Kloseb9621712010-04-24 17:59:49 +00007375$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007376
7377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007379
7380fi
7381
Matthias Kloseb9621712010-04-24 17:59:49 +00007382ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7383case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007384 no|yes) ;; #(
7385 *)
7386
Matthias Kloseb9621712010-04-24 17:59:49 +00007387$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007388
7389
7390cat >>confdefs.h <<_ACEOF
7391#define uint32_t $ac_cv_c_uint32_t
7392_ACEOF
7393;;
7394 esac
7395
Matthias Kloseb9621712010-04-24 17:59:49 +00007396ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7397case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007398 no|yes) ;; #(
7399 *)
7400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007402
7403
7404cat >>confdefs.h <<_ACEOF
7405#define uint64_t $ac_cv_c_uint64_t
7406_ACEOF
7407;;
7408 esac
7409
Matthias Kloseb9621712010-04-24 17:59:49 +00007410ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7411case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007412 no|yes) ;; #(
7413 *)
7414
7415cat >>confdefs.h <<_ACEOF
7416#define int32_t $ac_cv_c_int32_t
7417_ACEOF
7418;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007419esac
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7422case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007423 no|yes) ;; #(
7424 *)
7425
7426cat >>confdefs.h <<_ACEOF
7427#define int64_t $ac_cv_c_int64_t
7428_ACEOF
7429;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007430esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007433if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007436
7437fi
7438
Stefan Krah1919b7e2012-03-21 18:25:23 +01007439ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7440if test "x$ac_cv_type___uint128_t" = xyes; then :
7441
7442$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7443
7444fi
7445
Jack Jansendd19cf82001-12-06 22:36:17 +00007446
Michael W. Hudson54241132001-12-07 15:38:26 +00007447# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007448# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007449# The cast to long int works around a bug in the HP C Compiler
7450# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7451# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7452# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7454$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007455if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 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 +00007459
Martin v. Löwis11437992002-04-12 09:54:03 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 if test "$ac_cv_type_int" = yes; then
7462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007464as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007465See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007466 else
7467 ac_cv_sizeof_int=0
7468 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007470
Martin v. Löwis11437992002-04-12 09:54:03 +00007471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7473$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007474
7475
7476
Martin v. Löwis11437992002-04-12 09:54:03 +00007477cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007478#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007479_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007480
7481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007482# The cast to long int works around a bug in the HP C Compiler
7483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7485# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7487$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007488if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007489 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007490else
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 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 +00007492
Martin v. Löwis11437992002-04-12 09:54:03 +00007493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 if test "$ac_cv_type_long" = yes; then
7495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007497as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007498See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007499 else
7500 ac_cv_sizeof_long=0
7501 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007503
Martin v. Löwis11437992002-04-12 09:54:03 +00007504fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7506$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507
7508
7509
Martin v. Löwis11437992002-04-12 09:54:03 +00007510cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007511#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007512_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007513
7514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007515# The cast to long int works around a bug in the HP C Compiler
7516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7518# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7520$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007521if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007523else
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 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 +00007525
Martin v. Löwis11437992002-04-12 09:54:03 +00007526else
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 if test "$ac_cv_type_void_p" = yes; then
7528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007530as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007531See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007532 else
7533 ac_cv_sizeof_void_p=0
7534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007536
Martin v. Löwis11437992002-04-12 09:54:03 +00007537fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7539$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540
7541
7542
Martin v. Löwis11437992002-04-12 09:54:03 +00007543cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007544#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007545_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007546
7547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548# The cast to long int works around a bug in the HP C Compiler
7549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7551# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7553$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007554if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 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 +00007558
Martin v. Löwis11437992002-04-12 09:54:03 +00007559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 if test "$ac_cv_type_short" = yes; then
7561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007563as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007564See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565 else
7566 ac_cv_sizeof_short=0
7567 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007569
Martin v. Löwis11437992002-04-12 09:54:03 +00007570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7572$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573
7574
7575
Martin v. Löwis11437992002-04-12 09:54:03 +00007576cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007577#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007578_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007579
7580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007581# The cast to long int works around a bug in the HP C Compiler
7582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7584# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7586$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007587if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007588 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 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 +00007591
Martin v. Löwis11437992002-04-12 09:54:03 +00007592else
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 if test "$ac_cv_type_float" = yes; then
7594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007596as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007597See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598 else
7599 ac_cv_sizeof_float=0
7600 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007602
Martin v. Löwis11437992002-04-12 09:54:03 +00007603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7605$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606
7607
7608
Martin v. Löwis11437992002-04-12 09:54:03 +00007609cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007610#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007611_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007612
7613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007614# The cast to long int works around a bug in the HP C Compiler
7615# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7616# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7617# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7619$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007620if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 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 +00007624
Martin v. Löwis11437992002-04-12 09:54:03 +00007625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 if test "$ac_cv_type_double" = yes; then
7627 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7628$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007629as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007630See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631 else
7632 ac_cv_sizeof_double=0
7633 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007635
Martin v. Löwis11437992002-04-12 09:54:03 +00007636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7638$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639
7640
7641
Martin v. Löwis11437992002-04-12 09:54:03 +00007642cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007643#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007644_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007645
7646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007647# The cast to long int works around a bug in the HP C Compiler
7648# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7649# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7650# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7652$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007653if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007655else
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 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 +00007657
Martin v. Löwis11437992002-04-12 09:54:03 +00007658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 if test "$ac_cv_type_fpos_t" = yes; then
7660 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007662as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007663See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664 else
7665 ac_cv_sizeof_fpos_t=0
7666 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668
Martin v. Löwis11437992002-04-12 09:54:03 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7671$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672
7673
7674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007676#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007677_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007678
Michael W. Hudson54241132001-12-07 15:38:26 +00007679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680# The cast to long int works around a bug in the HP C Compiler
7681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7683# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7685$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007686if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007688else
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 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 +00007690
Martin v. Löwis18e16552006-02-15 17:27:45 +00007691else
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 if test "$ac_cv_type_size_t" = yes; then
7693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007695as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007696See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697 else
7698 ac_cv_sizeof_size_t=0
7699 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701
Martin v. Löwis18e16552006-02-15 17:27:45 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7704$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705
7706
7707
Martin v. Löwis18e16552006-02-15 17:27:45 +00007708cat >>confdefs.h <<_ACEOF
7709#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7710_ACEOF
7711
7712
Christian Heimes400adb02008-02-01 08:12:03 +00007713# The cast to long int works around a bug in the HP C Compiler
7714# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7715# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7716# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7718$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007719if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007721else
Matthias Kloseb9621712010-04-24 17:59:49 +00007722 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00007723
Christian Heimes400adb02008-02-01 08:12:03 +00007724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 if test "$ac_cv_type_pid_t" = yes; then
7726 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7727$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007728as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007729See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007730 else
7731 ac_cv_sizeof_pid_t=0
7732 fi
7733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734
Christian Heimes400adb02008-02-01 08:12:03 +00007735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7737$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007738
7739
7740
7741cat >>confdefs.h <<_ACEOF
7742#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7743_ACEOF
7744
7745
Michael W. Hudson54241132001-12-07 15:38:26 +00007746
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7748$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007749have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007751/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007752
Martin v. Löwis11437992002-04-12 09:54:03 +00007753int
7754main ()
7755{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007756long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ;
7758 return 0;
7759}
7760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
7763
Matthias Kloseb9621712010-04-24 17:59:49 +00007764$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007765
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007766 have_long_long=yes
7767
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7771$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007772if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007773# The cast to long int works around a bug in the HP C Compiler
7774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7776# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7778$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007779if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007781else
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 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 +00007783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 if test "$ac_cv_type_long_long" = yes; then
7786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007788as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007789See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007790 else
7791 ac_cv_sizeof_long_long=0
7792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007793fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7797$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798
7799
7800
Martin v. Löwis11437992002-04-12 09:54:03 +00007801cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007802#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007803_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007804
Michael W. Hudson54241132001-12-07 15:38:26 +00007805
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007806fi
7807
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7809$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007810have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007812/* end confdefs.h. */
7813
7814int
7815main ()
7816{
7817long double x; x = (long double)0;
7818 ;
7819 return 0;
7820}
7821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007822if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007823
7824
Matthias Kloseb9621712010-04-24 17:59:49 +00007825$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007826
7827 have_long_double=yes
7828
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007829fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7832$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007833if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007834# The cast to long int works around a bug in the HP C Compiler
7835# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7836# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7837# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7839$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007840if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007841 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007842else
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007844
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 if test "$ac_cv_type_long_double" = yes; then
7847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007849as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007850See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007851 else
7852 ac_cv_sizeof_long_double=0
7853 fi
7854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7858$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007859
7860
7861
7862cat >>confdefs.h <<_ACEOF
7863#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7864_ACEOF
7865
7866
7867fi
7868
7869
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7871$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007872have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007874/* end confdefs.h. */
7875
7876int
7877main ()
7878{
7879_Bool x; x = (_Bool)0;
7880 ;
7881 return 0;
7882}
7883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007884if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007885
7886
Matthias Kloseb9621712010-04-24 17:59:49 +00007887$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007888
7889 have_c99_bool=yes
7890
Thomas Woutersb2137042007-02-01 18:02:27 +00007891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7894$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007895if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896# The cast to long int works around a bug in the HP C Compiler
7897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7901$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007902if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007904else
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007906
Thomas Woutersb2137042007-02-01 18:02:27 +00007907else
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 if test "$ac_cv_type__Bool" = yes; then
7909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007911as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007912See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913 else
7914 ac_cv_sizeof__Bool=0
7915 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917
Thomas Woutersb2137042007-02-01 18:02:27 +00007918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7920$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921
7922
7923
Thomas Woutersb2137042007-02-01 18:02:27 +00007924cat >>confdefs.h <<_ACEOF
7925#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7926_ACEOF
7927
7928
7929fi
7930
Matthias Kloseb9621712010-04-24 17:59:49 +00007931ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007932 #include <stdint.h>
7933 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007934 #ifdef HAVE_INTTYPES_H
7935 #include <inttypes.h>
7936 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007937"
Victor Stinnere0be4232011-10-25 13:06:09 +02007938if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007939
7940cat >>confdefs.h <<_ACEOF
7941#define HAVE_UINTPTR_T 1
7942_ACEOF
7943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944# The cast to long int works around a bug in the HP C Compiler
7945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7947# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7949$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007950if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 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 +00007954
Martin v. Löwis11437992002-04-12 09:54:03 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 if test "$ac_cv_type_uintptr_t" = yes; then
7957 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007959as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007960See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961 else
7962 ac_cv_sizeof_uintptr_t=0
7963 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965
Martin v. Löwis11437992002-04-12 09:54:03 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7968$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969
7970
7971
Martin v. Löwis11437992002-04-12 09:54:03 +00007972cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007973#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007974_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007975
Michael W. Hudson54241132001-12-07 15:38:26 +00007976
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007977fi
7978
Thomas Wouters89f507f2006-12-13 04:49:30 +00007979
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007980# The cast to long int works around a bug in the HP C Compiler
7981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7983# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7985$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007987 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007990#ifdef HAVE_SYS_TYPES_H
7991#include <sys/types.h>
7992#endif
7993
Matthias Kloseb9621712010-04-24 17:59:49 +00007994"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007996else
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 if test "$ac_cv_type_off_t" = yes; then
7998 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008000as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008001See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008002 else
8003 ac_cv_sizeof_off_t=0
8004 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8009$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008011
8012
Martin v. Löwis11437992002-04-12 09:54:03 +00008013cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008014#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008015_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008016
Michael W. Hudson54241132001-12-07 15:38:26 +00008017
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008018
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8020$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008021if test "$have_long_long" = yes
8022then
8023if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008024 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008027
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8029$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008033fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008037fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008038
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008039# The cast to long int works around a bug in the HP C Compiler
8040# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8041# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8042# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8044$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008045if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008046 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008047else
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008049#ifdef HAVE_SYS_TYPES_H
8050#include <sys/types.h>
8051#endif
8052#ifdef HAVE_TIME_H
8053#include <time.h>
8054#endif
8055
Matthias Kloseb9621712010-04-24 17:59:49 +00008056"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008057
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008058else
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 if test "$ac_cv_type_time_t" = yes; then
8060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008062as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008063See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008064 else
8065 ac_cv_sizeof_time_t=0
8066 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008068
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8071$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008072
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008073
8074
Martin v. Löwis11437992002-04-12 09:54:03 +00008075cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008076#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008077_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008078
Michael W. Hudson54241132001-12-07 15:38:26 +00008079
8080
Trent Mick635f6fb2000-08-23 21:33:05 +00008081# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008082ac_save_cc="$CC"
8083if test "$ac_cv_kpthread" = "yes"
8084then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008085elif test "$ac_cv_kthread" = "yes"
8086then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008087elif test "$ac_cv_pthread" = "yes"
8088then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008089fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8092$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008093have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008095/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008096
8097 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008098int
8099main ()
8100{
Guido van Rossum12580492000-09-24 16:47:19 +00008101pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008102 ;
8103 return 0;
8104}
Matthias Kloseb159a552010-04-25 21:00:44 +00008105
Martin v. Löwis11437992002-04-12 09:54:03 +00008106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008107if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008108 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8112$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008113if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008115# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8116# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8117# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8119$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008120if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008122else
Matthias Kloseb9621712010-04-24 17:59:49 +00008123 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008124#ifdef HAVE_PTHREAD_H
8125#include <pthread.h>
8126#endif
8127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 if test "$ac_cv_type_pthread_t" = yes; then
8132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008134as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008135See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008136 else
8137 ac_cv_sizeof_pthread_t=0
8138 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008140
Trent Mick635f6fb2000-08-23 21:33:05 +00008141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8143$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008145
8146
Martin v. Löwis11437992002-04-12 09:54:03 +00008147cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008148#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008149_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008151
Trent Mick635f6fb2000-08-23 21:33:05 +00008152fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008153CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008154
Michael W. Hudson54241132001-12-07 15:38:26 +00008155
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008156case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008157 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008158 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8159 ;;
8160 Darwin/*)
8161 OTHER_LIBTOOL_OPT=""
8162 ;;
8163esac
8164
8165
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008166ARCH_RUN_32BIT=""
8167
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008168case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008169 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008170 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8171 if test "${enable_universalsdk}"; then
8172 :
8173 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008174 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008175 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008176 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008177 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008178 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008179 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008180 if test ${gcc_version} '<' 4.0
8181 then
8182 LIBTOOL_CRUFT="-lcc_dynamic"
8183 else
8184 LIBTOOL_CRUFT=""
8185 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008187 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008188else
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008190/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008191
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008192 #include <unistd.h>
8193 int main(int argc, char*argv[])
8194 {
8195 if (sizeof(long) == 4) {
8196 return 0;
8197 } else {
8198 return 1;
8199 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008200 }
8201
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008203if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008204 ac_osx_32bit=yes
8205else
Matthias Kloseb9621712010-04-24 17:59:49 +00008206 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8209 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008210fi
8211
8212
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008213 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008214 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008215 i386)
8216 MACOSX_DEFAULT_ARCH="i386"
8217 ;;
8218 ppc)
8219 MACOSX_DEFAULT_ARCH="ppc"
8220 ;;
8221 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008222 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008223 ;;
8224 esac
8225 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008226 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008227 i386)
8228 MACOSX_DEFAULT_ARCH="x86_64"
8229 ;;
8230 ppc)
8231 MACOSX_DEFAULT_ARCH="ppc64"
8232 ;;
8233 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008234 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008235 ;;
8236 esac
8237
8238 #ARCH_RUN_32BIT="true"
8239 fi
8240
8241 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008242 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008243 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008244esac
8245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8247$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008248if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008249then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008250 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008252 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8257$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008258 if test $enable_shared = "yes"
8259 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008260 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00008261 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8264$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008265fi
8266
Matthias Kloseb9621712010-04-24 17:59:49 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8268$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008269case $ac_sys_system/$ac_sys_release in
8270 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8275$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008276 ;;
8277 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8279$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008280 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008281esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008282
Guido van Rossum0a516c91994-09-12 10:58:40 +00008283# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008284
Michael W. Hudson54241132001-12-07 15:38:26 +00008285
8286
8287
8288
Benjamin Peterson99f03762010-04-11 22:15:28 +00008289
Thomas Wouters477c8d52006-05-27 19:21:47 +00008290
Georg Brandlb1441c72009-01-03 22:33:39 +00008291
Thomas Wouters477c8d52006-05-27 19:21:47 +00008292cat >>confdefs.h <<_ACEOF
8293#define SHLIB_EXT "$SO"
8294_ACEOF
8295
Guido van Rossum0a516c91994-09-12 10:58:40 +00008296# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008297# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008298# (Shared libraries in this instance are shared modules to be loaded into
8299# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8301$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008302if test -z "$LDSHARED"
8303then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008304 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008305 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008306 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008307 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008308 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008309 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008310 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008312 if test "$GCC" = "yes" ; then
8313 LDSHARED='$(CC) -shared'
8314 LDCXXSHARED='$(CXX) -shared'
8315 else
8316 LDSHARED='$(CC) -G'
8317 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008318 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008319 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008320 if test "$GCC" = "yes" ; then
8321 LDSHARED='$(CC) -shared'
8322 LDCXXSHARED='$(CXX) -shared'
8323 else
8324 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008325 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008326 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008327 LDSHARED='$(CC) -bundle'
8328 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008329 if test "$enable_framework" ; then
8330 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008331 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8332 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008333 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008334 else
8335 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008336 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008337 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008338 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008339 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008340 LDSHARED='$(CC) -bundle'
8341 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008342 if test "$enable_framework" ; then
8343 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008344 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8345 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008346 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008347 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008348 # No framework, use the Python app as bundle-loader
8349 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008350 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008351 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008352 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008353 Darwin/*)
8354 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8355 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008356
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008357 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008358 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008359 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008360 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008361 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008362 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8363 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008364 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008365 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008366 LDSHARED='$(CC) -bundle'
8367 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008368 if test "$enable_framework" ; then
8369 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008370 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8371 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008372 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008373 else
8374 # No framework, use the Python app as bundle-loader
8375 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8376 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008377 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008378 fi
8379 fi
8380 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008381 Linux*|GNU*|QNX*)
8382 LDSHARED='$(CC) -shared'
8383 LDCXXSHARED='$(CXX) -shared';;
8384 BSD/OS*/4*)
8385 LDSHARED="gcc -shared"
8386 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008387 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008388 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008389 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008390 LDSHARED='$(CC) -shared'
8391 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008392 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008393 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008394 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008395 OpenBSD*)
8396 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8397 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008398 LDSHARED='$(CC) -shared $(CCSHARED)'
8399 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008400 else
8401 case `uname -r` in
8402 [01].* | 2.[0-7] | 2.[0-7].*)
8403 LDSHARED="ld -Bshareable ${LDFLAGS}"
8404 ;;
8405 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008406 LDSHARED='$(CC) -shared $(CCSHARED)'
8407 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008408 ;;
8409 esac
8410 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008411 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008412 LDSHARED='$(CC) -shared'
8413 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008414 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008415 if test "$GCC" = "yes" ; then
8416 LDSHARED='$(CC) -shared'
8417 LDCXXSHARED='$(CXX) -shared'
8418 else
8419 LDSHARED='$(CC) -G'
8420 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008421 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008422 SCO_SV*)
8423 LDSHARED='$(CC) -Wl,-G,-Bexport'
8424 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8425 CYGWIN*)
8426 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8427 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008428 *) LDSHARED="ld";;
8429 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8432$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008433LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008434BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008435# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008436# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8438$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008439if test -z "$CCSHARED"
8440then
Guido van Rossum07397971997-04-29 21:49:50 +00008441 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008442 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008443 then CCSHARED="-fPIC";
8444 elif test `uname -p` = sparc;
8445 then CCSHARED="-xcode=pic32";
8446 else CCSHARED="-Kpic";
8447 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008448 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008449 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008450 else CCSHARED="+z";
8451 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008452 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008453 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008454 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008455 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008456 if test "$GCC" = "yes"
8457 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008458 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008459 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008460 SCO_SV*)
8461 if test "$GCC" = "yes"
8462 then CCSHARED="-fPIC"
8463 else CCSHARED="-Kpic -belf"
8464 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008465 IRIX*/6*) case $CC in
8466 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008467 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008468 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008469 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8472$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008473# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008474# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8476$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008477if test -z "$LINKFORSHARED"
8478then
Guido van Rossum07397971997-04-29 21:49:50 +00008479 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008480 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008481 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008482 LINKFORSHARED="-Wl,-E -Wl,+s";;
8483# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008484 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008485 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008486 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008488 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008489 if test "$enable_framework"
8490 then
Jack Jansenda49e192005-01-07 13:08:22 +00008491 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008492 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008493 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008494 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008495 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008496 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008497 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008498 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8499 then
8500 LINKFORSHARED="-Wl,--export-dynamic"
8501 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008502 SunOS/5*) case $CC in
8503 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008504 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008505 then
8506 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008507 fi;;
8508 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008509 CYGWIN*)
8510 if test $enable_shared = "no"
8511 then
8512 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8513 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008514 QNX*)
8515 # -Wl,-E causes the symbols to be added to the dynamic
8516 # symbol table so that they can be found when a module
8517 # is loaded. -N 2048K causes the stack size to be set
8518 # to 2048 kilobytes so that the stack doesn't overflow
8519 # when running test_compile.py.
8520 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008521 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8524$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525
Michael W. Hudson54241132001-12-07 15:38:26 +00008526
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8529$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008530if test ! "$LIBRARY" = "$LDLIBRARY"
8531then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008532 case $ac_sys_system in
8533 CYGWIN*)
8534 # Cygwin needs CCSHARED when building extension DLLs
8535 # but not when building the interpreter DLL.
8536 CFLAGSFORSHARED='';;
8537 *)
8538 CFLAGSFORSHARED='$(CCSHARED)'
8539 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8542$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008543
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008544# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8545# library (with --enable-shared).
8546# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008547# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8548# if it is not required, since it creates a dependency of the shared library
8549# to LIBS. This, in turn, means that applications linking the shared libpython
8550# don't need to link LIBS explicitly. The default should be only changed
8551# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8554$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008555case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008556 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008557 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008558esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8560$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008561
8562
Guido van Rossum627b2d71993-12-24 10:39:16 +00008563# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8565$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008566if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008567 $as_echo_n "(cached) " >&6
8568else
8569 ac_check_lib_save_LIBS=$LIBS
8570LIBS="-lsendfile $LIBS"
8571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8572/* end confdefs.h. */
8573
8574/* Override any GCC internal prototype to avoid an error.
8575 Use char because int might match the return type of a GCC
8576 builtin and then its argument prototype would still apply. */
8577#ifdef __cplusplus
8578extern "C"
8579#endif
8580char sendfile ();
8581int
8582main ()
8583{
8584return sendfile ();
8585 ;
8586 return 0;
8587}
8588_ACEOF
8589if ac_fn_c_try_link "$LINENO"; then :
8590 ac_cv_lib_sendfile_sendfile=yes
8591else
8592 ac_cv_lib_sendfile_sendfile=no
8593fi
8594rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
8596LIBS=$ac_check_lib_save_LIBS
8597fi
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8599$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008600if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008601 cat >>confdefs.h <<_ACEOF
8602#define HAVE_LIBSENDFILE 1
8603_ACEOF
8604
8605 LIBS="-lsendfile $LIBS"
8606
8607fi
8608
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8610$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008611if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008613else
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008615LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619/* Override any GCC internal prototype to avoid an error.
8620 Use char because int might match the return type of a GCC
8621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008622#ifdef __cplusplus
8623extern "C"
8624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008625char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008626int
8627main ()
8628{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008629return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ;
8631 return 0;
8632}
8633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008636else
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008639rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008641LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8644$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008645if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 cat >>confdefs.h <<_ACEOF
8647#define HAVE_LIBDL 1
8648_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008649
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008650 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008652fi
8653 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8655$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008656if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008657 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008658else
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008660LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664/* Override any GCC internal prototype to avoid an error.
8665 Use char because int might match the return type of a GCC
8666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667#ifdef __cplusplus
8668extern "C"
8669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008670char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008671int
8672main ()
8673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 ;
8676 return 0;
8677}
8678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8689$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 cat >>confdefs.h <<_ACEOF
8692#define HAVE_LIBDLD 1
8693_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008694
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008695 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008696
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008697fi
8698 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008699
Georg Brandlb1441c72009-01-03 22:33:39 +00008700# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008701if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8703$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008704if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008706else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008707 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008709/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008710
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711/* Override any GCC internal prototype to avoid an error.
8712 Use char because int might match the return type of a GCC
8713 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008714#ifdef __cplusplus
8715extern "C"
8716#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008717char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008718int
8719main ()
8720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 ;
8723 return 0;
8724}
8725_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726for ac_lib in '' pthread rt posix4; do
8727 if test -z "$ac_lib"; then
8728 ac_res="none required"
8729 else
8730 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008731 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736rm -f core conftest.err conftest.$ac_objext \
8737 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008738 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008739 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741done
Victor Stinnere0be4232011-10-25 13:06:09 +02008742if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744else
8745 ac_cv_search_sem_init=no
8746fi
8747rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008748LIBS=$ac_func_search_save_LIBS
8749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8751$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008753if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008755
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008756fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008757 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008758 # posix4 on Solaris 2.6
8759 # pthread (first!) on Linux
8760fi
8761
Martin v. Löwis19d17342003-06-14 21:03:05 +00008762# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8764$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008765if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008767else
8768 ac_check_lib_save_LIBS=$LIBS
8769LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008771/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773/* Override any GCC internal prototype to avoid an error.
8774 Use char because int might match the return type of a GCC
8775 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008776#ifdef __cplusplus
8777extern "C"
8778#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008779char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008780int
8781main ()
8782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008784 ;
8785 return 0;
8786}
8787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008789 ac_cv_lib_intl_textdomain=yes
8790else
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793rm -f core conftest.err conftest.$ac_objext \
8794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008795LIBS=$ac_check_lib_save_LIBS
8796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8798$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008799if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008802
Brett Cannonc6d936e2009-06-07 20:09:53 +00008803 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008804fi
8805
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008806
8807# checks for system dependent C++ extensions support
8808case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8810$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008813
Georg Brandl59e87bd2011-02-15 19:48:59 +00008814 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008818loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ;
8820 return 0;
8821}
Matthias Kloseb159a552010-04-25 21:00:44 +00008822
Martin v. Löwis11437992002-04-12 09:54:03 +00008823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008824if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008825
Matthias Kloseb159a552010-04-25 21:00:44 +00008826
Matthias Kloseb9621712010-04-24 17:59:49 +00008827$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008828
Matthias Kloseb159a552010-04-25 21:00:44 +00008829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008830$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008831
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008832else
Matthias Kloseb159a552010-04-25 21:00:44 +00008833
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008835$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008836
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008838rm -f core conftest.err conftest.$ac_objext \
8839 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008840 *) ;;
8841esac
8842
Guido van Rossum70c7f481998-03-26 18:44:10 +00008843# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8845$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008848else
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008850LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854/* Override any GCC internal prototype to avoid an error.
8855 Use char because int might match the return type of a GCC
8856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008857#ifdef __cplusplus
8858extern "C"
8859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008860char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008861int
8862main ()
8863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008864return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ;
8866 return 0;
8867}
8868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008869if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008870 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008871else
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008874rm -f core conftest.err conftest.$ac_objext \
8875 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008876LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8879$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008880if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008881 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008882fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008883 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8885$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008886if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008888else
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008890LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008892/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894/* Override any GCC internal prototype to avoid an error.
8895 Use char because int might match the return type of a GCC
8896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008897#ifdef __cplusplus
8898extern "C"
8899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008900char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008901int
8902main ()
8903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ;
8906 return 0;
8907}
8908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008909if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008911else
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008914rm -f core conftest.err conftest.$ac_objext \
8915 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008916LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8919$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008920if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008921 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008922fi
8923 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008924
Matthias Kloseb9621712010-04-24 17:59:49 +00008925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8926$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008929if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8932$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008933LIBS="$withval $LIBS"
8934
8935else
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8937$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938fi
8939
Guido van Rossum7f43da71994-08-01 12:15:30 +00008940
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008941if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008942 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8943set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008946if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008947 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008948else
8949 case $PKG_CONFIG in
8950 [\\/]* | ?:[\\/]*)
8951 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8952 ;;
8953 *)
8954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8955for as_dir in $PATH
8956do
8957 IFS=$as_save_IFS
8958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008960 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008961 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008963 break 2
8964 fi
8965done
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008967IFS=$as_save_IFS
8968
8969 ;;
8970esac
8971fi
8972PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8973if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8975$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008976else
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8978$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008979fi
8980
8981
8982fi
8983if test -z "$ac_cv_path_PKG_CONFIG"; then
8984 ac_pt_PKG_CONFIG=$PKG_CONFIG
8985 # Extract the first word of "pkg-config", so it can be a program name with args.
8986set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8988$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008989if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008991else
8992 case $ac_pt_PKG_CONFIG in
8993 [\\/]* | ?:[\\/]*)
8994 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8995 ;;
8996 *)
8997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8998for as_dir in $PATH
8999do
9000 IFS=$as_save_IFS
9001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02009003 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009004 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009006 break 2
9007 fi
9008done
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009010IFS=$as_save_IFS
9011
9012 ;;
9013esac
9014fi
9015ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9016if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9018$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009019else
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009022fi
9023
9024 if test "x$ac_pt_PKG_CONFIG" = x; then
9025 PKG_CONFIG=""
9026 else
9027 case $cross_compiling:$ac_tool_warned in
9028yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009031ac_tool_warned=yes ;;
9032esac
9033 PKG_CONFIG=$ac_pt_PKG_CONFIG
9034 fi
9035else
9036 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9037fi
9038
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009039
9040# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9042$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009043
9044# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009045if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009046 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009047else
9048 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009049fi
9050
9051
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9053$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009054
9055# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9057$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009058
9059# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009060if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009061 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009062else
9063 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009064fi
9065
9066
9067if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009068 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9069else
9070 LIBFFI_INCLUDEDIR=""
9071fi
9072
9073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9075$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009076
Stefan Krah60187b52012-03-23 19:06:27 +01009077# Check for use of the system libmpdec library
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9079$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9080
9081# Check whether --with-system_libmpdec was given.
9082if test "${with_system_libmpdec+set}" = set; then :
9083 withval=$with_system_libmpdec;
9084else
9085 with_system_libmpdec="no"
9086fi
9087
9088
9089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9090$as_echo "$with_system_libmpdec" >&6; }
9091
Benjamin Peterson076ed002010-10-31 17:11:02 +00009092# Check for support for loadable sqlite extensions
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9094$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9095# Check whether --enable-loadable-sqlite-extensions was given.
9096if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9097 enableval=$enable_loadable_sqlite_extensions;
9098else
9099 enable_loadable_sqlite_extensions="no"
9100fi
9101
9102
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9104$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9105
Matthias Klose55708cc2009-04-30 08:06:49 +00009106# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9108$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009109
9110# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009111if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009112 withval=$with_dbmliborder;
9113if test x$with_dbmliborder = xyes
9114then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009115as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009116else
9117 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9118 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9119 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009120 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009121 fi
9122 done
9123fi
9124fi
9125
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9127$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009128
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009129# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009130
9131
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9133$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009135# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137 withval=$with_signal_module;
9138fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009139
9140
9141if test -z "$with_signal_module"
9142then with_signal_module="yes"
9143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9145$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009146
9147if test "${with_signal_module}" = "yes"; then
9148 USE_SIGNAL_MODULE=""
9149 SIGNAL_OBJS=""
9150else
9151 USE_SIGNAL_MODULE="#"
9152 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9153fi
9154
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009155# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009156
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009157USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009158
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159
Martin v. Löwis11437992002-04-12 09:54:03 +00009160
9161# Templates for things AC_DEFINEd more than once.
9162# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009163
9164
Martin v. Löwis11437992002-04-12 09:54:03 +00009165
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9167$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009170if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171 withval=$with_threads;
9172fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009173
9174
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009175# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009177# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009178if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179 withval=$with_thread; with_threads=$with_thread
9180fi
9181
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009182
9183if test -z "$with_threads"
9184then with_threads="yes"
9185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9187$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009188
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009189
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009190if test "$with_threads" = "no"
9191then
9192 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009193elif test "$ac_cv_pthread_is_default" = yes
9194then
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009196
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009197 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009199
9200 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009202elif test "$ac_cv_kpthread" = "yes"
9203then
9204 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009205 if test "$ac_cv_cxx_thread" = "yes"; then
9206 CXX="$CXX -Kpthread"
9207 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009208 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009209
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009210 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009211 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009212elif test "$ac_cv_kthread" = "yes"
9213then
9214 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009215 if test "$ac_cv_cxx_thread" = "yes"; then
9216 CXX="$CXX -Kthread"
9217 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009219
9220 posix_threads=yes
9221 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009222elif test "$ac_cv_pthread" = "yes"
9223then
9224 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009225 if test "$ac_cv_cxx_thread" = "yes"; then
9226 CXX="$CXX -pthread"
9227 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009228 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009229
9230 posix_threads=yes
9231 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009232else
9233 if test ! -z "$with_threads" -a -d "$with_threads"
9234 then LDFLAGS="$LDFLAGS -L$with_threads"
9235 fi
9236 if test ! -z "$withval" -a -d "$withval"
9237 then LDFLAGS="$LDFLAGS -L$withval"
9238 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009239
9240 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009241 # define _POSIX_THREADS in unistd.h. Some apparently don't
9242 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9244$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009246/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009247
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009248#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009249#ifdef _POSIX_THREADS
9250yes
9251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009252
9253_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009255 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009256 unistd_defines_pthreads=yes
9257else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009258 unistd_defines_pthreads=no
9259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009260rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9263$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009266
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009267 # Just looking for pthread_create in libpthread is not enough:
9268 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9269 # So we really have to include pthread.h, and then link.
9270 _libs=$LIBS
9271 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9273$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009275/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009276#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009277
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009278void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009279int
9280main ()
9281{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009282
9283pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ;
9285 return 0;
9286}
9287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009288if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009289
Matthias Kloseb9621712010-04-24 17:59:49 +00009290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9291$as_echo "yes" >&6; }
9292 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009293
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009294 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009295 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009296else
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009298 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009300if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009301 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009302
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009303 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009304 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009305else
Guido van Rossumad678af1998-10-02 14:42:15 +00009306
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9308$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009309if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009311else
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009313LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317/* Override any GCC internal prototype to avoid an error.
9318 Use char because int might match the return type of a GCC
9319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009320#ifdef __cplusplus
9321extern "C"
9322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009323char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009324int
9325main ()
9326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 ;
9329 return 0;
9330}
9331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009332if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009333 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009334else
Matthias Kloseb9621712010-04-24 17:59:49 +00009335 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009337rm -f core conftest.err conftest.$ac_objext \
9338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009339LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9342$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009343if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009346 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009347 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009348 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009349else
Greg Steinadf63d62000-07-05 10:38:09 +00009350
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9352$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009353if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009355else
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009357LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361/* Override any GCC internal prototype to avoid an error.
9362 Use char because int might match the return type of a GCC
9363 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364#ifdef __cplusplus
9365extern "C"
9366#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009367char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009368int
9369main ()
9370{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009371return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ;
9373 return 0;
9374}
9375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009376if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009378else
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009381rm -f core conftest.err conftest.$ac_objext \
9382 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009383LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9386$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009387if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009389
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009390 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009391 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009392 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009393else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009394
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9396$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009397if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009398 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009399else
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009401LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405/* Override any GCC internal prototype to avoid an error.
9406 Use char because int might match the return type of a GCC
9407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009408#ifdef __cplusplus
9409extern "C"
9410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009411char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009412int
9413main ()
9414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 ;
9417 return 0;
9418}
9419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009422else
Matthias Kloseb9621712010-04-24 17:59:49 +00009423 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009425rm -f core conftest.err conftest.$ac_objext \
9426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009427LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9430$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009431if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009434 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009435 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009436 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009437else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009438
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9440$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009441if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009443else
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009445LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449/* Override any GCC internal prototype to avoid an error.
9450 Use char because int might match the return type of a GCC
9451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009452#ifdef __cplusplus
9453extern "C"
9454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009455char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009456int
9457main ()
9458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ;
9461 return 0;
9462}
9463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009466else
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009469rm -f core conftest.err conftest.$ac_objext \
9470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009471LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9474$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009475if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009477
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009478 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009479 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009480 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009481else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009482
Martin v. Löwis130fb172001-07-19 11:00:41 +00009483 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009484fi
9485
Guido van Rossum627b2d71993-12-24 10:39:16 +00009486
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009487fi
9488
Guido van Rossum0be3e491997-05-22 20:33:33 +00009489fi
9490
Guido van Rossum49545951997-12-02 19:28:29 +00009491fi
9492
Guido van Rossumb93a8621998-05-07 13:27:32 +00009493fi
9494
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496rm -f core conftest.err conftest.$ac_objext \
9497 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009498
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9500$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009501if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009503else
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009505LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509/* Override any GCC internal prototype to avoid an error.
9510 Use char because int might match the return type of a GCC
9511 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009512#ifdef __cplusplus
9513extern "C"
9514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009515char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ;
9521 return 0;
9522}
9523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526else
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529rm -f core conftest.err conftest.$ac_objext \
9530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009531LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9534$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009535if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009536 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009537
Martin v. Löwis130fb172001-07-19 11:00:41 +00009538 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009539 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009540 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009541fi
9542
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009543
Neal Norwitza978ab02002-11-02 16:58:05 +00009544 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9546$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009547if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009549else
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009551LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555/* Override any GCC internal prototype to avoid an error.
9556 Use char because int might match the return type of a GCC
9557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558#ifdef __cplusplus
9559extern "C"
9560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009561char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009562int
9563main ()
9564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ;
9567 return 0;
9568}
9569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009572else
Matthias Kloseb9621712010-04-24 17:59:49 +00009573 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009575rm -f core conftest.err conftest.$ac_objext \
9576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009577LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9580$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009581if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009583
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009584 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009585 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009586 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009587fi
9588
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009589 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009590fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009591
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009592if test "$posix_threads" = "yes"; then
9593 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009594
Matthias Kloseb9621712010-04-24 17:59:49 +00009595$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009596
9597 fi
9598
9599 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9600 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009601 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009602$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009603
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009604 ;;
9605 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009607
9608 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009609 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009610$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009611
9612 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009613 esac
9614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9616$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009617 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009619else
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009621 ac_cv_pthread_system_supported=no
9622else
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009624/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009625#include <pthread.h>
9626 void *foo(void *parm) {
9627 return NULL;
9628 }
9629 main() {
9630 pthread_attr_t attr;
9631 pthread_t id;
9632 if (pthread_attr_init(&attr)) exit(-1);
9633 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9634 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9635 exit(0);
9636 }
9637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009638if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009639 ac_cv_pthread_system_supported=yes
9640else
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9644 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009645fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647
Guido van Rossum627b2d71993-12-24 10:39:16 +00009648fi
9649
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9651$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652 if test "$ac_cv_pthread_system_supported" = "yes"; then
9653
Matthias Kloseb9621712010-04-24 17:59:49 +00009654$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009655
9656 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 for ac_func in pthread_sigmask
9658do :
9659 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009660if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009661 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009662#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009663_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009664 case $ac_sys_system in
9665 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009668
9669 ;;
9670 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009671fi
9672done
9673
9674fi
9675
9676
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009677# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009678
Matthias Kloseb9621712010-04-24 17:59:49 +00009679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9680$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009682if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009684 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009687 ipv6=no
9688 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009689 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9690$as_echo "yes" >&6; }
9691 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009692
9693 ipv6=yes
9694 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009696else
Martin v. Löwis11437992002-04-12 09:54:03 +00009697
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009702 ipv6=no
9703
9704else
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009706/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009707 /* AF_INET6 available check */
9708#include <sys/types.h>
9709#include <sys/socket.h>
9710main()
9711{
9712 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9713 exit(1);
9714 else
9715 exit(0);
9716}
9717
Martin v. Löwis11437992002-04-12 09:54:03 +00009718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009719if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009720
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9722$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009723 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009724
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009725else
Matthias Kloseb159a552010-04-25 21:00:44 +00009726
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9728$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009729 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009730
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009734fi
9735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009737if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9739$as_echo_n "checking if RFC2553 API is available... " >&6; }
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009741/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009742
9743 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009744#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009748struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009749 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ;
9751 return 0;
9752}
Matthias Kloseb159a552010-04-25 21:00:44 +00009753
Martin v. Löwis11437992002-04-12 09:54:03 +00009754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009755if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009756
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009758$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009759 ipv6=yes
9760
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009761else
Matthias Kloseb159a552010-04-25 21:00:44 +00009762
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009764$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009765 ipv6=no
9766
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009769fi
9770
9771if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009773
9774fi
9775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776fi
9777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009778
9779ipv6type=unknown
9780ipv6lib=none
9781ipv6trylibc=no
9782
9783if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9785$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009786 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9787 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009788 case $i in
9789 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009792
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009793#include <netinet/in.h>
9794#ifdef IPV6_INRIA_VERSION
9795yes
9796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009797_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009800 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009801fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009802rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009803
9804 ;;
9805 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009809#include <netinet/in.h>
9810#ifdef __KAME__
9811yes
9812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816 ipv6type=$i;
9817 ipv6lib=inet6
9818 ipv6libdir=/usr/local/v6/lib
9819 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009820fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009821rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009822
9823 ;;
9824 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009828#include <features.h>
9829#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9830yes
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009835 ipv6type=$i;
9836 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009837fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009838rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009839
9840 ;;
9841 linux-inet6)
9842 if test -d /usr/inet6; then
9843 ipv6type=$i
9844 ipv6lib=inet6
9845 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009846 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009847 fi
9848 ;;
9849 solaris)
9850 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009851 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009852 ipv6type=$i
9853 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009854 fi
9855 fi
9856 ;;
9857 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009859/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009860
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861#include <sys/param.h>
9862#ifdef _TOSHIBA_INET6
9863yes
9864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009865_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009868 ipv6type=$i;
9869 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009870 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009871fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009872rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009873
9874 ;;
9875 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009879#include </usr/local/v6/include/sys/v6config.h>
9880#ifdef __V6D__
9881yes
9882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009883_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886 ipv6type=$i;
9887 ipv6lib=v6;
9888 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009889 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009892
9893 ;;
9894 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898#include <sys/param.h>
9899#ifdef _ZETA_MINAMI_INET6
9900yes
9901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905 ipv6type=$i;
9906 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009907 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009908fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009909rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910
9911 ;;
9912 esac
9913 if test "$ipv6type" != "unknown"; then
9914 break
9915 fi
9916 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9918$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919fi
9920
9921if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9922 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9923 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9924 echo "using lib$ipv6lib"
9925 else
9926 if test $ipv6trylibc = "yes"; then
9927 echo "using libc"
9928 else
9929 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9930 echo "You need to fetch lib$ipv6lib.a from appropriate"
9931 echo 'ipv6 kit and compile beforehand.'
9932 exit 1
9933 fi
9934 fi
9935fi
9936
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9938$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009940/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009941
9942 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009943int
9944main ()
9945{
9946FSIORefNum fRef = 0
9947 ;
9948 return 0;
9949}
Matthias Kloseb159a552010-04-25 21:00:44 +00009950
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009952if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009953
Matthias Kloseb159a552010-04-25 21:00:44 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009956
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9958$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009959
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009960else
Matthias Kloseb159a552010-04-25 21:00:44 +00009961
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009964
9965fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9967
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009968# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9970$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009973if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974 withval=$with_doc_strings;
9975fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009976
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009977
9978if test -z "$with_doc_strings"
9979then with_doc_strings="yes"
9980fi
9981if test "$with_doc_strings" != "no"
9982then
9983
Matthias Kloseb9621712010-04-24 17:59:49 +00009984$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009985
9986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9988$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009989
Antoine Pitrou042b1282010-08-13 21:15:58 +00009990# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9992$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009995if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009997if test "$withval" != no
9998then
9999
Matthias Kloseb9621712010-04-24 17:59:49 +000010000$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10003$as_echo "yes" >&6; }
10004else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010006fi
10007else
Matthias Kloseb9621712010-04-24 17:59:49 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010fi
10011
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010012
10013# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10015$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019 withval=$with_pymalloc;
10020fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010021
Neil Schemenauera35c6882001-02-27 04:45:05 +000010022
Neil Schemenauer16c22972002-03-22 15:34:49 +000010023if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010024then
10025 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010026fi
10027if test "$with_pymalloc" != "no"
10028then
Martin v. Löwis11437992002-04-12 09:54:03 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010031
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010032 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10035$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010036
Benjamin Peterson05159c42009-12-03 03:01:27 +000010037# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10039$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010040
10041# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010043 withval=$with_valgrind;
10044else
10045 with_valgrind=no
10046fi
10047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10049$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010050if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020010052if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010055
10056else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010057 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010058
10059fi
10060
10061
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010062 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010063fi
10064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010065# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010066
Guido van Rossum98935bf2001-09-05 19:13:16 +000010067DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010068
Guido van Rossume97ee181999-12-20 21:27:22 +000010069# the dlopen() function means we might want to use dynload_shlib.o. some
10070# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010071for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010072do :
10073 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010074if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010076#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010077_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010078
Guido van Rossume97ee181999-12-20 21:27:22 +000010079fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010080done
Guido van Rossume97ee181999-12-20 21:27:22 +000010081
Michael W. Hudson54241132001-12-07 15:38:26 +000010082
Guido van Rossume97ee181999-12-20 21:27:22 +000010083# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10084# loading of modules.
10085
Matthias Kloseb9621712010-04-24 17:59:49 +000010086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10087$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010088if test -z "$DYNLOADFILE"
10089then
10090 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010091 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10092 if test "$ac_cv_func_dlopen" = yes
10093 then DYNLOADFILE="dynload_shlib.o"
10094 else DYNLOADFILE="dynload_aix.o"
10095 fi
10096 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010097 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010098 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10099 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010100 *)
10101 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10102 # out any dynamic loading
10103 if test "$ac_cv_func_dlopen" = yes
10104 then DYNLOADFILE="dynload_shlib.o"
10105 else DYNLOADFILE="dynload_stub.o"
10106 fi
10107 ;;
10108 esac
10109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10111$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010112if test "$DYNLOADFILE" != "dynload_stub.o"
10113then
Martin v. Löwis11437992002-04-12 09:54:03 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010116
10117fi
10118
Neil Schemenauer4e425612001-06-19 15:44:15 +000010119# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10120
Michael W. Hudson54241132001-12-07 15:38:26 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10123$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010124if test -z "$MACHDEP_OBJS"
10125then
Jack Jansene578a632001-08-15 01:27:14 +000010126 MACHDEP_OBJS=$extra_machdep_objs
10127else
10128 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010129fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010130if test -z "$MACHDEP_OBJS"; then
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10132$as_echo "none" >&6; }
10133else
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10135$as_echo "$MACHDEP_OBJS" >&6; }
10136fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010137
Guido van Rossum627b2d71993-12-24 10:39:16 +000010138# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010139for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010140 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010141 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010142 futimens futimes gai_strerror \
10143 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010144 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010145 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010146 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10147 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010148 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010149 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010150 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010151 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010152 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010153 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010154 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10155 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010156 sigaction sigaltstack siginterrupt sigpending sigrelse \
10157 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010158 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010159 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10160 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010161do :
10162 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10163ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010164if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010166#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010168
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010169fi
10170done
10171
Michael W. Hudson54241132001-12-07 15:38:26 +000010172
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010173ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10174 #include <dirent.h>
10175"
10176if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10177
10178$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10179
10180fi
10181
10182
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010183# For some functions, having a definition is not sufficient, since
10184# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10186$as_echo_n "checking for chroot... " >&6; }
10187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010188/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010189#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010190int
10191main ()
10192{
10193void *x=chroot
10194 ;
10195 return 0;
10196}
10197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010198if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010199
Matthias Kloseb9621712010-04-24 17:59:49 +000010200$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010201
Matthias Kloseb159a552010-04-25 21:00:44 +000010202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010203$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010204else
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010207
10208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10211$as_echo_n "checking for link... " >&6; }
10212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010213/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010214#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010215int
10216main ()
10217{
10218void *x=link
10219 ;
10220 return 0;
10221}
10222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010226
Matthias Kloseb159a552010-04-25 21:00:44 +000010227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010228$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010229else
Matthias Kloseb9621712010-04-24 17:59:49 +000010230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010232
10233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10236$as_echo_n "checking for symlink... " >&6; }
10237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010239#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010240int
10241main ()
10242{
10243void *x=symlink
10244 ;
10245 return 0;
10246}
10247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010251
Matthias Kloseb159a552010-04-25 21:00:44 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010253$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010254else
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010257
10258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10261$as_echo_n "checking for fchdir... " >&6; }
10262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010263/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010264#include <unistd.h>
10265int
10266main ()
10267{
10268void *x=fchdir
10269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010274
Matthias Kloseb9621712010-04-24 17:59:49 +000010275$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010276
Matthias Kloseb159a552010-04-25 21:00:44 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010279else
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10281$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010282
10283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10286$as_echo_n "checking for fsync... " >&6; }
10287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010288/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010289#include <unistd.h>
10290int
10291main ()
10292{
10293void *x=fsync
10294 ;
10295 return 0;
10296}
10297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010299
Matthias Kloseb9621712010-04-24 17:59:49 +000010300$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010301
Matthias Kloseb159a552010-04-25 21:00:44 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010307
10308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10311$as_echo_n "checking for fdatasync... " >&6; }
10312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010314#include <unistd.h>
10315int
10316main ()
10317{
10318void *x=fdatasync
10319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010326
Matthias Kloseb159a552010-04-25 21:00:44 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010328$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010329else
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010332
10333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10336$as_echo_n "checking for epoll... " >&6; }
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010338/* end confdefs.h. */
10339#include <sys/epoll.h>
10340int
10341main ()
10342{
10343void *x=epoll_create
10344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010351
Matthias Kloseb159a552010-04-25 21:00:44 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010357
10358fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10361$as_echo_n "checking for epoll_create1... " >&6; }
10362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10363/* end confdefs.h. */
10364#include <sys/epoll.h>
10365int
10366main ()
10367{
10368void *x=epoll_create1
10369 ;
10370 return 0;
10371}
10372_ACEOF
10373if ac_fn_c_try_compile "$LINENO"; then :
10374
10375$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10376
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10378$as_echo "yes" >&6; }
10379else
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
10382
10383fi
10384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10386$as_echo_n "checking for kqueue... " >&6; }
10387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010388/* end confdefs.h. */
10389
10390#include <sys/types.h>
10391#include <sys/event.h>
10392
10393int
10394main ()
10395{
10396int x=kqueue()
10397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010404
Matthias Kloseb159a552010-04-25 21:00:44 +000010405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010407else
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010410
10411fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010413# On some systems (eg. FreeBSD 5), we would find a definition of the
10414# functions ctermid_r, setgroups in the library, but no prototype
10415# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10416# address to avoid compiler warnings and potential miscompilations
10417# because of the missing prototypes.
10418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10420$as_echo_n "checking for ctermid_r... " >&6; }
10421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010422/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010423
Martin v. Löwisd5843682002-11-21 20:41:28 +000010424#include <stdio.h>
10425
Martin v. Löwisd5843682002-11-21 20:41:28 +000010426int
10427main ()
10428{
10429void* p = ctermid_r
10430 ;
10431 return 0;
10432}
10433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010437
Matthias Kloseb159a552010-04-25 21:00:44 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010440else
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010443
10444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10446
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10448$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010449if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010450 $as_echo_n "(cached) " >&6
10451else
10452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010453/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010454#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010455int
10456main ()
10457{
10458void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010459
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010465 ac_cv_flock_decl=yes
10466else
10467 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010468
10469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010471
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010472fi
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10474$as_echo "$ac_cv_flock_decl" >&6; }
10475if test "x${ac_cv_flock_decl}" = xyes; then
10476 for ac_func in flock
10477do :
10478 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010479if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010480 cat >>confdefs.h <<_ACEOF
10481#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010482_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010483
Antoine Pitroua3000072010-09-07 14:52:42 +000010484else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010486$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010487if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010488 $as_echo_n "(cached) " >&6
10489else
10490 ac_check_lib_save_LIBS=$LIBS
10491LIBS="-lbsd $LIBS"
10492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10493/* end confdefs.h. */
10494
10495/* Override any GCC internal prototype to avoid an error.
10496 Use char because int might match the return type of a GCC
10497 builtin and then its argument prototype would still apply. */
10498#ifdef __cplusplus
10499extern "C"
10500#endif
10501char flock ();
10502int
10503main ()
10504{
10505return flock ();
10506 ;
10507 return 0;
10508}
10509_ACEOF
10510if ac_fn_c_try_link "$LINENO"; then :
10511 ac_cv_lib_bsd_flock=yes
10512else
10513 ac_cv_lib_bsd_flock=no
10514fi
10515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
10517LIBS=$ac_check_lib_save_LIBS
10518fi
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10520$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010521if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010522 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010523
10524
10525$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10526
10527
10528fi
10529
10530
10531fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010532done
10533
Antoine Pitroua3000072010-09-07 14:52:42 +000010534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10537$as_echo_n "checking for getpagesize... " >&6; }
10538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010539/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010540
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010541#include <unistd.h>
10542
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010543int
10544main ()
10545{
10546void* p = getpagesize
10547 ;
10548 return 0;
10549}
10550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010552
Matthias Kloseb9621712010-04-24 17:59:49 +000010553$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010554
Matthias Kloseb159a552010-04-25 21:00:44 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010557else
Matthias Kloseb9621712010-04-24 17:59:49 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10559$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010560
10561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010563
Victor Stinner984890f2011-11-24 13:53:38 +010010564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10565$as_echo_n "checking for broken unsetenv... " >&6; }
10566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567/* end confdefs.h. */
10568
10569#include <stdlib.h>
10570
10571int
10572main ()
10573{
10574int res = unsetenv("DUMMY")
10575 ;
10576 return 0;
10577}
10578_ACEOF
10579if ac_fn_c_try_compile "$LINENO"; then :
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582else
10583
10584$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10585
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10587$as_echo "yes" >&6; }
10588
10589fi
10590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10591
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010592for ac_prog in true
10593do
10594 # Extract the first word of "$ac_prog", so it can be a program name with args.
10595set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010598if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010600else
10601 if test -n "$TRUE"; then
10602 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10603else
10604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10605for as_dir in $PATH
10606do
10607 IFS=$as_save_IFS
10608 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010610 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 +000010611 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 $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 +000010613 break 2
10614 fi
10615done
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010618
10619fi
10620fi
10621TRUE=$ac_cv_prog_TRUE
10622if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10624$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628fi
10629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631 test -n "$TRUE" && break
10632done
10633test -n "$TRUE" || TRUE="/bin/true"
10634
10635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10637$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010638if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010640else
10641 ac_check_lib_save_LIBS=$LIBS
10642LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646/* Override any GCC internal prototype to avoid an error.
10647 Use char because int might match the return type of a GCC
10648 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010649#ifdef __cplusplus
10650extern "C"
10651#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010652char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010653int
10654main ()
10655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010657 ;
10658 return 0;
10659}
10660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010662 ac_cv_lib_c_inet_aton=yes
10663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666rm -f core conftest.err conftest.$ac_objext \
10667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010668LIBS=$ac_check_lib_save_LIBS
10669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10671$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010672if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010673 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010674else
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10676$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010677if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010679else
10680 ac_check_lib_save_LIBS=$LIBS
10681LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685/* Override any GCC internal prototype to avoid an error.
10686 Use char because int might match the return type of a GCC
10687 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010688#ifdef __cplusplus
10689extern "C"
10690#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010691char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010692int
10693main ()
10694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010701 ac_cv_lib_resolv_inet_aton=yes
10702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010705rm -f core conftest.err conftest.$ac_objext \
10706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707LIBS=$ac_check_lib_save_LIBS
10708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10710$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010711if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712 cat >>confdefs.h <<_ACEOF
10713#define HAVE_LIBRESOLV 1
10714_ACEOF
10715
10716 LIBS="-lresolv $LIBS"
10717
10718fi
10719
10720
10721fi
10722
10723
Christian Heimesd0764e22007-12-04 15:00:33 +000010724# On Tru64, chflags seems to be present, but calling it will
10725# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10727$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010728if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010732 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010733else
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010735/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010736
Christian Heimesd0764e22007-12-04 15:00:33 +000010737#include <sys/stat.h>
10738#include <unistd.h>
10739int main(int argc, char*argv[])
10740{
10741 if(chflags(argv[0], 0) != 0)
10742 return 1;
10743 return 0;
10744}
Ned Deily3eb67d52011-06-28 00:00:28 -070010745
Christian Heimesd0764e22007-12-04 15:00:33 +000010746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010747if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010748 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010749else
Matthias Kloseb9621712010-04-24 17:59:49 +000010750 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010754fi
10755
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010756
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10759$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010760if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010762if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010763 ac_cv_have_chflags="yes"
10764else
10765 ac_cv_have_chflags="no"
10766fi
10767
10768fi
10769if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010770
Matthias Kloseb9621712010-04-24 17:59:49 +000010771$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010772
10773fi
10774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10776$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010777if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010781 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010782else
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010784/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010785
Christian Heimesd0764e22007-12-04 15:00:33 +000010786#include <sys/stat.h>
10787#include <unistd.h>
10788int main(int argc, char*argv[])
10789{
10790 if(lchflags(argv[0], 0) != 0)
10791 return 1;
10792 return 0;
10793}
Ned Deily3eb67d52011-06-28 00:00:28 -070010794
Christian Heimesd0764e22007-12-04 15:00:33 +000010795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010796if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010797 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010798else
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010803fi
10804
10805
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10808$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010809if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010811if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010812 ac_cv_have_lchflags="yes"
10813else
10814 ac_cv_have_lchflags="no"
10815fi
10816
10817fi
10818if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010821
10822fi
10823
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010824case $ac_sys_system/$ac_sys_release in
10825Darwin/*)
10826 _CUR_CFLAGS="${CFLAGS}"
10827 _CUR_LDFLAGS="${LDFLAGS}"
10828 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10829 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10830 ;;
10831esac
10832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10834$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010835if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010837else
10838 ac_check_lib_save_LIBS=$LIBS
10839LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010841/* end confdefs.h. */
10842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010843/* Override any GCC internal prototype to avoid an error.
10844 Use char because int might match the return type of a GCC
10845 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010846#ifdef __cplusplus
10847extern "C"
10848#endif
10849char inflateCopy ();
10850int
10851main ()
10852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010853return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010854 ;
10855 return 0;
10856}
10857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010858if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010859 ac_cv_lib_z_inflateCopy=yes
10860else
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010863rm -f core conftest.err conftest.$ac_objext \
10864 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010865LIBS=$ac_check_lib_save_LIBS
10866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10868$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010869if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010872
10873fi
10874
10875
10876case $ac_sys_system/$ac_sys_release in
10877Darwin/*)
10878 CFLAGS="${_CUR_CFLAGS}"
10879 LDFLAGS="${_CUR_LDFLAGS}"
10880 ;;
10881esac
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10884$as_echo_n "checking for hstrerror... " >&6; }
10885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010887
Martin v. Löwise9416172003-05-03 10:12:45 +000010888#include <netdb.h>
10889
Martin v. Löwise9416172003-05-03 10:12:45 +000010890int
10891main ()
10892{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010893void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010894 ;
10895 return 0;
10896}
10897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010901
Matthias Kloseb159a552010-04-25 21:00:44 +000010902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010903$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010904else
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10906$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010907
10908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010909rm -f core conftest.err conftest.$ac_objext \
10910 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10913$as_echo_n "checking for inet_aton... " >&6; }
10914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010916
Martin v. Löwis86d66262006-02-17 08:40:11 +000010917#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010918#include <sys/socket.h>
10919#include <netinet/in.h>
10920#include <arpa/inet.h>
10921
Martin v. Löwise9416172003-05-03 10:12:45 +000010922int
10923main ()
10924{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010925void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010926 ;
10927 return 0;
10928}
10929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010933
Matthias Kloseb159a552010-04-25 21:00:44 +000010934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010935$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010936else
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10938$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010939
10940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010941rm -f core conftest.err conftest.$ac_objext \
10942 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10945$as_echo_n "checking for inet_pton... " >&6; }
10946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010947/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010948
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010949#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010950#include <sys/socket.h>
10951#include <netinet/in.h>
10952#include <arpa/inet.h>
10953
Martin v. Löwise9416172003-05-03 10:12:45 +000010954int
10955main ()
10956{
10957void* p = inet_pton
10958 ;
10959 return 0;
10960}
10961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010965
Matthias Kloseb159a552010-04-25 21:00:44 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010971
10972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010974
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010975# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10977$as_echo_n "checking for setgroups... " >&6; }
10978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010979/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010980
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010981#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010982#ifdef HAVE_GRP_H
10983#include <grp.h>
10984#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010985
Martin v. Löwisd5843682002-11-21 20:41:28 +000010986int
10987main ()
10988{
10989void* p = setgroups
10990 ;
10991 return 0;
10992}
10993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010995
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010997
Matthias Kloseb159a552010-04-25 21:00:44 +000010998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011000else
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011003
11004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011006
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011007# check for openpty and forkpty
11008
11009for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011010do :
11011 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011012if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011013 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011015_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011016
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011017else
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11019$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011020if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011022else
Martin v. Löwis11437992002-04-12 09:54:03 +000011023 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011024LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028/* Override any GCC internal prototype to avoid an error.
11029 Use char because int might match the return type of a GCC
11030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011031#ifdef __cplusplus
11032extern "C"
11033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011034char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011035int
11036main ()
11037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011039 ;
11040 return 0;
11041}
11042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011045else
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011048rm -f core conftest.err conftest.$ac_objext \
11049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011050LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11053$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011054if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011055 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011056 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011057else
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11059$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011060if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011062else
11063 ac_check_lib_save_LIBS=$LIBS
11064LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011066/* end confdefs.h. */
11067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068/* Override any GCC internal prototype to avoid an error.
11069 Use char because int might match the return type of a GCC
11070 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011071#ifdef __cplusplus
11072extern "C"
11073#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011074char openpty ();
11075int
11076main ()
11077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011079 ;
11080 return 0;
11081}
11082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011084 ac_cv_lib_bsd_openpty=yes
11085else
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011088rm -f core conftest.err conftest.$ac_objext \
11089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011090LIBS=$ac_check_lib_save_LIBS
11091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11093$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011094if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011096 LIBS="$LIBS -lbsd"
11097fi
11098
11099
11100fi
11101
Fred Drake8cef4cf2000-06-28 16:40:38 +000011102
11103fi
11104done
11105
11106for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011107do :
11108 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011109if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011110 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011111#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011112_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011113
Fred Drake8cef4cf2000-06-28 16:40:38 +000011114else
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11116$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011117if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011119else
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011121LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125/* Override any GCC internal prototype to avoid an error.
11126 Use char because int might match the return type of a GCC
11127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011128#ifdef __cplusplus
11129extern "C"
11130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011131char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011132int
11133main ()
11134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 ;
11137 return 0;
11138}
11139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011141 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011142else
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011145rm -f core conftest.err conftest.$ac_objext \
11146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011147LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11150$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011151if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011153 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011154else
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11156$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011157if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011159else
11160 ac_check_lib_save_LIBS=$LIBS
11161LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163/* end confdefs.h. */
11164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011165/* Override any GCC internal prototype to avoid an error.
11166 Use char because int might match the return type of a GCC
11167 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011168#ifdef __cplusplus
11169extern "C"
11170#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011171char forkpty ();
11172int
11173main ()
11174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011181 ac_cv_lib_bsd_forkpty=yes
11182else
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011185rm -f core conftest.err conftest.$ac_objext \
11186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011187LIBS=$ac_check_lib_save_LIBS
11188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11190$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011191if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011193 LIBS="$LIBS -lbsd"
11194fi
11195
11196
11197fi
11198
Fred Drake8cef4cf2000-06-28 16:40:38 +000011199
11200fi
11201done
11202
Jack Jansendd19cf82001-12-06 22:36:17 +000011203
Christian Heimesb186d002008-03-18 15:15:01 +000011204# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011205for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011206do :
11207 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011208if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011210#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011211_ACEOF
11212
11213fi
11214done
11215
11216
Michael W. Hudson54241132001-12-07 15:38:26 +000011217# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011218for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011219do :
11220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011222if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011225_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011227fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011228done
11229
Michael W. Hudson54241132001-12-07 15:38:26 +000011230
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011231ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011232if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011233 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011234
Martin v. Löwis1142de32002-03-29 16:28:31 +000011235else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011237 *" dup2.$ac_objext "* ) ;;
11238 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011240esac
11241
Martin v. Löwis1142de32002-03-29 16:28:31 +000011242fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011243
11244ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011245if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011246 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11247
11248else
11249 case " $LIBOBJS " in
11250 *" getcwd.$ac_objext "* ) ;;
11251 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11252 ;;
11253esac
11254
11255fi
11256
11257ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011258if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011259 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11260
11261else
11262 case " $LIBOBJS " in
11263 *" strdup.$ac_objext "* ) ;;
11264 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11265 ;;
11266esac
11267
11268fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011269
11270
11271for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011272do :
11273 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011274if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011276#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011279/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011280#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011281int
11282main ()
11283{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011284getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011285 ;
11286 return 0;
11287}
11288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011289if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011290
Matthias Kloseb9621712010-04-24 17:59:49 +000011291$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011292
Guido van Rossum627b2d71993-12-24 10:39:16 +000011293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011295
Guido van Rossum627b2d71993-12-24 10:39:16 +000011296fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011297done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011298
Jack Jansen150753c2003-03-29 22:07:47 +000011299for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011300do :
11301 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011302if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011303 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011307/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011308#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011309int
11310main ()
11311{
11312setpgrp(0,0);
11313 ;
11314 return 0;
11315}
11316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011320
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011323
11324fi
11325done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011326
Thomas Wouters3a584202000-08-05 23:28:51 +000011327for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011328do :
11329 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011330if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011332#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011335/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011336#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011337int
11338main ()
11339{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011340gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 ;
11342 return 0;
11343}
11344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011345if ac_fn_c_try_compile "$LINENO"; then :
11346
Guido van Rossum627b2d71993-12-24 10:39:16 +000011347else
Skip Montanaro6dead952003-09-25 14:50:04 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011350
Martin v. Löwis11437992002-04-12 09:54:03 +000011351
Guido van Rossum627b2d71993-12-24 10:39:16 +000011352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011355fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011356done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011357
Michael W. Hudson54241132001-12-07 15:38:26 +000011358
Victor Stinnere0be4232011-10-25 13:06:09 +020011359for ac_func in clock_gettime
11360do :
11361 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11362if test "x$ac_cv_func_clock_gettime" = xyes; then :
11363 cat >>confdefs.h <<_ACEOF
11364#define HAVE_CLOCK_GETTIME 1
11365_ACEOF
11366
11367else
11368
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11370$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11371if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11372 $as_echo_n "(cached) " >&6
11373else
11374 ac_check_lib_save_LIBS=$LIBS
11375LIBS="-lrt $LIBS"
11376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11377/* end confdefs.h. */
11378
11379/* Override any GCC internal prototype to avoid an error.
11380 Use char because int might match the return type of a GCC
11381 builtin and then its argument prototype would still apply. */
11382#ifdef __cplusplus
11383extern "C"
11384#endif
11385char clock_gettime ();
11386int
11387main ()
11388{
11389return clock_gettime ();
11390 ;
11391 return 0;
11392}
11393_ACEOF
11394if ac_fn_c_try_link "$LINENO"; then :
11395 ac_cv_lib_rt_clock_gettime=yes
11396else
11397 ac_cv_lib_rt_clock_gettime=no
11398fi
11399rm -f core conftest.err conftest.$ac_objext \
11400 conftest$ac_exeext conftest.$ac_ext
11401LIBS=$ac_check_lib_save_LIBS
11402fi
11403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11404$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11405if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11406
11407 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11408
11409
11410$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11411
11412
11413fi
11414
11415
11416fi
11417done
11418
11419
11420for ac_func in clock_getres
11421do :
11422 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11423if test "x$ac_cv_func_clock_getres" = xyes; then :
11424 cat >>confdefs.h <<_ACEOF
11425#define HAVE_CLOCK_GETRES 1
11426_ACEOF
11427
11428else
11429
11430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11431$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11432if ${ac_cv_lib_rt_clock_getres+:} false; then :
11433 $as_echo_n "(cached) " >&6
11434else
11435 ac_check_lib_save_LIBS=$LIBS
11436LIBS="-lrt $LIBS"
11437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11438/* end confdefs.h. */
11439
11440/* Override any GCC internal prototype to avoid an error.
11441 Use char because int might match the return type of a GCC
11442 builtin and then its argument prototype would still apply. */
11443#ifdef __cplusplus
11444extern "C"
11445#endif
11446char clock_getres ();
11447int
11448main ()
11449{
11450return clock_getres ();
11451 ;
11452 return 0;
11453}
11454_ACEOF
11455if ac_fn_c_try_link "$LINENO"; then :
11456 ac_cv_lib_rt_clock_getres=yes
11457else
11458 ac_cv_lib_rt_clock_getres=no
11459fi
11460rm -f core conftest.err conftest.$ac_objext \
11461 conftest$ac_exeext conftest.$ac_ext
11462LIBS=$ac_check_lib_save_LIBS
11463fi
11464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11465$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11466if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11467
11468 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11469
11470
11471fi
11472
11473
11474fi
11475done
11476
11477
Matthias Kloseb9621712010-04-24 17:59:49 +000011478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11479$as_echo_n "checking for major... " >&6; }
11480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011481/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011482
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011483#if defined(MAJOR_IN_MKDEV)
11484#include <sys/mkdev.h>
11485#elif defined(MAJOR_IN_SYSMACROS)
11486#include <sys/sysmacros.h>
11487#else
11488#include <sys/types.h>
11489#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011490
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011491int
11492main ()
11493{
11494
11495 makedev(major(0),minor(0));
11496
11497 ;
11498 return 0;
11499}
11500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011502
11503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011505
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11507$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011508
11509else
Skip Montanaro6dead952003-09-25 14:50:04 +000011510
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11512$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011513
11514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011515rm -f core conftest.err conftest.$ac_objext \
11516 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011517
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011518# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011519# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11521$as_echo_n "checking for getaddrinfo... " >&6; }
11522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011523/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011524
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011525#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011526#include <sys/socket.h>
11527#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011528#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011529
Martin v. Löwis11437992002-04-12 09:54:03 +000011530int
11531main ()
11532{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011533getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011534 ;
11535 return 0;
11536}
11537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011538if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011539 have_getaddrinfo=yes
11540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011543rm -f core conftest.err conftest.$ac_objext \
11544 conftest$ac_exeext conftest.$ac_ext
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11546$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011547if test $have_getaddrinfo = yes
11548then
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11550$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011551 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011553else
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011555
11556if test "${enable_ipv6+set}" = set; then
11557 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11558else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011559 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011560fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011563/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011564
11565#include <sys/types.h>
11566#include <netdb.h>
11567#include <string.h>
11568#include <sys/socket.h>
11569#include <netinet/in.h>
11570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011571int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011572{
11573 int passive, gaierr, inet4 = 0, inet6 = 0;
11574 struct addrinfo hints, *ai, *aitop;
11575 char straddr[INET6_ADDRSTRLEN], strport[16];
11576
11577 for (passive = 0; passive <= 1; passive++) {
11578 memset(&hints, 0, sizeof(hints));
11579 hints.ai_family = AF_UNSPEC;
11580 hints.ai_flags = passive ? AI_PASSIVE : 0;
11581 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011582 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011583 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11584 (void)gai_strerror(gaierr);
11585 goto bad;
11586 }
11587 for (ai = aitop; ai; ai = ai->ai_next) {
11588 if (ai->ai_addr == NULL ||
11589 ai->ai_addrlen == 0 ||
11590 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11591 straddr, sizeof(straddr), strport, sizeof(strport),
11592 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11593 goto bad;
11594 }
11595 switch (ai->ai_family) {
11596 case AF_INET:
11597 if (strcmp(strport, "54321") != 0) {
11598 goto bad;
11599 }
11600 if (passive) {
11601 if (strcmp(straddr, "0.0.0.0") != 0) {
11602 goto bad;
11603 }
11604 } else {
11605 if (strcmp(straddr, "127.0.0.1") != 0) {
11606 goto bad;
11607 }
11608 }
11609 inet4++;
11610 break;
11611 case AF_INET6:
11612 if (strcmp(strport, "54321") != 0) {
11613 goto bad;
11614 }
11615 if (passive) {
11616 if (strcmp(straddr, "::") != 0) {
11617 goto bad;
11618 }
11619 } else {
11620 if (strcmp(straddr, "::1") != 0) {
11621 goto bad;
11622 }
11623 }
11624 inet6++;
11625 break;
11626 case AF_UNSPEC:
11627 goto bad;
11628 break;
11629 default:
11630 /* another family support? */
11631 break;
11632 }
11633 }
11634 }
11635
11636 if (!(inet4 == 0 || inet4 == 2))
11637 goto bad;
11638 if (!(inet6 == 0 || inet6 == 2))
11639 goto bad;
11640
11641 if (aitop)
11642 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011643 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011644
11645 bad:
11646 if (aitop)
11647 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011648 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011649}
11650
Martin v. Löwis11437992002-04-12 09:54:03 +000011651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011653 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011654else
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011661fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11666$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11667
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011668if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011669then
11670 if test $ipv6 = yes
11671 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011672 echo 'Fatal: You must get working getaddrinfo() function.'
11673 echo ' or you can specify "--disable-ipv6"'.
11674 exit 1
11675 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011676else
Martin v. Löwis11437992002-04-12 09:54:03 +000011677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011679
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011680fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011681
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011682for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011683do :
11684 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011685if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011687#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011688_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011689
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011690fi
11691done
11692
Michael W. Hudson54241132001-12-07 15:38:26 +000011693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011694# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11696$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011697if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011702#include <sys/types.h>
11703#include <sys/time.h>
11704#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011705
Martin v. Löwis11437992002-04-12 09:54:03 +000011706int
11707main ()
11708{
11709if ((struct tm *) 0)
11710return 0;
11711 ;
11712 return 0;
11713}
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011716 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11723$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011724if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011725
Matthias Kloseb9621712010-04-24 17:59:49 +000011726$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727
11728fi
11729
Matthias Kloseb9621712010-04-24 17:59:49 +000011730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11731$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011732if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011736/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011737#include <sys/types.h>
11738#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011739
Martin v. Löwis11437992002-04-12 09:54:03 +000011740int
11741main ()
11742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011743struct tm tm;
11744 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 ;
11747 return 0;
11748}
11749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011750if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011751 ac_cv_struct_tm=time.h
11752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11758$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011759if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762
11763fi
11764
Matthias Kloseb9621712010-04-24 17:59:49 +000011765ac_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 +000011766#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768"
Victor Stinnere0be4232011-10-25 13:06:09 +020011769if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
11771cat >>confdefs.h <<_ACEOF
11772#define HAVE_STRUCT_TM_TM_ZONE 1
11773_ACEOF
11774
11775
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011777
Martin v. Löwis11437992002-04-12 09:54:03 +000011778if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011781
11782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11784"
Victor Stinnere0be4232011-10-25 13:06:09 +020011785if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011787else
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789fi
11790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011792#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793_ACEOF
11794
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11796$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011797if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799else
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011801/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011802#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803#if !HAVE_DECL_TZNAME
11804extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Martin v. Löwis11437992002-04-12 09:54:03 +000011807int
11808main ()
11809{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011811 ;
11812 return 0;
11813}
11814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011816 ac_cv_var_tzname=yes
11817else
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011820rm -f core conftest.err conftest.$ac_objext \
11821 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11824$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011825 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829 fi
11830fi
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011833if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
11835cat >>confdefs.h <<_ACEOF
11836#define HAVE_STRUCT_STAT_ST_RDEV 1
11837_ACEOF
11838
11839
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011840fi
11841
Matthias Kloseb9621712010-04-24 17:59:49 +000011842ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011843if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845cat >>confdefs.h <<_ACEOF
11846#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11847_ACEOF
11848
11849
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011850fi
11851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011854
11855cat >>confdefs.h <<_ACEOF
11856#define HAVE_STRUCT_STAT_ST_FLAGS 1
11857_ACEOF
11858
11859
11860fi
11861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011863if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011864
11865cat >>confdefs.h <<_ACEOF
11866#define HAVE_STRUCT_STAT_ST_GEN 1
11867_ACEOF
11868
11869
11870fi
11871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011873if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011874
11875cat >>confdefs.h <<_ACEOF
11876#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11877_ACEOF
11878
11879
11880fi
11881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020011883if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011884
Martin v. Löwis11437992002-04-12 09:54:03 +000011885cat >>confdefs.h <<_ACEOF
11886#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11887_ACEOF
11888
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011891
11892else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011894 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11896 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011897esac
11898
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011899fi
11900
Michael W. Hudson54241132001-12-07 15:38:26 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902
Matthias Kloseb9621712010-04-24 17:59:49 +000011903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11904$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011905if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011907else
Matthias Kloseb159a552010-04-25 21:00:44 +000011908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011910/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011911#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011912int
11913main ()
11914{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011915return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011916 ;
11917 return 0;
11918}
11919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011921 ac_cv_header_time_altzone=yes
11922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927fi
11928
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11930$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011931if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011934
11935fi
11936
Guido van Rossumda88dad1995-01-26 00:46:29 +000011937was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11939$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011942
11943#include <sys/types.h>
11944#include <sys/select.h>
11945#include <sys/time.h>
11946
Martin v. Löwis11437992002-04-12 09:54:03 +000011947int
11948main ()
11949{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011950;
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 ;
11952 return 0;
11953}
11954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011956
11957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011960 was_it_defined=yes
11961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11965$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11968$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011974#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011975int
11976main ()
11977{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 ;
11980 return 0;
11981}
11982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011984 ac_cv_struct_addrinfo=yes
11985else
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989fi
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11992$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011993if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011996
11997fi
11998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12000$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012005/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012006
12007# include <sys/types.h>
12008# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012009int
12010main ()
12011{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012012struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 ;
12014 return 0;
12015}
12016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012018 ac_cv_struct_sockaddr_storage=yes
12019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12023fi
12024
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12026$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012027if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
Matthias Kloseb9621712010-04-24 17:59:49 +000012029$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012030
12031fi
12032
Guido van Rossum627b2d71993-12-24 10:39:16 +000012033# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12036$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012042$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012043int
12044main ()
12045{
12046static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012047test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
12049 ;
12050 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012051}
Martin v. Löwis11437992002-04-12 09:54:03 +000012052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012054 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12061$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012062if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012064
12065fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012066
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12068$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012069if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012073/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012074
Martin v. Löwis11437992002-04-12 09:54:03 +000012075int
12076main ()
12077{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012078/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012079#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012080 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012082 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012084 char const *const *pcpcc;
12085 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 /* NEC SVR4.0.2 mips cc rejects this. */
12087 struct point {int x, y;};
12088 static struct point const zero = {0,0};
12089 /* AIX XL C 1.02.0.0 rejects this.
12090 It does not let you subtract one const X* pointer from another in
12091 an arm of an if-expression whose if-part is not a constant
12092 expression */
12093 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012096 ++pcpcc;
12097 ppc = (char**) pcpcc;
12098 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012099 { /* SCO 3.2v4 cc rejects this. */
12100 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012102
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012105 }
12106 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12107 int x[] = {25, 17};
12108 const int *foo = &x[0];
12109 ++foo;
12110 }
12111 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12112 typedef const int *iptr;
12113 iptr p = 0;
12114 ++p;
12115 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012116 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012117 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012118 struct s { int j; const int *ap[3]; };
12119 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 }
12121 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12122 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012126#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 ;
12129 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012130}
Martin v. Löwis11437992002-04-12 09:54:03 +000012131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012132if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133 ac_cv_c_const=yes
12134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12140$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Matthias Kloseb9621712010-04-24 17:59:49 +000012143$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012144
12145fi
12146
Michael W. Hudson54241132001-12-07 15:38:26 +000012147
Guido van Rossumda88dad1995-01-26 00:46:29 +000012148works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12150$as_echo_n "checking for working volatile... " >&6; }
12151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012152/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012153
Martin v. Löwis11437992002-04-12 09:54:03 +000012154int
12155main ()
12156{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 ;
12159 return 0;
12160}
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012163 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012164else
Skip Montanaro6dead952003-09-25 14:50:04 +000012165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012167
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012168
Guido van Rossum627b2d71993-12-24 10:39:16 +000012169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12172$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012173
Guido van Rossumda88dad1995-01-26 00:46:29 +000012174works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12176$as_echo_n "checking for working signed char... " >&6; }
12177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012178/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180int
12181main ()
12182{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012183signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ;
12185 return 0;
12186}
12187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012188if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012189 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012190else
Skip Montanaro6dead952003-09-25 14:50:04 +000012191
Matthias Kloseb9621712010-04-24 17:59:49 +000012192$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012193
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012194
Guido van Rossum7f43da71994-08-01 12:15:30 +000012195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12198$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012199
Guido van Rossumda88dad1995-01-26 00:46:29 +000012200have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12202$as_echo_n "checking for prototypes... " >&6; }
12203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012204/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012205int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012206int
12207main ()
12208{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ;
12211 return 0;
12212}
12213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012215
Matthias Kloseb9621712010-04-24 17:59:49 +000012216$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012217
Matthias Kloseb159a552010-04-25 21:00:44 +000012218 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12222$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223
Guido van Rossumda88dad1995-01-26 00:46:29 +000012224works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12226$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012228/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012229
12230#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012231int foo(int x, ...) {
12232 va_list va;
12233 va_start(va, x);
12234 va_arg(va, int);
12235 va_arg(va, char *);
12236 va_arg(va, double);
12237 return 0;
12238}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240int
12241main ()
12242{
Guido van Rossum90eea071996-08-30 20:58:57 +000012243return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 ;
12245 return 0;
12246}
12247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
12250
Matthias Kloseb9621712010-04-24 17:59:49 +000012251$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012253 works=yes
12254
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12258$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259
Martin v. Löwisd6320502004-08-12 13:45:08 +000012260# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12262$as_echo_n "checking for socketpair... " >&6; }
12263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012264/* end confdefs.h. */
12265
12266#include <sys/types.h>
12267#include <sys/socket.h>
12268
12269int
12270main ()
12271{
12272void *x=socketpair
12273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012278
Matthias Kloseb9621712010-04-24 17:59:49 +000012279$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012280
Matthias Kloseb159a552010-04-25 21:00:44 +000012281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012282$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012283else
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012286
12287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012289
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012290# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12292$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012294/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012295#include <sys/types.h>
12296#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012297int
12298main ()
12299{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012300struct sockaddr x;
12301x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ;
12303 return 0;
12304}
12305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_compile "$LINENO"; then :
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12308$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
Matthias Kloseb9621712010-04-24 17:59:49 +000012310$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311
12312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12314$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012315
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318
Guido van Rossumda88dad1995-01-26 00:46:29 +000012319va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12321$as_echo_n "checking whether va_list is an array... " >&6; }
12322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012323/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012324
12325#ifdef HAVE_STDARG_PROTOTYPES
12326#include <stdarg.h>
12327#else
12328#include <varargs.h>
12329#endif
12330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331int
12332main ()
12333{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012334va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012339if ac_fn_c_try_compile "$LINENO"; then :
12340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012341else
Skip Montanaro6dead952003-09-25 14:50:04 +000012342
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
Guido van Rossumda88dad1995-01-26 00:46:29 +000012346 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012347
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12351$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012353# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
12355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012357if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012358
Matthias Kloseb9621712010-04-24 17:59:49 +000012359 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12362$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012363 OLD_CFLAGS=$CFLAGS
12364 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012366/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012367
12368# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
Martin v. Löwis11437992002-04-12 09:54:03 +000012370int
12371main ()
12372{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012373
12374 char *name;
12375 struct hostent *he, *res;
12376 char buffer[2048];
12377 int buflen = 2048;
12378 int h_errnop;
12379
12380 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012381
12382 ;
12383 return 0;
12384}
12385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012386if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012387
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12394$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012396else
Skip Montanaro6dead952003-09-25 14:50:04 +000012397
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12401$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012403/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012405# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Martin v. Löwis11437992002-04-12 09:54:03 +000012407int
12408main ()
12409{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012410
12411 char *name;
12412 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012413 char buffer[2048];
12414 int buflen = 2048;
12415 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012416
Matthias Kloseb159a552010-04-25 21:00:44 +000012417 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
12419 ;
12420 return 0;
12421}
12422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012426
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
Matthias Kloseb159a552010-04-25 21:00:44 +000012428$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12431$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012433else
Skip Montanaro6dead952003-09-25 14:50:04 +000012434
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12436$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12438$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12440/* end confdefs.h. */
12441
12442# include <netdb.h>
12443
12444int
12445main ()
12446{
12447
12448 char *name;
12449 struct hostent *he;
12450 struct hostent_data data;
12451
12452 (void) gethostbyname_r(name, he, &data);
12453
12454 ;
12455 return 0;
12456}
12457_ACEOF
12458if ac_fn_c_try_compile "$LINENO"; then :
12459
12460 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12461
12462
12463$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12464
12465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12466$as_echo "yes" >&6; }
12467
12468else
12469
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12471$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012475
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012481 CFLAGS=$OLD_CFLAGS
12482
12483else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 for ac_func in gethostbyname
12486do :
12487 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012488if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012490#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012491_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012494done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495
Michael W. Hudson54241132001-12-07 15:38:26 +000012496
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012497fi
12498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499
12500
12501
12502
12503
12504
Guido van Rossum627b2d71993-12-24 10:39:16 +000012505# checks for system services
12506# (none yet)
12507
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012509ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012511
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012512else
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12514$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012515if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012517else
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012519LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523/* Override any GCC internal prototype to avoid an error.
12524 Use char because int might match the return type of a GCC
12525 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012526#ifdef __cplusplus
12527extern "C"
12528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012529char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012530int
12531main ()
12532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core conftest.err conftest.$ac_objext \
12544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012545LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12548$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012549if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 cat >>confdefs.h <<_ACEOF
12551#define HAVE_LIBIEEE 1
12552_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012554 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012555
Guido van Rossum627b2d71993-12-24 10:39:16 +000012556fi
12557
Michael W. Hudson54241132001-12-07 15:38:26 +000012558
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012559fi
12560
Michael W. Hudson54241132001-12-07 15:38:26 +000012561
Guido van Rossum7f253911997-05-09 02:42:48 +000012562# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12564$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012567if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012569if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012570then
12571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12575$as_echo "yes" >&6; }
12576else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12577$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012578fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12581$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582fi
12583
Guido van Rossum7f253911997-05-09 02:42:48 +000012584
Guido van Rossum7f43da71994-08-01 12:15:30 +000012585# check for --with-libm=...
12586
Guido van Rossum563e7081996-09-10 18:20:48 +000012587case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012588Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012589*) LIBM=-lm
12590esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12592$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012595if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012597if test "$withval" = no
12598then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12600$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012601elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012602then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12604$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012605else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012606fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12609$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610fi
12611
Guido van Rossum7f43da71994-08-01 12:15:30 +000012612
12613# check for --with-libc=...
12614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12616$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012619if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012621if test "$withval" = no
12622then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12624$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012625elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012626then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12628$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012629else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012630fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12633$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634fi
12635
Guido van Rossum7f43da71994-08-01 12:15:30 +000012636
Stefan Krah1919b7e2012-03-21 18:25:23 +010012637# **************************************
12638# * Check for gcc x64 inline assembler *
12639# **************************************
12640
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12642$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12644/* end confdefs.h. */
12645
12646int
12647main ()
12648{
12649
12650 __asm__ __volatile__ ("movq %rcx, %rax");
12651
12652 ;
12653 return 0;
12654}
12655_ACEOF
12656if ac_fn_c_try_compile "$LINENO"; then :
12657 have_gcc_asm_for_x64=yes
12658else
12659 have_gcc_asm_for_x64=no
12660fi
12661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12663$as_echo "$have_gcc_asm_for_x64" >&6; }
12664if test "$have_gcc_asm_for_x64" = yes
12665then
12666
12667$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12668
12669fi
12670
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012671# **************************************************
12672# * Check for various properties of floating point *
12673# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12676$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012677if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012679else
12680
Matthias Kloseb9621712010-04-24 17:59:49 +000012681if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012682 ac_cv_little_endian_double=no
12683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012685/* end confdefs.h. */
12686
12687#include <string.h>
12688int main() {
12689 double x = 9006104071832581.0;
12690 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12691 return 0;
12692 else
12693 return 1;
12694}
12695
12696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012697if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012698 ac_cv_little_endian_double=yes
12699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012704fi
12705
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012706fi
12707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12709$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012710if test "$ac_cv_little_endian_double" = yes
12711then
12712
Matthias Kloseb9621712010-04-24 17:59:49 +000012713$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012714
12715fi
12716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12718$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012719if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012721else
12722
Matthias Kloseb9621712010-04-24 17:59:49 +000012723if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012724 ac_cv_big_endian_double=no
12725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012727/* end confdefs.h. */
12728
12729#include <string.h>
12730int main() {
12731 double x = 9006104071832581.0;
12732 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12733 return 0;
12734 else
12735 return 1;
12736}
12737
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012740 ac_cv_big_endian_double=yes
12741else
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012746fi
12747
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012748fi
12749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12751$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012752if test "$ac_cv_big_endian_double" = yes
12753then
12754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012756
12757fi
12758
12759# Some ARM platforms use a mixed-endian representation for doubles.
12760# While Python doesn't currently have full support for these platforms
12761# (see e.g., issue 1762561), we can at least make sure that float <-> string
12762# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12764$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012765if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012767else
12768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012770 ac_cv_mixed_endian_double=no
12771else
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012773/* end confdefs.h. */
12774
12775#include <string.h>
12776int main() {
12777 double x = 9006104071832581.0;
12778 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12779 return 0;
12780 else
12781 return 1;
12782}
12783
12784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012786 ac_cv_mixed_endian_double=yes
12787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012792fi
12793
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012794fi
12795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12797$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798if test "$ac_cv_mixed_endian_double" = yes
12799then
12800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012802
12803fi
12804
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012805# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012806# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012807# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012808# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012809# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012810# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012811
12812# This inline assembler syntax may also work for suncc and icc,
12813# so we try it on all platforms.
12814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12816$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012818/* end confdefs.h. */
12819
12820int
12821main ()
12822{
12823
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012824 unsigned short cw;
12825 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12826 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012827
12828 ;
12829 return 0;
12830}
12831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012833 have_gcc_asm_for_x87=yes
12834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12839$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012840if test "$have_gcc_asm_for_x87" = yes
12841then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012844
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012847# Detect whether system arithmetic is subject to x87-style double
12848# rounding issues. The result of this test has little meaning on non
12849# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12850# mode is round-to-nearest and double rounding issues are present, and
12851# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12853$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012854# $BASECFLAGS may affect the result
12855ac_save_cc="$CC"
12856CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012857if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012858 ac_cv_x87_double_rounding=no
12859else
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012861/* end confdefs.h. */
12862
12863#include <stdlib.h>
12864#include <math.h>
12865int main() {
12866 volatile double x, y, z;
12867 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12868 x = 0.99999999999999989; /* 1-2**-53 */
12869 y = 1./x;
12870 if (y != 1.)
12871 exit(0);
12872 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12873 x = 1e16;
12874 y = 2.99999;
12875 z = x + y;
12876 if (z != 1e16+4.)
12877 exit(0);
12878 /* both tests show evidence of double rounding */
12879 exit(1);
12880}
12881
12882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012884 ac_cv_x87_double_rounding=no
12885else
Matthias Kloseb9621712010-04-24 17:59:49 +000012886 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012890fi
12891
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012892CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12894$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012895if test "$ac_cv_x87_double_rounding" = yes
12896then
12897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012899
12900fi
12901
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012902# ************************************
12903# * Check for mathematical functions *
12904# ************************************
12905
12906LIBS_SAVE=$LIBS
12907LIBS="$LIBS $LIBM"
12908
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012909for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12910do :
12911 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12912ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012913if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012914 cat >>confdefs.h <<_ACEOF
12915#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12916_ACEOF
12917
12918fi
12919done
12920
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012921for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012922do :
12923 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12924ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012925if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012926 cat >>confdefs.h <<_ACEOF
12927#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12928_ACEOF
12929
12930fi
12931done
12932
12933ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12934"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012936 ac_have_decl=1
12937else
12938 ac_have_decl=0
12939fi
12940
12941cat >>confdefs.h <<_ACEOF
12942#define HAVE_DECL_ISINF $ac_have_decl
12943_ACEOF
12944ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12945"
Victor Stinnere0be4232011-10-25 13:06:09 +020012946if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012947 ac_have_decl=1
12948else
12949 ac_have_decl=0
12950fi
12951
12952cat >>confdefs.h <<_ACEOF
12953#define HAVE_DECL_ISNAN $ac_have_decl
12954_ACEOF
12955ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12956"
Victor Stinnere0be4232011-10-25 13:06:09 +020012957if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012958 ac_have_decl=1
12959else
12960 ac_have_decl=0
12961fi
12962
12963cat >>confdefs.h <<_ACEOF
12964#define HAVE_DECL_ISFINITE $ac_have_decl
12965_ACEOF
12966
12967
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012968# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12969# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12971$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012972if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012973 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012974else
12975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012977 ac_cv_tanh_preserves_zero_sign=no
12978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012980/* end confdefs.h. */
12981
12982#include <math.h>
12983#include <stdlib.h>
12984int main() {
12985 /* return 0 if either negative zeros don't exist
12986 on this platform or if negative zeros exist
12987 and tanh(-0.) == -0. */
12988 if (atan2(0., -1.) == atan2(-0., -1.) ||
12989 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12990 else exit(1);
12991}
12992
12993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012994if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012995 ac_cv_tanh_preserves_zero_sign=yes
12996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013001fi
13002
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013003fi
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13006$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013007if test "$ac_cv_tanh_preserves_zero_sign" = yes
13008then
13009
Matthias Kloseb9621712010-04-24 17:59:49 +000013010$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013011
13012fi
13013
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013014if test "$ac_cv_func_log1p" = yes
13015then
13016 # On some versions of AIX, log1p(-0.) returns 0. instead of
13017 # -0. See issue #9920.
13018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13019$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013020 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013021 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013022else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013023
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013024 if test "$cross_compiling" = yes; then :
13025 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013026else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13028/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013029
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013030 #include <math.h>
13031 #include <stdlib.h>
13032 int main() {
13033 /* Fail if the signs of log1p(-0.) and -0. can be
13034 distinguished. */
13035 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13036 return 0;
13037 else
13038 return 1;
13039 }
13040
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013041_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013042if ac_fn_c_try_run "$LINENO"; then :
13043 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013044else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013045 ac_cv_log1p_drops_zero_sign=yes
13046fi
13047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013049fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013050
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013051fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013052
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13054$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13055fi
13056if test "$ac_cv_log1p_drops_zero_sign" = yes
13057then
13058
13059$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13060
13061fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013062
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013063LIBS=$LIBS_SAVE
13064
Mark Dickinsona614f042009-11-28 12:48:43 +000013065# For multiprocessing module, check that sem_open
13066# actually works. For FreeBSD versions <= 7.2,
13067# the kernel module that provides POSIX semaphores
13068# isn't loaded by default, so an attempt to call
13069# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13071$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013072if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013076 ac_cv_posix_semaphores_enabled=yes
13077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013079/* end confdefs.h. */
13080
13081#include <unistd.h>
13082#include <fcntl.h>
13083#include <stdio.h>
13084#include <semaphore.h>
13085#include <sys/stat.h>
13086
13087int main(void) {
13088 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13089 if (a == SEM_FAILED) {
13090 perror("sem_open");
13091 return 1;
13092 }
13093 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013094 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013095 return 0;
13096}
13097
13098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013099if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013100 ac_cv_posix_semaphores_enabled=yes
13101else
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013103fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013104rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13105 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013106fi
13107
13108
Mark Dickinsona614f042009-11-28 12:48:43 +000013109fi
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13112$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013113if test $ac_cv_posix_semaphores_enabled = no
13114then
13115
Matthias Kloseb9621712010-04-24 17:59:49 +000013116$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013117
13118fi
13119
Mark Dickinson10683072009-04-18 21:18:19 +000013120# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13122$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013123if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013130/* end confdefs.h. */
13131
13132#include <unistd.h>
13133#include <fcntl.h>
13134#include <stdio.h>
13135#include <semaphore.h>
13136#include <sys/stat.h>
13137
13138int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013139 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013140 int count;
13141 int res;
13142 if(a==SEM_FAILED){
13143 perror("sem_open");
13144 return 1;
13145
13146 }
13147 res = sem_getvalue(a, &count);
13148 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013149 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013150 return res==-1 ? 1 : 0;
13151}
13152
Mark Dickinson10683072009-04-18 21:18:19 +000013153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013154if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013155 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013156else
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013161fi
13162
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013164fi
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13167$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013168if test $ac_cv_broken_sem_getvalue = yes
13169then
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013172
13173fi
13174
Mark Dickinsonbd792642009-03-18 20:06:12 +000013175# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13177$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013178# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013180 enableval=$enable_big_digits; case $enable_big_digits in
13181yes)
13182 enable_big_digits=30 ;;
13183no)
13184 enable_big_digits=15 ;;
1318515|30)
13186 ;;
13187*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013188 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000013189esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13191$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013192
13193cat >>confdefs.h <<_ACEOF
13194#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13195_ACEOF
13196
13197
13198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13200$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013201fi
13202
13203
Guido van Rossumef2255b2000-03-10 22:30:29 +000013204# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013205ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013206if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
13208
Matthias Kloseb9621712010-04-24 17:59:49 +000013209$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013211 wchar_h="yes"
13212
Guido van Rossumef2255b2000-03-10 22:30:29 +000013213else
Martin v. Löwis11437992002-04-12 09:54:03 +000013214 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013215
13216fi
13217
Michael W. Hudson54241132001-12-07 15:38:26 +000013218
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013220# determine wchar_t size
13221if test "$wchar_h" = yes
13222then
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13225# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13226# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13228$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013229if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13233"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013234
Martin v. Löwis11437992002-04-12 09:54:03 +000013235else
Matthias Kloseb9621712010-04-24 17:59:49 +000013236 if test "$ac_cv_type_wchar_t" = yes; then
13237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013239as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013240See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241 else
13242 ac_cv_sizeof_wchar_t=0
13243 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013245
Martin v. Löwis11437992002-04-12 09:54:03 +000013246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13248$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249
13250
13251
Martin v. Löwis11437992002-04-12 09:54:03 +000013252cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013253#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013254_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013255
Michael W. Hudson54241132001-12-07 15:38:26 +000013256
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013257fi
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13260$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013261have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013264
13265#include <tcl.h>
13266#if TCL_UTF_MAX != 6
13267# error "NOT UCS4_TCL"
13268#endif
13269int
13270main ()
13271{
13272
13273 ;
13274 return 0;
13275}
13276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013277if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013278
13279
Matthias Kloseb9621712010-04-24 17:59:49 +000013280$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013281
13282 have_ucs4_tcl=yes
13283
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13287$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013288
Skip Montanaro6dead952003-09-25 14:50:04 +000013289# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013290if test "$wchar_h" = yes
13291then
13292 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13294$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013295 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013297else
13298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013300 ac_cv_wchar_t_signed=yes
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013303/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013304
13305 #include <wchar.h>
13306 int main()
13307 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013308 /* Success: exit code 0 */
13309 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013310 }
13311
13312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013314 ac_cv_wchar_t_signed=yes
13315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13319 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013320fi
13321
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013322fi
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13325$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326fi
13327
Georg Brandl52d168a2008-01-07 18:10:24 +000013328# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013329if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013330 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013331then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013332 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Georg Brandl52d168a2008-01-07 18:10:24 +000013336else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013337 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013338fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13340$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013341
13342# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13344$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013345if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013347else
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 ac_cv_c_bigendian=unknown
13349 # See if we're dealing with a universal compiler.
13350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13351/* end confdefs.h. */
13352#ifndef __APPLE_CC__
13353 not a universal capable compiler
13354 #endif
13355 typedef int dummy;
13356
Skip Montanaro6dead952003-09-25 14:50:04 +000013357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013358if ac_fn_c_try_compile "$LINENO"; then :
13359
13360 # Check for potential -arch flags. It is not universal unless
13361 # there are at least two -arch flags with different values.
13362 ac_arch=
13363 ac_prev=
13364 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13365 if test -n "$ac_prev"; then
13366 case $ac_word in
13367 i?86 | x86_64 | ppc | ppc64)
13368 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13369 ac_arch=$ac_word
13370 else
13371 ac_cv_c_bigendian=universal
13372 break
13373 fi
13374 ;;
13375 esac
13376 ac_prev=
13377 elif test "x$ac_word" = "x-arch"; then
13378 ac_prev=arch
13379 fi
13380 done
13381fi
13382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13383 if test $ac_cv_c_bigendian = unknown; then
13384 # See if sys/param.h defines the BYTE_ORDER macro.
13385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013386/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013387#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390int
13391main ()
13392{
Matthias Kloseb9621712010-04-24 17:59:49 +000013393#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13394 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13395 && LITTLE_ENDIAN)
13396 bogus endian macros
13397 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
13399 ;
13400 return 0;
13401}
13402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013403if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013404 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013406/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013407#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410int
13411main ()
13412{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013413#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 not big endian
13415 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013416
13417 ;
13418 return 0;
13419}
13420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013422 ac_cv_c_bigendian=yes
13423else
Matthias Kloseb9621712010-04-24 17:59:49 +000013424 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013427fi
13428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13429 fi
13430 if test $ac_cv_c_bigendian = unknown; then
13431 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013433/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013434#include <limits.h>
13435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436int
13437main ()
13438{
Matthias Kloseb9621712010-04-24 17:59:49 +000013439#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13440 bogus endian macros
13441 #endif
13442
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ;
13444 return 0;
13445}
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_compile "$LINENO"; then :
13448 # It does; now see whether it defined to _BIG_ENDIAN or not.
13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13450/* end confdefs.h. */
13451#include <limits.h>
13452
13453int
13454main ()
13455{
13456#ifndef _BIG_ENDIAN
13457 not big endian
13458 #endif
13459
13460 ;
13461 return 0;
13462}
13463_ACEOF
13464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13470fi
13471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13472 fi
13473 if test $ac_cv_c_bigendian = unknown; then
13474 # Compile a test program.
13475 if test "$cross_compiling" = yes; then :
13476 # Try to guess by grepping values from an object file.
13477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478/* end confdefs.h. */
13479short int ascii_mm[] =
13480 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13481 short int ascii_ii[] =
13482 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13483 int use_ascii (int i) {
13484 return ascii_mm[i] + ascii_ii[i];
13485 }
13486 short int ebcdic_ii[] =
13487 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13488 short int ebcdic_mm[] =
13489 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13490 int use_ebcdic (int i) {
13491 return ebcdic_mm[i] + ebcdic_ii[i];
13492 }
13493 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495int
13496main ()
13497{
13498return use_ascii (foo) == use_ebcdic (foo);
13499 ;
13500 return 0;
13501}
13502_ACEOF
13503if ac_fn_c_try_compile "$LINENO"; then :
13504 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13505 ac_cv_c_bigendian=yes
13506 fi
13507 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13508 if test "$ac_cv_c_bigendian" = unknown; then
13509 ac_cv_c_bigendian=no
13510 else
13511 # finding both strings is unlikely to happen, but who knows?
13512 ac_cv_c_bigendian=unknown
13513 fi
13514 fi
13515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013517else
Matthias Kloseb9621712010-04-24 17:59:49 +000013518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013519/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013520$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013521int
13522main ()
13523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 /* Are we little or big endian? From Harbison&Steele. */
13526 union
13527 {
13528 long int l;
13529 char c[sizeof (long int)];
13530 } u;
13531 u.l = 1;
13532 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533
13534 ;
13535 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013536}
Martin v. Löwis11437992002-04-12 09:54:03 +000013537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013538if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013539 ac_cv_c_bigendian=no
13540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13544 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013545fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13550$as_echo "$ac_cv_c_bigendian" >&6; }
13551 case $ac_cv_c_bigendian in #(
13552 yes)
13553 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13554;; #(
13555 no)
13556 ;; #(
13557 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013558
Matthias Kloseb9621712010-04-24 17:59:49 +000013559$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 ;; #(
13562 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013563 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013564 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013566
Michael W. Hudson54241132001-12-07 15:38:26 +000013567
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013568# ABI version string for Python extension modules. This appears between the
13569# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13570# from the following attributes which affect the ABI of this Python build (in
13571# this order):
13572#
13573# * The Python implementation (always 'cpython-' for us)
13574# * The major and minor version numbers
13575# * --with-pydebug (adds a 'd')
13576# * --with-pymalloc (adds a 'm')
13577# * --with-wide-unicode (adds a 'u')
13578#
13579# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013580# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13581# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013582
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13584$as_echo_n "checking ABIFLAGS... " >&6; }
13585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13586$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13588$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013589SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13591$as_echo "$SOABI" >&6; }
13592
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13594$as_echo_n "checking LDVERSION... " >&6; }
13595LDVERSION='$(VERSION)$(ABIFLAGS)'
13596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13597$as_echo "$LDVERSION" >&6; }
13598
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013599# SO is the extension of shared libraries `(including the dot!)
13600# -- usually .so, .sl on HP-UX, .dll on Cygwin
13601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13602$as_echo_n "checking SO... " >&6; }
13603if test -z "$SO"
13604then
13605 case $ac_sys_system in
13606 hp*|HP*)
13607 case `uname -m` in
13608 ia64) SO=.so;;
13609 *) SO=.sl;;
13610 esac
13611 ;;
13612 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013613 Linux*|GNU*)
13614 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013615 *) SO=.so;;
13616 esac
13617else
13618 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013619 echo
13620 echo '====================================================================='
13621 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013622 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013623 echo '+ Do you really mean to change the extension for shared libraries? +'
13624 echo '+ Continuing in 10 seconds to let you to ponder. +'
13625 echo '+ +'
13626 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013627 sleep 10
13628fi
13629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13630$as_echo "$SO" >&6; }
13631
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013632# Check whether right shifting a negative integer extends the sign bit
13633# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13635$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013636if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013641 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013644/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013645
13646int main()
13647{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013648 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013649}
13650
Martin v. Löwis11437992002-04-12 09:54:03 +000013651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013652if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013653 ac_cv_rshift_extends_sign=yes
13654else
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013659fi
13660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013661fi
13662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13664$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013665if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013666then
Martin v. Löwis11437992002-04-12 09:54:03 +000013667
Matthias Kloseb9621712010-04-24 17:59:49 +000013668$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013669
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013670fi
13671
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013672# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13674$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013675if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013677else
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
Matthias Kloseb9621712010-04-24 17:59:49 +000013679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013680/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013681#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013682int
13683main ()
13684{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013685
13686 FILE *f = fopen("/dev/null", "r");
13687 flockfile(f);
13688 getc_unlocked(f);
13689 funlockfile(f);
13690
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 ;
13692 return 0;
13693}
13694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013696 ac_cv_have_getc_unlocked=yes
13697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 ac_cv_have_getc_unlocked=no
13699fi
13700rm -f core conftest.err conftest.$ac_objext \
13701 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13705$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013706if test "$ac_cv_have_getc_unlocked" = yes
13707then
Martin v. Löwis11437992002-04-12 09:54:03 +000013708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013710
13711fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013712
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013713# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013714# save the value of LIBS so we don't actually link Python with readline
13715LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013716
Gregory P. Smith18820942008-09-07 06:24:49 +000013717# On some systems we need to link readline to a termcap compatible
13718# library. NOTE: Keep the precedence of listed libraries synchronised
13719# with setup.py.
13720py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13722$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013723for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013724 if test -z "$py_libtermcap"; then
13725 READLINE_LIBS="-lreadline"
13726 else
13727 READLINE_LIBS="-lreadline -l$py_libtermcap"
13728 fi
13729 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013731/* end confdefs.h. */
13732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013733/* Override any GCC internal prototype to avoid an error.
13734 Use char because int might match the return type of a GCC
13735 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013736#ifdef __cplusplus
13737extern "C"
13738#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013739char readline ();
13740int
13741main ()
13742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013744 ;
13745 return 0;
13746}
13747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013749 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013751rm -f core conftest.err conftest.$ac_objext \
13752 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013753 if test $py_cv_lib_readline = yes; then
13754 break
13755 fi
13756done
13757# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13758#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013759if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13761$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13764$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013767
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013768fi
13769
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013770# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13772$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013773if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013774 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013775else
13776 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013777LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013779/* end confdefs.h. */
13780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781/* Override any GCC internal prototype to avoid an error.
13782 Use char because int might match the return type of a GCC
13783 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013784#ifdef __cplusplus
13785extern "C"
13786#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013787char rl_callback_handler_install ();
13788int
13789main ()
13790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013791return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013792 ;
13793 return 0;
13794}
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013797 ac_cv_lib_readline_rl_callback_handler_install=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013803LIBS=$ac_check_lib_save_LIBS
13804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13806$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013810
13811fi
13812
13813
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013814# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013816/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013817#include <readline/readline.h>
13818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013819if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013820 have_readline=yes
13821else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013822 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013823
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013824fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013825rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013826if test $have_readline = yes
13827then
Matthias Kloseb9621712010-04-24 17:59:49 +000013828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013829/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013830#include <readline/readline.h>
13831
13832_ACEOF
13833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013837
13838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013839rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013840
Matthias Kloseb9621712010-04-24 17:59:49 +000013841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013842/* end confdefs.h. */
13843#include <readline/readline.h>
13844
13845_ACEOF
13846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013848
Matthias Kloseb9621712010-04-24 17:59:49 +000013849$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013850
13851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013852rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013853
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013854fi
13855
Martin v. Löwis0daad592001-09-30 21:09:59 +000013856# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13858$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013859if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013861else
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013863LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867/* Override any GCC internal prototype to avoid an error.
13868 Use char because int might match the return type of a GCC
13869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013870#ifdef __cplusplus
13871extern "C"
13872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013873char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013884else
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013887rm -f core conftest.err conftest.$ac_objext \
13888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013889LIBS=$ac_check_lib_save_LIBS
13890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13892$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013893if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013896
Martin v. Löwis0daad592001-09-30 21:09:59 +000013897fi
13898
Michael W. Hudson54241132001-12-07 15:38:26 +000013899
Thomas Wouters89d996e2007-09-08 17:39:28 +000013900# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13902$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013903if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013905else
13906 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013907LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013909/* end confdefs.h. */
13910
13911/* Override any GCC internal prototype to avoid an error.
13912 Use char because int might match the return type of a GCC
13913 builtin and then its argument prototype would still apply. */
13914#ifdef __cplusplus
13915extern "C"
13916#endif
13917char rl_completion_display_matches_hook ();
13918int
13919main ()
13920{
13921return rl_completion_display_matches_hook ();
13922 ;
13923 return 0;
13924}
13925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013927 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013931rm -f core conftest.err conftest.$ac_objext \
13932 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013933LIBS=$ac_check_lib_save_LIBS
13934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13936$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013937if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013940
13941fi
13942
13943
Martin v. Löwis0daad592001-09-30 21:09:59 +000013944# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13946$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013947if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013949else
Martin v. Löwis11437992002-04-12 09:54:03 +000013950 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013951LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955/* Override any GCC internal prototype to avoid an error.
13956 Use char because int might match the return type of a GCC
13957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013958#ifdef __cplusplus
13959extern "C"
13960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013961char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013962int
13963main ()
13964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013966 ;
13967 return 0;
13968}
13969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013971 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013972else
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013975rm -f core conftest.err conftest.$ac_objext \
13976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013977LIBS=$ac_check_lib_save_LIBS
13978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13980$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013981if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013982
Matthias Kloseb9621712010-04-24 17:59:49 +000013983$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013984
Guido van Rossum353ae582001-07-10 16:45:32 +000013985fi
13986
Jack Jansendd19cf82001-12-06 22:36:17 +000013987
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013988# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013990/* end confdefs.h. */
13991#include <readline/readline.h>
13992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013994 have_readline=yes
13995else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013996 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013997
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013998fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013999rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014000if test $have_readline = yes
14001then
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014003/* end confdefs.h. */
14004#include <readline/readline.h>
14005
14006_ACEOF
14007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014009
Matthias Kloseb9621712010-04-24 17:59:49 +000014010$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014011
14012fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014013rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014014
14015fi
14016
Martin v. Löwis82bca632006-02-10 20:49:30 +000014017# End of readline checks: restore LIBS
14018LIBS=$LIBS_no_readline
14019
Matthias Kloseb9621712010-04-24 17:59:49 +000014020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14021$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014022if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014024else
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014027 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014030/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014031
14032int main()
14033{
14034 int val1 = nice(1);
14035 if (val1 != -1 && val1 == nice(2))
14036 exit(0);
14037 exit(1);
14038}
14039
Martin v. Löwis11437992002-04-12 09:54:03 +000014040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014041if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014042 ac_cv_broken_nice=yes
14043else
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014046rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14047 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014048fi
14049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050fi
14051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14053$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014054if test "$ac_cv_broken_nice" = yes
14055then
Martin v. Löwis11437992002-04-12 09:54:03 +000014056
Matthias Kloseb9621712010-04-24 17:59:49 +000014057$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014058
14059fi
14060
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14062$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014063if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014065else
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014067 ac_cv_broken_poll=no
14068else
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014070/* end confdefs.h. */
14071
14072#include <poll.h>
14073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014074int main()
14075{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014076 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014078
14079 close (42);
14080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014081 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014082 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014083 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014084 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014085 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014086 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014087 return 1;
14088}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014089
14090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014091if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014092 ac_cv_broken_poll=yes
14093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014099
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014100fi
14101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14103$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014104if test "$ac_cv_broken_poll" = yes
14105then
14106
Matthias Kloseb9621712010-04-24 17:59:49 +000014107$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014108
14109fi
14110
Brett Cannon43802422005-02-10 20:48:03 +000014111# 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 +000014112# (which is not required by ISO C or UNIX spec) and/or if we support
14113# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014114ac_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 +000014115#include <$ac_cv_struct_tm>
14116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117"
Victor Stinnere0be4232011-10-25 13:06:09 +020014118if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014119
14120cat >>confdefs.h <<_ACEOF
14121#define HAVE_STRUCT_TM_TM_ZONE 1
14122_ACEOF
14123
14124
14125fi
14126
14127if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14128
Matthias Kloseb9621712010-04-24 17:59:49 +000014129$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014130
14131else
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14133"
Victor Stinnere0be4232011-10-25 13:06:09 +020014134if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136else
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138fi
14139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014141#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142_ACEOF
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14145$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014146if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148else
Matthias Kloseb9621712010-04-24 17:59:49 +000014149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014150/* end confdefs.h. */
14151#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152#if !HAVE_DECL_TZNAME
14153extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014154#endif
14155
14156int
14157main ()
14158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014160 ;
14161 return 0;
14162}
14163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014164if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014165 ac_cv_var_tzname=yes
14166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014169rm -f core conftest.err conftest.$ac_objext \
14170 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14173$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014174 if test $ac_cv_var_tzname = yes; then
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014177
14178 fi
14179fi
14180
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014181
Martin v. Löwis1d459062005-03-14 21:23:33 +000014182# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14184$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014185if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014187else
14188
Matthias Kloseb9621712010-04-24 17:59:49 +000014189if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014190 ac_cv_working_tzset=no
14191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014193/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014194
14195#include <stdlib.h>
14196#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014197#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014198
14199#if HAVE_TZNAME
14200extern char *tzname[];
14201#endif
14202
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014203int main()
14204{
Brett Cannon18367812003-09-19 00:59:16 +000014205 /* Note that we need to ensure that not only does tzset(3)
14206 do 'something' with localtime, but it works as documented
14207 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014208 This includes making sure that tzname is set properly if
14209 tm->tm_zone does not exist since it is the alternative way
14210 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014211
14212 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014213 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014214 */
14215
Martin v. Löwis1d459062005-03-14 21:23:33 +000014216 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014217 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14218
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014219 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014220 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014221 if (localtime(&groundhogday)->tm_hour != 0)
14222 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014223#if HAVE_TZNAME
14224 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14225 if (strcmp(tzname[0], "UTC") ||
14226 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14227 exit(1);
14228#endif
Brett Cannon18367812003-09-19 00:59:16 +000014229
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014230 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014231 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014232 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014233 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014234#if HAVE_TZNAME
14235 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14236 exit(1);
14237#endif
Brett Cannon18367812003-09-19 00:59:16 +000014238
14239 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14240 tzset();
14241 if (localtime(&groundhogday)->tm_hour != 11)
14242 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014243#if HAVE_TZNAME
14244 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14245 exit(1);
14246#endif
14247
14248#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014249 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14250 exit(1);
14251 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14252 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014253#endif
Brett Cannon18367812003-09-19 00:59:16 +000014254
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014255 exit(0);
14256}
14257
14258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014259if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014260 ac_cv_working_tzset=yes
14261else
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014266fi
14267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014268fi
14269
Matthias Kloseb9621712010-04-24 17:59:49 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14271$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014272if test "$ac_cv_working_tzset" = yes
14273then
14274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014276
14277fi
14278
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014279# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14281$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014282if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014286/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014287#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014288int
14289main ()
14290{
14291
14292struct stat st;
14293st.st_mtim.tv_nsec = 1;
14294
14295 ;
14296 return 0;
14297}
14298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014299if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014300 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014301else
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14305fi
14306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14308$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014309if test "$ac_cv_stat_tv_nsec" = yes
14310then
14311
Matthias Kloseb9621712010-04-24 17:59:49 +000014312$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014313
14314fi
14315
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014316# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14318$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014319if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014321else
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014323/* end confdefs.h. */
14324#include <sys/stat.h>
14325int
14326main ()
14327{
14328
14329struct stat st;
14330st.st_mtimespec.tv_nsec = 1;
14331
14332 ;
14333 return 0;
14334}
14335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014337 ac_cv_stat_tv_nsec2=yes
14338else
Matthias Kloseb9621712010-04-24 17:59:49 +000014339 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14342fi
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14345$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014346if test "$ac_cv_stat_tv_nsec2" = yes
14347then
14348
Matthias Kloseb9621712010-04-24 17:59:49 +000014349$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014350
14351fi
14352
Jack Jansen666b1e72001-10-31 12:11:48 +000014353# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14355$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014356if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014358else
Matthias Kloseb9621712010-04-24 17:59:49 +000014359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014360/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014361#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014362int
14363main ()
14364{
Jack Jansen666b1e72001-10-31 12:11:48 +000014365
14366 int rtn;
14367 rtn = mvwdelch(0,0,0);
14368
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 ;
14370 return 0;
14371}
14372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014373if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014374 ac_cv_mvwdelch_is_expression=yes
14375else
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14379fi
14380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14382$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014383
14384if test "$ac_cv_mvwdelch_is_expression" = yes
14385then
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Matthias Kloseb9621712010-04-24 17:59:49 +000014387$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014388
14389fi
14390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14392$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014393if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014395else
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014397/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014398#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014399int
14400main ()
14401{
Jack Jansen666b1e72001-10-31 12:11:48 +000014402
14403 WINDOW *w;
14404 w->_flags = 0;
14405
Martin v. Löwis11437992002-04-12 09:54:03 +000014406 ;
14407 return 0;
14408}
14409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014410if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014411 ac_cv_window_has_flags=yes
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14416fi
14417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14419$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014420
Jack Jansen666b1e72001-10-31 12:11:48 +000014421
14422if test "$ac_cv_window_has_flags" = yes
14423then
Martin v. Löwis11437992002-04-12 09:54:03 +000014424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014426
14427fi
14428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14430$as_echo_n "checking for is_term_resized... " >&6; }
14431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014432/* end confdefs.h. */
14433#include <curses.h>
14434int
14435main ()
14436{
14437void *x=is_term_resized
14438 ;
14439 return 0;
14440}
14441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014445
Matthias Kloseb159a552010-04-25 21:00:44 +000014446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014447$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014448else
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14450$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014451
14452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14454
Matthias Kloseb9621712010-04-24 17:59:49 +000014455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14456$as_echo_n "checking for resize_term... " >&6; }
14457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014458/* end confdefs.h. */
14459#include <curses.h>
14460int
14461main ()
14462{
14463void *x=resize_term
14464 ;
14465 return 0;
14466}
14467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014468if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014471
Matthias Kloseb159a552010-04-25 21:00:44 +000014472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014473$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14476$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014477
14478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14482$as_echo_n "checking for resizeterm... " >&6; }
14483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014484/* end confdefs.h. */
14485#include <curses.h>
14486int
14487main ()
14488{
14489void *x=resizeterm
14490 ;
14491 return 0;
14492}
14493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014497
Matthias Kloseb159a552010-04-25 21:00:44 +000014498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014499$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014500else
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14502$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014503
14504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14506
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14508$as_echo "$as_me: checking for device files" >&6;}
14509
14510if test "x$cross_compiling" = xyes; then
14511 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14513$as_echo_n "checking for /dev/ptmx... " >&6; }
14514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14515$as_echo "not set" >&6; }
14516 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14517 fi
14518 if test "${ac_cv_file__dev_ptc+set}" != set; then
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14520$as_echo_n "checking for /dev/ptc... " >&6; }
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14522$as_echo "not set" >&6; }
14523 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14524 fi
14525fi
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14528$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014529if ${ac_cv_file__dev_ptmx+:} false; then :
14530 $as_echo_n "(cached) " >&6
14531else
14532 test "$cross_compiling" = yes &&
14533 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14534if test -r "/dev/ptmx"; then
14535 ac_cv_file__dev_ptmx=yes
14536else
14537 ac_cv_file__dev_ptmx=no
14538fi
14539fi
14540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14541$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14542if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014543
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014544fi
14545
14546if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014549
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14552$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014553if ${ac_cv_file__dev_ptc+:} false; then :
14554 $as_echo_n "(cached) " >&6
14555else
14556 test "$cross_compiling" = yes &&
14557 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14558if test -r "/dev/ptc"; then
14559 ac_cv_file__dev_ptc=yes
14560else
14561 ac_cv_file__dev_ptc=no
14562fi
14563fi
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14565$as_echo "$ac_cv_file__dev_ptc" >&6; }
14566if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014567
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014568fi
14569
14570if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014573
Neal Norwitz865400f2003-03-21 01:42:58 +000014574fi
14575
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014576if test "$have_long_long" = yes
14577then
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14579$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014580 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014582else
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014584 ac_cv_have_long_long_format="cross -- assuming no"
14585 if test x$GCC = xyes; then
14586 save_CFLAGS=$CFLAGS
14587 CFLAGS="$CFLAGS -Werror -Wformat"
14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14589/* end confdefs.h. */
14590
14591 #include <stdio.h>
14592 #include <stddef.h>
14593
14594int
14595main ()
14596{
14597
14598 char *buffer;
14599 sprintf(buffer, "%lld", (long long)123);
14600 sprintf(buffer, "%lld", (long long)-123);
14601 sprintf(buffer, "%llu", (unsigned long long)123);
14602
14603 ;
14604 return 0;
14605}
14606_ACEOF
14607if ac_fn_c_try_compile "$LINENO"; then :
14608 ac_cv_have_long_long_format=yes
14609
14610fi
14611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14612 CFLAGS=$save_CFLAGS
14613 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014614else
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014616/* end confdefs.h. */
14617
14618 #include <stdio.h>
14619 #include <stddef.h>
14620 #include <string.h>
14621
14622 #ifdef HAVE_SYS_TYPES_H
14623 #include <sys/types.h>
14624 #endif
14625
14626 int main()
14627 {
14628 char buffer[256];
14629
14630 if (sprintf(buffer, "%lld", (long long)123) < 0)
14631 return 1;
14632 if (strcmp(buffer, "123"))
14633 return 1;
14634
14635 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14636 return 1;
14637 if (strcmp(buffer, "-123"))
14638 return 1;
14639
14640 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14641 return 1;
14642 if (strcmp(buffer, "123"))
14643 return 1;
14644
14645 return 0;
14646 }
14647
14648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014650 ac_cv_have_long_long_format=yes
14651else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014656fi
14657
14658
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014659fi
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14662$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014663fi
14664
Mark Dickinson89d7d412009-12-31 20:50:59 +000014665if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014666then
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014669
14670fi
14671
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014672if test $ac_sys_system = Darwin
14673then
14674 LIBS="$LIBS -framework CoreFoundation"
14675fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14678$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014679if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014681else
Matthias Kloseb9621712010-04-24 17:59:49 +000014682 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014683 ac_cv_have_size_t_format="cross -- assuming yes"
14684
Thomas Wouters477c8d52006-05-27 19:21:47 +000014685else
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014687/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014688
Thomas Wouters477c8d52006-05-27 19:21:47 +000014689#include <stdio.h>
14690#include <stddef.h>
14691#include <string.h>
14692
Christian Heimes2c181612007-12-17 20:04:13 +000014693#ifdef HAVE_SYS_TYPES_H
14694#include <sys/types.h>
14695#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014696
14697#ifdef HAVE_SSIZE_T
14698typedef ssize_t Py_ssize_t;
14699#elif SIZEOF_VOID_P == SIZEOF_LONG
14700typedef long Py_ssize_t;
14701#else
14702typedef int Py_ssize_t;
14703#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014704
Christian Heimes2c181612007-12-17 20:04:13 +000014705int main()
14706{
14707 char buffer[256];
14708
Thomas Wouters477c8d52006-05-27 19:21:47 +000014709 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14710 return 1;
14711
Thomas Wouters89f507f2006-12-13 04:49:30 +000014712 if (strcmp(buffer, "123"))
14713 return 1;
14714
14715 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14716 return 1;
14717
14718 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014719 return 1;
14720
14721 return 0;
14722}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014723
Thomas Wouters477c8d52006-05-27 19:21:47 +000014724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014725if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014726 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014727else
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014732fi
14733
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14736$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014737if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014740
14741fi
14742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014744#ifdef HAVE_SYS_TYPES_H
14745#include <sys/types.h>
14746#endif
14747#ifdef HAVE_SYS_SOCKET_H
14748#include <sys/socket.h>
14749#endif
14750
Matthias Kloseb9621712010-04-24 17:59:49 +000014751"
Victor Stinnere0be4232011-10-25 13:06:09 +020014752if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014755
Matthias Kloseb9621712010-04-24 17:59:49 +000014756$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014757
14758fi
14759
Michael W. Hudson54241132001-12-07 15:38:26 +000014760
Matthias Kloseb9621712010-04-24 17:59:49 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14762$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014763if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014765else
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014767 ac_cv_broken_mbstowcs=no
14768else
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014770/* end confdefs.h. */
14771
14772#include<stdlib.h>
14773int main() {
14774 size_t len = -1;
14775 const char *str = "text";
14776 len = mbstowcs(NULL, str, 0);
14777 return (len != 4);
14778}
14779
14780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014781if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014782 ac_cv_broken_mbstowcs=no
14783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014788fi
14789
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014790fi
14791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14793$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014794if test "$ac_cv_broken_mbstowcs" = yes
14795then
14796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014798
14799fi
14800
Antoine Pitroub52ec782009-01-25 16:34:23 +000014801# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14803$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014804
14805# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014806if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014807 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014808if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014809then
14810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014812
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14814$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014815fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014816if test "$withval" = no
14817then
14818
14819$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14822$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014823fi
14824
Antoine Pitrou042b1282010-08-13 21:15:58 +000014825else
14826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14827$as_echo "no value specified" >&6; }
14828fi
14829
Antoine Pitroub52ec782009-01-25 16:34:23 +000014830
Matthias Kloseb17289e2012-03-15 19:51:34 +010014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14832$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14833if ${ac_cv_computed_gotos+:} false; then :
14834 $as_echo_n "(cached) " >&6
14835else
14836 if test "$cross_compiling" = yes; then :
14837 if test "${with_computed_gotos+set}" = set; then
14838 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14839 else
14840 ac_cv_computed_gotos=no
14841 fi
14842else
14843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14844/* end confdefs.h. */
14845
14846int main(int argc, char **argv)
14847{
14848 static void *targets[1] = { &&LABEL1 };
14849 goto LABEL2;
14850LABEL1:
14851 return 0;
14852LABEL2:
14853 goto *targets[0];
14854 return 1;
14855}
14856
14857_ACEOF
14858if ac_fn_c_try_run "$LINENO"; then :
14859 ac_cv_computed_gotos=yes
14860else
14861 ac_cv_computed_gotos=no
14862fi
14863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14864 conftest.$ac_objext conftest.beam conftest.$ac_ext
14865fi
14866
14867fi
14868
14869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14870$as_echo "$ac_cv_computed_gotos" >&6; }
14871case "$ac_cv_computed_gotos" in yes*)
14872
14873$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14874
14875esac
14876
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014877case $ac_sys_system in
14878AIX*)
14879
14880$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14881 ;;
14882esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014883
Michael W. Hudson54241132001-12-07 15:38:26 +000014884
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014885
14886
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014887for h in `(cd $srcdir;echo Python/thread_*.h)`
14888do
14889 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14890done
14891
Michael W. Hudson54241132001-12-07 15:38:26 +000014892
Neal Norwitzd24499d2005-12-18 21:36:39 +000014893SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14895$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014896for dir in $SRCDIRS; do
14897 if test ! -d $dir; then
14898 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014899 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014900done
Matthias Kloseb9621712010-04-24 17:59:49 +000014901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14902$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014903
Stefan Krah1919b7e2012-03-21 18:25:23 +010014904# Availability of -O2:
14905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14906$as_echo_n "checking for -O2... " >&6; }
14907saved_cflags="$CFLAGS"
14908CFLAGS="-O2"
14909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910/* end confdefs.h. */
14911
14912int
14913main ()
14914{
14915
14916
14917 ;
14918 return 0;
14919}
14920_ACEOF
14921if ac_fn_c_try_compile "$LINENO"; then :
14922 have_O2=yes
14923else
14924 have_O2=no
14925fi
14926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14928$as_echo "$have_O2" >&6; }
14929CFLAGS="$saved_cflags"
14930
14931# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14932# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14934$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14935saved_cflags="$CFLAGS"
14936CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14937if test "$have_O2" = no; then
14938 CFLAGS=""
14939fi
14940if test "$cross_compiling" = yes; then :
14941 have_glibc_memmove_bug=undefined
14942else
14943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14944/* end confdefs.h. */
14945
14946#include <stdio.h>
14947#include <stdlib.h>
14948#include <string.h>
14949void foo(void *p, void *q) { memmove(p, q, 19); }
14950int main() {
14951 char a[32] = "123456789000000000";
14952 foo(&a[9], a);
14953 if (strcmp(a, "123456789123456789000000000") != 0)
14954 return 1;
14955 foo(a, &a[9]);
14956 if (strcmp(a, "123456789000000000") != 0)
14957 return 1;
14958 return 0;
14959}
14960
14961_ACEOF
14962if ac_fn_c_try_run "$LINENO"; then :
14963 have_glibc_memmove_bug=no
14964else
14965 have_glibc_memmove_bug=yes
14966fi
14967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14968 conftest.$ac_objext conftest.beam conftest.$ac_ext
14969fi
14970
14971CFLAGS="$saved_cflags"
14972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14973$as_echo "$have_glibc_memmove_bug" >&6; }
14974if test "$have_glibc_memmove_bug" = yes; then
14975
14976$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14977
14978fi
14979
14980if test "$have_gcc_asm_for_x87" = yes; then
14981 # Some versions of gcc miscompile inline asm:
14982 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14983 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14984 case $CC in
14985 *gcc*)
14986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14987$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14988 saved_cflags="$CFLAGS"
14989 CFLAGS="-O2"
14990 if test "$cross_compiling" = yes; then :
14991 have_ipa_pure_const_bug=undefined
14992else
14993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14994/* end confdefs.h. */
14995
14996 __attribute__((noinline)) int
14997 foo(int *p) {
14998 int r;
14999 asm ( "movl \$6, (%1)\n\t"
15000 "xorl %0, %0\n\t"
15001 : "=r" (r) : "r" (p) : "memory"
15002 );
15003 return r;
15004 }
15005 int main() {
15006 int p = 8;
15007 if ((foo(&p) ? : p) != 6)
15008 return 1;
15009 return 0;
15010 }
15011
15012_ACEOF
15013if ac_fn_c_try_run "$LINENO"; then :
15014 have_ipa_pure_const_bug=no
15015else
15016 have_ipa_pure_const_bug=yes
15017fi
15018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15019 conftest.$ac_objext conftest.beam conftest.$ac_ext
15020fi
15021
15022 CFLAGS="$saved_cflags"
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15024$as_echo "$have_ipa_pure_const_bug" >&6; }
15025 if test "$have_ipa_pure_const_bug" = yes; then
15026
15027$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15028
15029 fi
15030 ;;
15031 esac
15032fi
15033
Guido van Rossum627b2d71993-12-24 10:39:16 +000015034# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015035ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015036
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015037ac_config_files="$ac_config_files Modules/ld_so_aix"
15038
Martin v. Löwis11437992002-04-12 09:54:03 +000015039cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015040# This file is a shell script that caches the results of configure
15041# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015042# scripts and configure runs, see configure's option --config-cache.
15043# It is not useful on other systems. If it contains results you don't
15044# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015045#
Martin v. Löwis11437992002-04-12 09:54:03 +000015046# config.status only pays attention to the cache file if you give it
15047# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015048#
Skip Montanaro6dead952003-09-25 14:50:04 +000015049# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015050# loading this file, other *unset* `ac_cv_foo' will be assigned the
15051# following values.
15052
15053_ACEOF
15054
Guido van Rossumf78abae1997-01-21 22:02:36 +000015055# The following way of writing the cache mishandles newlines in values,
15056# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015058# Ultrix sh set writes to stderr and can't be redirected directly,
15059# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060(
15061 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15062 eval ac_val=\$$ac_var
15063 case $ac_val in #(
15064 *${as_nl}*)
15065 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15067$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015068 esac
15069 case $ac_var in #(
15070 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015071 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15072 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015073 esac ;;
15074 esac
15075 done
15076
Martin v. Löwis11437992002-04-12 09:54:03 +000015077 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15079 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 # `set' does not quote correctly, so add quotes: double-quote
15081 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015083 "s/'/'\\\\''/g;
15084 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 *)
15087 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090 esac |
15091 sort
15092) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015094 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015096 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15098 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015099 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15100 :end' >>confcache
15101if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15102 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015103 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15105$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015106 if test ! -f "$cache_file" || test -h "$cache_file"; then
15107 cat confcache >"$cache_file"
15108 else
15109 case $cache_file in #(
15110 */* | ?:*)
15111 mv -f confcache "$cache_file"$$ &&
15112 mv -f "$cache_file"$$ "$cache_file" ;; #(
15113 *)
15114 mv -f confcache "$cache_file" ;;
15115 esac
15116 fi
15117 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015118 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15120$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015121 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015122fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015123rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015124
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015125test "x$prefix" = xNONE && prefix=$ac_default_prefix
15126# Let make expand exec_prefix.
15127test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015128
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015129DEFS=-DHAVE_CONFIG_H
15130
Skip Montanaro6dead952003-09-25 14:50:04 +000015131ac_libobjs=
15132ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015133U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015134for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15135 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015138 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15139 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15141 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015142done
15143LIBOBJS=$ac_libobjs
15144
15145LTLIBOBJS=$ac_ltlibobjs
15146
15147
Martin v. Löwis11437992002-04-12 09:54:03 +000015148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149
Victor Stinnere0be4232011-10-25 13:06:09 +020015150: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015151ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015152ac_clean_files_save=$ac_clean_files
15153ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15155$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15156as_write_fail=0
15157cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015158#! $SHELL
15159# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015160# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015161# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015162# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015163
Martin v. Löwis11437992002-04-12 09:54:03 +000015164debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015165ac_cs_recheck=false
15166ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015167
Matthias Kloseb9621712010-04-24 17:59:49 +000015168SHELL=\${CONFIG_SHELL-$SHELL}
15169export SHELL
15170_ASEOF
15171cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15172## -------------------- ##
15173## M4sh Initialization. ##
15174## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176# Be more Bourne compatible
15177DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015178if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 emulate sh
15180 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015182 # is contrary to our usage. Disable this feature.
15183 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015185else
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 case `(set -o) 2>/dev/null` in #(
15187 *posix*) :
15188 set -o posix ;; #(
15189 *) :
15190 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015192fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015193
15194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195as_nl='
15196'
15197export as_nl
15198# Printing a long string crashes Solaris 7 /usr/bin/printf.
15199as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15200as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15201as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15202# Prefer a ksh shell builtin over an external printf program on Solaris,
15203# but without wasting forks for bash or zsh.
15204if test -z "$BASH_VERSION$ZSH_VERSION" \
15205 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15206 as_echo='print -r --'
15207 as_echo_n='print -rn --'
15208elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15209 as_echo='printf %s\n'
15210 as_echo_n='printf %s'
15211else
15212 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15213 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15214 as_echo_n='/usr/ucb/echo -n'
15215 else
15216 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15217 as_echo_n_body='eval
15218 arg=$1;
15219 case $arg in #(
15220 *"$as_nl"*)
15221 expr "X$arg" : "X\\(.*\\)$as_nl";
15222 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15223 esac;
15224 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15225 '
15226 export as_echo_n_body
15227 as_echo_n='sh -c $as_echo_n_body as_echo'
15228 fi
15229 export as_echo_body
15230 as_echo='sh -c $as_echo_body as_echo'
15231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015232
15233# The user is always right.
15234if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 PATH_SEPARATOR=:
15236 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15237 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15238 PATH_SEPARATOR=';'
15239 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242
15243# IFS
15244# We need space, tab and new line, in precisely that order. Quoting is
15245# there to prevent editors from complaining about space-tab.
15246# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15247# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248IFS=" "" $as_nl"
15249
15250# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015251as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015252case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253 *[\\/]* ) as_myself=$0 ;;
15254 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015255for as_dir in $PATH
15256do
15257 IFS=$as_save_IFS
15258 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15260 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263 ;;
15264esac
15265# We did not find ourselves, most probably we were run as `sh COMMAND'
15266# in which case we are not to be found in the path.
15267if test "x$as_myself" = x; then
15268 as_myself=$0
15269fi
15270if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15272 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273fi
15274
Matthias Kloseb9621712010-04-24 17:59:49 +000015275# Unset variables that we do not need and which cause bugs (e.g. in
15276# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15277# suppresses any "Segmentation fault" message there. '((' could
15278# trigger a bug in pdksh 5.2.14.
15279for as_var in BASH_ENV ENV MAIL MAILPATH
15280do eval test x\${$as_var+set} = xset \
15281 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282done
15283PS1='$ '
15284PS2='> '
15285PS4='+ '
15286
15287# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015288LC_ALL=C
15289export LC_ALL
15290LANGUAGE=C
15291export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293# CDPATH.
15294(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15295
15296
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015297# as_fn_error STATUS ERROR [LINENO LOG_FD]
15298# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015299# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15300# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015301# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015302as_fn_error ()
15303{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015304 as_status=$1; test $as_status -eq 0 && as_status=1
15305 if test "$4"; then
15306 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15307 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015309 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 as_fn_exit $as_status
15311} # as_fn_error
15312
15313
15314# as_fn_set_status STATUS
15315# -----------------------
15316# Set $? to STATUS, without forking.
15317as_fn_set_status ()
15318{
15319 return $1
15320} # as_fn_set_status
15321
15322# as_fn_exit STATUS
15323# -----------------
15324# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15325as_fn_exit ()
15326{
15327 set +e
15328 as_fn_set_status $1
15329 exit $1
15330} # as_fn_exit
15331
15332# as_fn_unset VAR
15333# ---------------
15334# Portably unset VAR.
15335as_fn_unset ()
15336{
15337 { eval $1=; unset $1;}
15338}
15339as_unset=as_fn_unset
15340# as_fn_append VAR VALUE
15341# ----------------------
15342# Append the text in VALUE to the end of the definition contained in VAR. Take
15343# advantage of any shell optimizations that allow amortized linear growth over
15344# repeated appends, instead of the typical quadratic growth present in naive
15345# implementations.
15346if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15347 eval 'as_fn_append ()
15348 {
15349 eval $1+=\$2
15350 }'
15351else
15352 as_fn_append ()
15353 {
15354 eval $1=\$$1\$2
15355 }
15356fi # as_fn_append
15357
15358# as_fn_arith ARG...
15359# ------------------
15360# Perform arithmetic evaluation on the ARGs, and store the result in the
15361# global $as_val. Take advantage of shells that can avoid forks. The arguments
15362# must be portable across $(()) and expr.
15363if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15364 eval 'as_fn_arith ()
15365 {
15366 as_val=$(( $* ))
15367 }'
15368else
15369 as_fn_arith ()
15370 {
15371 as_val=`expr "$@" || test $? -eq 1`
15372 }
15373fi # as_fn_arith
15374
15375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376if expr a : '\(a\)' >/dev/null 2>&1 &&
15377 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15378 as_expr=expr
15379else
15380 as_expr=false
15381fi
15382
15383if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15384 as_basename=basename
15385else
15386 as_basename=false
15387fi
15388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15390 as_dirname=dirname
15391else
15392 as_dirname=false
15393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015395as_me=`$as_basename -- "$0" ||
15396$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15397 X"$0" : 'X\(//\)$' \| \
15398 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015399$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400 sed '/^.*\/\([^/][^/]*\)\/*$/{
15401 s//\1/
15402 q
15403 }
15404 /^X\/\(\/\/\)$/{
15405 s//\1/
15406 q
15407 }
15408 /^X\/\(\/\).*/{
15409 s//\1/
15410 q
15411 }
15412 s/.*/./; q'`
15413
Matthias Kloseb9621712010-04-24 17:59:49 +000015414# Avoid depending upon Character Ranges.
15415as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15416as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15417as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15418as_cr_digits='0123456789'
15419as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015420
15421ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015422case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 xy) ECHO_C='\c';;
15427 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15428 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 esac;;
15430*)
15431 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015433
Martin v. Löwis11437992002-04-12 09:54:03 +000015434rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435if test -d conf$$.dir; then
15436 rm -f conf$$.dir/conf$$.file
15437else
15438 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015441if (echo >conf$$.file) 2>/dev/null; then
15442 if ln -s conf$$.file conf$$ 2>/dev/null; then
15443 as_ln_s='ln -s'
15444 # ... but there are two gotchas:
15445 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15446 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015447 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015449 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 elif ln conf$$.file conf$$ 2>/dev/null; then
15451 as_ln_s=ln
15452 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015453 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015455else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015456 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15459rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461
15462# as_fn_mkdir_p
15463# -------------
15464# Create "$as_dir" as a directory, including parents if necessary.
15465as_fn_mkdir_p ()
15466{
15467
15468 case $as_dir in #(
15469 -*) as_dir=./$as_dir;;
15470 esac
15471 test -d "$as_dir" || eval $as_mkdir_p || {
15472 as_dirs=
15473 while :; do
15474 case $as_dir in #(
15475 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15476 *) as_qdir=$as_dir;;
15477 esac
15478 as_dirs="'$as_qdir' $as_dirs"
15479 as_dir=`$as_dirname -- "$as_dir" ||
15480$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15481 X"$as_dir" : 'X\(//\)[^/]' \| \
15482 X"$as_dir" : 'X\(//\)$' \| \
15483 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15484$as_echo X"$as_dir" |
15485 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15486 s//\1/
15487 q
15488 }
15489 /^X\(\/\/\)[^/].*/{
15490 s//\1/
15491 q
15492 }
15493 /^X\(\/\/\)$/{
15494 s//\1/
15495 q
15496 }
15497 /^X\(\/\).*/{
15498 s//\1/
15499 q
15500 }
15501 s/.*/./; q'`
15502 test -d "$as_dir" && break
15503 done
15504 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015505 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015506
15507
15508} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015509if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015511else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015512 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015513 as_mkdir_p=false
15514fi
15515
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015516if test -x / >/dev/null 2>&1; then
15517 as_test_x='test -x'
15518else
15519 if ls -dL / >/dev/null 2>&1; then
15520 as_ls_L_option=L
15521 else
15522 as_ls_L_option=
15523 fi
15524 as_test_x='
15525 eval sh -c '\''
15526 if test -d "$1"; then
15527 test -d "$1/.";
15528 else
15529 case $1 in #(
15530 -*)set "./$1";;
15531 esac;
15532 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15533 ???[sx]*):;;*)false;;esac;fi
15534 '\'' sh
15535 '
15536fi
15537as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015538
15539# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015540as_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 +000015541
15542# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015543as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
15545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015547## ----------------------------------- ##
15548## Main body of $CONFIG_STATUS script. ##
15549## ----------------------------------- ##
15550_ASEOF
15551test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015552
Matthias Kloseb9621712010-04-24 17:59:49 +000015553cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15554# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015555# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556# values after options handling.
15557ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015558This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015559generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015560
15561 CONFIG_FILES = $CONFIG_FILES
15562 CONFIG_HEADERS = $CONFIG_HEADERS
15563 CONFIG_LINKS = $CONFIG_LINKS
15564 CONFIG_COMMANDS = $CONFIG_COMMANDS
15565 $ $0 $@
15566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567on `(hostname || uname -n) 2>/dev/null | sed 1q`
15568"
15569
Martin v. Löwis11437992002-04-12 09:54:03 +000015570_ACEOF
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572case $ac_config_files in *"
15573"*) set x $ac_config_files; shift; ac_config_files=$*;;
15574esac
15575
15576case $ac_config_headers in *"
15577"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15578esac
15579
15580
15581cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015582# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015583config_files="$ac_config_files"
15584config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015589ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015590\`$as_me' instantiates files and other configuration actions
15591from templates according to the current configuration. Unless the files
15592and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015595
15596 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015597 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 --config print configuration, then exit
15599 -q, --quiet, --silent
15600 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 -d, --debug don't remove temporary files
15602 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 --file=FILE[:TEMPLATE]
15604 instantiate the configuration file FILE
15605 --header=FILE[:TEMPLATE]
15606 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608Configuration files:
15609$config_files
15610
15611Configuration headers:
15612$config_headers
15613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015617cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15618ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015619ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015620python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015621configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015623
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015624Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015625This config.status script is free software; the Free Software Foundation
15626gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627
15628ac_pwd='$ac_pwd'
15629srcdir='$srcdir'
15630INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015631MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015632test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015633_ACEOF
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15636# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015637ac_need_defaults=:
15638while test $# != 0
15639do
15640 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015641 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15643 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015644 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015646 --*=)
15647 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15648 ac_optarg=
15649 ac_shift=:
15650 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015652 ac_option=$1
15653 ac_optarg=$2
15654 ac_shift=shift
15655 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 esac
15657
Skip Montanaro6dead952003-09-25 14:50:04 +000015658 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015660 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15661 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 $as_echo "$ac_cs_version"; exit ;;
15664 --config | --confi | --conf | --con | --co | --c )
15665 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015667 debug=: ;;
15668 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015669 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 case $ac_optarg in
15671 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015672 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015673 esac
15674 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 ac_need_defaults=false;;
15676 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015677 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 case $ac_optarg in
15679 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15680 esac
15681 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683 --he | --h)
15684 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015685 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015686Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015687 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015688 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015689 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15690 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15691 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
15693 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015694 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015695Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015699
15700 esac
15701 shift
15702done
15703
Skip Montanaro6dead952003-09-25 14:50:04 +000015704ac_configure_extra_args=
15705
15706if $ac_cs_silent; then
15707 exec 6>/dev/null
15708 ac_configure_extra_args="$ac_configure_extra_args --silent"
15709fi
15710
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015713if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015714 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 shift
15716 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15717 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015720fi
15721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015724exec 5>>config.log
15725{
15726 echo
15727 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15728## Running $as_me. ##
15729_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015734cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
Matthias Kloseb9621712010-04-24 17:59:49 +000015737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738
15739# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015740for ac_config_target in $ac_config_targets
15741do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 case $ac_config_target in
15743 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15744 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15745 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015746 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15747 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15749 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015750 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015751 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752
Victor Stinnere0be4232011-10-25 13:06:09 +020015753 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 esac
15755done
15756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015757
Martin v. Löwis11437992002-04-12 09:54:03 +000015758# If the user did not use the arguments to specify the items to instantiate,
15759# then the envvar interface is used. Set only those that are not.
15760# We use the long form for the default assignment because of an extremely
15761# bizarre bug on SunOS 4.1.3.
15762if $ac_need_defaults; then
15763 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15764 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15765fi
15766
Skip Montanaro6dead952003-09-25 14:50:04 +000015767# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015769# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770# Hook for its removal unless debugging.
15771# Note that there is a small window in which the directory will not be cleaned:
15772# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015773$debug ||
15774{
Victor Stinnere0be4232011-10-25 13:06:09 +020015775 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015777 : "${ac_tmp:=$tmp}"
15778 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015781}
Martin v. Löwis11437992002-04-12 09:54:03 +000015782# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015783
Martin v. Löwis11437992002-04-12 09:54:03 +000015784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015786 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015787} ||
15788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789 tmp=./conf$$-$RANDOM
15790 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015791} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015792ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015793
Matthias Kloseb9621712010-04-24 17:59:49 +000015794# Set up the scripts for CONFIG_FILES section.
15795# No need to generate them if there are no CONFIG_FILES.
15796# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
Matthias Kloseb9621712010-04-24 17:59:49 +000015799
15800ac_cr=`echo X | tr X '\015'`
15801# On cygwin, bash can eat \r inside `` if the user requested igncr.
15802# But we know of no other shell where ac_cr would be empty at this
15803# point, so we can use a bashism as a fallback.
15804if test "x$ac_cr" = x; then
15805 eval ac_cr=\$\'\\r\'
15806fi
15807ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15808if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015809 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015810else
15811 ac_cs_awk_cr=$ac_cr
15812fi
15813
Victor Stinnere0be4232011-10-25 13:06:09 +020015814echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015815_ACEOF
15816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818{
15819 echo "cat >conf$$subs.awk <<_ACEOF" &&
15820 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15821 echo "_ACEOF"
15822} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015823 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15824ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825ac_delim='%!_!# '
15826for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015827 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015828 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15831 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832 break
15833 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015834 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835 else
15836 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015837 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838done
Matthias Kloseb9621712010-04-24 17:59:49 +000015839rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015842cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015844sed -n '
15845h
15846s/^/S["/; s/!.*/"]=/
15847p
15848g
15849s/^[^!]*!//
15850:repl
15851t repl
15852s/'"$ac_delim"'$//
15853t delim
15854:nl
15855h
15856s/\(.\{148\}\)..*/\1/
15857t more1
15858s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15859p
15860n
15861b repl
15862:more1
15863s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15864p
15865g
15866s/.\{148\}//
15867t nl
15868:delim
15869h
15870s/\(.\{148\}\)..*/\1/
15871t more2
15872s/["\\]/\\&/g; s/^/"/; s/$/"/
15873p
15874b
15875:more2
15876s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15877p
15878g
15879s/.\{148\}//
15880t delim
15881' <conf$$subs.awk | sed '
15882/^[^""]/{
15883 N
15884 s/\n//
15885}
15886' >>$CONFIG_STATUS || ac_write_fail=1
15887rm -f conf$$subs.awk
15888cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15889_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015890cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015891 for (key in S) S_is_set[key] = 1
15892 FS = ""
15893
15894}
15895{
15896 line = $ 0
15897 nfields = split(line, field, "@")
15898 substed = 0
15899 len = length(field[1])
15900 for (i = 2; i < nfields; i++) {
15901 key = field[i]
15902 keylen = length(key)
15903 if (S_is_set[key]) {
15904 value = S[key]
15905 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15906 len += length(value) + length(field[++i])
15907 substed = 1
15908 } else
15909 len += 1 + keylen
15910 }
15911
15912 print line
15913}
15914
15915_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15918if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15919 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15920else
15921 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015922fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015923 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015924_ACEOF
15925
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015926# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15927# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928# trailing colons and then remove the whole line if VPATH becomes empty
15929# (actually we leave an empty line to preserve line numbers).
15930if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015931 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15932h
15933s///
15934s/^/:/
15935s/[ ]*$/:/
15936s/:\$(srcdir):/:/g
15937s/:\${srcdir}:/:/g
15938s/:@srcdir@:/:/g
15939s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015941x
15942s/\(=[ ]*\).*/\1/
15943G
15944s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945s/^[^=]*=[ ]*$//
15946}'
15947fi
15948
Matthias Kloseb9621712010-04-24 17:59:49 +000015949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015950fi # test -n "$CONFIG_FILES"
15951
Matthias Kloseb9621712010-04-24 17:59:49 +000015952# Set up the scripts for CONFIG_HEADERS section.
15953# No need to generate them if there are no CONFIG_HEADERS.
15954# This happens for instance with `./config.status Makefile'.
15955if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015956cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015957BEGIN {
15958_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960# Transform confdefs.h into an awk script `defines.awk', embedded as
15961# here-document in config.status, that substitutes the proper values into
15962# config.h.in to produce config.h.
15963
15964# Create a delimiter string that does not exist in confdefs.h, to ease
15965# handling of long lines.
15966ac_delim='%!_!# '
15967for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015968 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15969 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015970 break
15971 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015972 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 else
15974 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15975 fi
15976done
15977
15978# For the awk script, D is an array of macro values keyed by name,
15979# likewise P contains macro parameters if any. Preserve backslash
15980# newline sequences.
15981
15982ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15983sed -n '
15984s/.\{148\}/&'"$ac_delim"'/g
15985t rset
15986:rset
15987s/^[ ]*#[ ]*define[ ][ ]*/ /
15988t def
15989d
15990:def
15991s/\\$//
15992t bsnl
15993s/["\\]/\\&/g
15994s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15995D["\1"]=" \3"/p
15996s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15997d
15998:bsnl
15999s/["\\]/\\&/g
16000s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16001D["\1"]=" \3\\\\\\n"\\/p
16002t cont
16003s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16004t cont
16005d
16006:cont
16007n
16008s/.\{148\}/&'"$ac_delim"'/g
16009t clear
16010:clear
16011s/\\$//
16012t bsnlc
16013s/["\\]/\\&/g; s/^/"/; s/$/"/p
16014d
16015:bsnlc
16016s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16017b cont
16018' <confdefs.h | sed '
16019s/'"$ac_delim"'/"\\\
16020"/g' >>$CONFIG_STATUS || ac_write_fail=1
16021
16022cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16023 for (key in D) D_is_set[key] = 1
16024 FS = ""
16025}
16026/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16027 line = \$ 0
16028 split(line, arg, " ")
16029 if (arg[1] == "#") {
16030 defundef = arg[2]
16031 mac1 = arg[3]
16032 } else {
16033 defundef = substr(arg[1], 2)
16034 mac1 = arg[2]
16035 }
16036 split(mac1, mac2, "(") #)
16037 macro = mac2[1]
16038 prefix = substr(line, 1, index(line, defundef) - 1)
16039 if (D_is_set[macro]) {
16040 # Preserve the white space surrounding the "#".
16041 print prefix "define", macro P[macro] D[macro]
16042 next
16043 } else {
16044 # Replace #undef with comments. This is necessary, for example,
16045 # in the case of _POSIX_SOURCE, which is predefined and required
16046 # on some systems where configure will not decide to define it.
16047 if (defundef == "undef") {
16048 print "/*", prefix defundef, macro, "*/"
16049 next
16050 }
16051 }
16052}
16053{ print }
16054_ACAWK
16055_ACEOF
16056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016057 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016058fi # test -n "$CONFIG_HEADERS"
16059
16060
16061eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16062shift
16063for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016064do
16065 case $ac_tag in
16066 :[FHLC]) ac_mode=$ac_tag; continue;;
16067 esac
16068 case $ac_mode$ac_tag in
16069 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016070 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071 :[FH]-) ac_tag=-:-;;
16072 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16073 esac
16074 ac_save_IFS=$IFS
16075 IFS=:
16076 set x $ac_tag
16077 IFS=$ac_save_IFS
16078 shift
16079 ac_file=$1
16080 shift
16081
16082 case $ac_mode in
16083 :L) ac_source=$1;;
16084 :[FH])
16085 ac_file_inputs=
16086 for ac_f
16087 do
16088 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016089 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090 *) # Look for the file first in the build tree, then in the source tree
16091 # (if the path is not absolute). The absolute path cannot be DOS-style,
16092 # because $ac_f cannot contain `:'.
16093 test -f "$ac_f" ||
16094 case $ac_f in
16095 [\\/$]*) false;;
16096 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16097 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016098 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16101 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016102 done
16103
16104 # Let's still pretend it is `configure' which instantiates (i.e., don't
16105 # use $as_me), people would be surprised to read:
16106 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 configure_input='Generated from '`
16108 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16109 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110 if test x"$ac_file" != x-; then
16111 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016112 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16113$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 # Neutralize special characters interpreted by sed in replacement strings.
16116 case $configure_input in #(
16117 *\&* | *\|* | *\\* )
16118 ac_sed_conf_input=`$as_echo "$configure_input" |
16119 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16120 *) ac_sed_conf_input=$configure_input;;
16121 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016122
16123 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016124 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16125 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126 esac
16127 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016128 esac
16129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016130 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016131$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016132 X"$ac_file" : 'X\(//\)[^/]' \| \
16133 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016135$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16137 s//\1/
16138 q
16139 }
16140 /^X\(\/\/\)[^/].*/{
16141 s//\1/
16142 q
16143 }
16144 /^X\(\/\/\)$/{
16145 s//\1/
16146 q
16147 }
16148 /^X\(\/\).*/{
16149 s//\1/
16150 q
16151 }
16152 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016153 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016154 ac_builddir=.
16155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156case "$ac_dir" in
16157.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16158*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016159 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 case $ac_top_builddir_sub in
16163 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16164 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16165 esac ;;
16166esac
16167ac_abs_top_builddir=$ac_pwd
16168ac_abs_builddir=$ac_pwd$ac_dir_suffix
16169# for backward compatibility:
16170ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016171
16172case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 ac_top_srcdir=$ac_top_builddir_sub
16176 ac_abs_top_srcdir=$ac_pwd ;;
16177 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016178 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016179 ac_top_srcdir=$srcdir
16180 ac_abs_top_srcdir=$srcdir ;;
16181 *) # Relative name.
16182 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16183 ac_top_srcdir=$ac_top_build_prefix$srcdir
16184 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016185esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016187
Martin v. Löwis11437992002-04-12 09:54:03 +000016188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189 case $ac_mode in
16190 :F)
16191 #
16192 # CONFIG_FILE
16193 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016194
16195 case $INSTALL in
16196 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016199 ac_MKDIR_P=$MKDIR_P
16200 case $MKDIR_P in
16201 [\\/$]* | ?:[\\/]* ) ;;
16202 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16203 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016204_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205
Matthias Kloseb9621712010-04-24 17:59:49 +000016206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207# If the template does not know about datarootdir, expand it.
16208# FIXME: This hack should be removed a few years after 2.60.
16209ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016210ac_sed_dataroot='
16211/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 p
16213 q
16214}
16215/@datadir@/p
16216/@docdir@/p
16217/@infodir@/p
16218/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016219/@mandir@/p'
16220case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221*datarootdir*) ac_datarootdir_seen=yes;;
16222*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016223 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16224$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016226cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227 ac_datarootdir_hack='
16228 s&@datadir@&$datadir&g
16229 s&@docdir@&$docdir&g
16230 s&@infodir@&$infodir&g
16231 s&@localedir@&$localedir&g
16232 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016233 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234esac
16235_ACEOF
16236
16237# Neutralize VPATH when `$srcdir' = `.'.
16238# Shell code in configure.ac might set extrasub.
16239# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016240cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16241ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016242$extrasub
16243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016245:t
16246/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016247s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016249s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250s&@srcdir@&$ac_srcdir&;t t
16251s&@abs_srcdir@&$ac_abs_srcdir&;t t
16252s&@top_srcdir@&$ac_top_srcdir&;t t
16253s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16254s&@builddir@&$ac_builddir&;t t
16255s&@abs_builddir@&$ac_abs_builddir&;t t
16256s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16257s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016258s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016260"
Victor Stinnere0be4232011-10-25 13:06:09 +020016261eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16262 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016263
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016265 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16266 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16267 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016269which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016270$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016271which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016272
Victor Stinnere0be4232011-10-25 13:06:09 +020016273 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016275 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16276 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016277 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016278 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279 ;;
16280 :H)
16281 #
16282 # CONFIG_HEADER
16283 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 {
16286 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016287 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16288 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016289 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016290 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016291 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16292$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016293 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016294 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016295 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 fi
16298 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016299 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016300 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016301 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305
16306 esac
16307
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016308
16309 case $ac_file$ac_mode in
16310 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16311
16312 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313done # for ac_tag
16314
Guido van Rossum627b2d71993-12-24 10:39:16 +000016315
Matthias Kloseb9621712010-04-24 17:59:49 +000016316as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016317_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016318ac_clean_files=$ac_clean_files_save
16319
Matthias Kloseb9621712010-04-24 17:59:49 +000016320test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016321 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016322
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
16324# configure is writing to config.log, and then calls config.status.
16325# config.status does its own redirection, appending to config.log.
16326# Unfortunately, on DOS this fails, as config.log is still kept open
16327# by configure, so config.status won't be able to write to it; its
16328# output is simply discarded. So we exec the FD to /dev/null,
16329# effectively closing config.log, so it can be properly (re)opened and
16330# appended to by config.status. When coming back to configure, we
16331# need to make the FD available again.
16332if test "$no_create" != yes; then
16333 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016334 ac_config_status_args=
16335 test "$silent" = yes &&
16336 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016338 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016339 exec 5>>config.log
16340 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16341 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016342 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016343fi
16344if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16346$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016347fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016348
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016349
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016350echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016351if test ! -f Modules/Setup
16352then
16353 cp $srcdir/Modules/Setup.dist Modules/Setup
16354fi
16355
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016356echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016357if test ! -f Modules/Setup.local
16358then
16359 echo "# Edit this file for local setup changes" >Modules/Setup.local
16360fi
16361
16362echo "creating Makefile"
16363$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16364 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016365 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016366mv config.c Modules