blob: 3dd173bf6f179e46fe1813f831537c2aa13421a3 [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
Matthias Klosec4c48422012-10-21 23:05:35 +0200647PYTHON
648ASDLGEN
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
Trent Nelson4d4ec652012-10-16 08:51:24 -0400717BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000718target_alias
719host_alias
720build_alias
721LIBS
722ECHO_T
723ECHO_N
724ECHO_C
725DEFS
726mandir
727localedir
728libdir
729psdir
730pdfdir
731dvidir
732htmldir
733infodir
734docdir
735oldincludedir
736includedir
737localstatedir
738sharedstatedir
739sysconfdir
740datadir
741datarootdir
742libexecdir
743sbindir
744bindir
745program_transform_name
746prefix
747exec_prefix
748PACKAGE_URL
749PACKAGE_BUGREPORT
750PACKAGE_STRING
751PACKAGE_VERSION
752PACKAGE_TARNAME
753PACKAGE_NAME
754PATH_SEPARATOR
755SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000756ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000757ac_user_opts='
758enable_option_checking
759enable_universalsdk
760with_universal_archs
761with_framework_name
762enable_framework
763with_gcc
764with_cxx_main
765with_suffix
766enable_shared
767enable_profiling
768with_pydebug
769with_libs
770with_system_expat
771with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100772with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000773enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000774with_dbmliborder
775with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000776with_threads
777with_thread
778enable_ipv6
779with_doc_strings
780with_tsc
781with_pymalloc
782with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000783with_fpectl
784with_libm
785with_libc
786enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000787with_computed_gotos
788'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000789 ac_precious_vars='build_alias
790host_alias
791target_alias
792CC
793CFLAGS
794LDFLAGS
795LIBS
796CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200797CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000798
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000801ac_init_help=
802ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000803ac_unrecognized_opts=
804ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805# The variables have the same names as the options, with
806# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000807cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810no_recursion=
811prefix=NONE
812program_prefix=NONE
813program_suffix=NONE
814program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819x_includes=NONE
820x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000821
822# Installation directory options.
823# These are left unexpanded so users can "make install exec_prefix=/foo"
824# and all the variables that are supposed to be based on exec_prefix
825# by default will actually change.
826# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000828bindir='${exec_prefix}/bin'
829sbindir='${exec_prefix}/sbin'
830libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831datarootdir='${prefix}/share'
832datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833sysconfdir='${prefix}/etc'
834sharedstatedir='${prefix}/com'
835localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836includedir='${prefix}/include'
837oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
839infodir='${datarootdir}/info'
840htmldir='${docdir}'
841dvidir='${docdir}'
842pdfdir='${docdir}'
843psdir='${docdir}'
844libdir='${exec_prefix}/lib'
845localedir='${datarootdir}/locale'
846mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 # If the previous option needs an argument, assign it.
853 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 ac_prev=
856 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200860 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
861 *=) ac_optarg= ;;
862 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000863 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865 # Accept the important Cygnus configure options, so we can diagnose typos.
866
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 case $ac_dashdash$ac_option in
868 --)
869 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871 -bindir | --bindir | --bindi | --bind | --bin | --bi)
872 ac_prev=bindir ;;
873 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875
876 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881 -cache-file | --cache-file | --cache-fil | --cache-fi \
882 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
883 ac_prev=cache_file ;;
884 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
885 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000886 cache_file=$ac_optarg ;;
887
888 --config-cache | -C)
889 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
897 | --dataroo | --dataro | --datar)
898 ac_prev=datarootdir ;;
899 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
900 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
901 datarootdir=$ac_optarg ;;
902
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000904 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000906 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200907 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000908 ac_useropt_orig=$ac_useropt
909 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
910 case $ac_user_opts in
911 *"
912"enable_$ac_useropt"
913"*) ;;
914 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
915 ac_unrecognized_sep=', ';;
916 esac
917 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918
919 -docdir | --docdir | --docdi | --doc | --do)
920 ac_prev=docdir ;;
921 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
922 docdir=$ac_optarg ;;
923
924 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
925 ac_prev=dvidir ;;
926 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
927 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
929 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000930 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000932 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200933 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000934 ac_useropt_orig=$ac_useropt
935 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
936 case $ac_user_opts in
937 *"
938"enable_$ac_useropt"
939"*) ;;
940 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
941 ac_unrecognized_sep=', ';;
942 esac
943 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
946 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
947 | --exec | --exe | --ex)
948 ac_prev=exec_prefix ;;
949 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
950 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
951 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Obsolete; use --with-gas.
956 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 -help | --help | --hel | --he | -h)
959 ac_init_help=long ;;
960 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
961 ac_init_help=recursive ;;
962 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
963 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
971 ac_prev=htmldir ;;
972 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
973 | --ht=*)
974 htmldir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -includedir | --includedir | --includedi | --included | --include \
977 | --includ | --inclu | --incl | --inc)
978 ac_prev=includedir ;;
979 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
980 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -infodir | --infodir | --infodi | --infod | --info | --inf)
984 ac_prev=infodir ;;
985 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -libdir | --libdir | --libdi | --libd)
989 ac_prev=libdir ;;
990 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
993 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
994 | --libexe | --libex | --libe)
995 ac_prev=libexecdir ;;
996 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
997 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000 -localedir | --localedir | --localedi | --localed | --locale)
1001 ac_prev=localedir ;;
1002 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1003 localedir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007 ac_prev=localstatedir ;;
1008 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1013 ac_prev=mandir ;;
1014 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --without-fp.
1019 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 no_create=yes ;;
1024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1026 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1027 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1030 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1031 | --oldin | --oldi | --old | --ol | --o)
1032 ac_prev=oldincludedir ;;
1033 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1034 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1035 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1039 ac_prev=prefix ;;
1040 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1044 | --program-pre | --program-pr | --program-p)
1045 ac_prev=program_prefix ;;
1046 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1047 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1051 | --program-suf | --program-su | --program-s)
1052 ac_prev=program_suffix ;;
1053 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1054 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -program-transform-name | --program-transform-name \
1058 | --program-transform-nam | --program-transform-na \
1059 | --program-transform-n | --program-transform- \
1060 | --program-transform | --program-transfor \
1061 | --program-transfo | --program-transf \
1062 | --program-trans | --program-tran \
1063 | --progr-tra | --program-tr | --program-t)
1064 ac_prev=program_transform_name ;;
1065 -program-transform-name=* | --program-transform-name=* \
1066 | --program-transform-nam=* | --program-transform-na=* \
1067 | --program-transform-n=* | --program-transform-=* \
1068 | --program-transform=* | --program-transfor=* \
1069 | --program-transfo=* | --program-transf=* \
1070 | --program-trans=* | --program-tran=* \
1071 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1075 ac_prev=pdfdir ;;
1076 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1077 pdfdir=$ac_optarg ;;
1078
1079 -psdir | --psdir | --psdi | --psd | --ps)
1080 ac_prev=psdir ;;
1081 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1082 psdir=$ac_optarg ;;
1083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1085 | -silent | --silent | --silen | --sile | --sil)
1086 silent=yes ;;
1087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1089 ac_prev=sbindir ;;
1090 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1091 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
1094 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1095 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1096 | --sharedst | --shareds | --shared | --share | --shar \
1097 | --sha | --sh)
1098 ac_prev=sharedstatedir ;;
1099 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1100 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1101 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1102 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 -site | --site | --sit)
1106 ac_prev=site ;;
1107 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1111 ac_prev=srcdir ;;
1112 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1116 | --syscon | --sysco | --sysc | --sys | --sy)
1117 ac_prev=sysconfdir ;;
1118 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1119 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
1127 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1128 verbose=yes ;;
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 -version | --version | --versio | --versi | --vers | -V)
1131 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001137 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001138 ac_useropt_orig=$ac_useropt
1139 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140 case $ac_user_opts in
1141 *"
1142"with_$ac_useropt"
1143"*) ;;
1144 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1145 ac_unrecognized_sep=', ';;
1146 esac
1147 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001150 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001152 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001153 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001154 ac_useropt_orig=$ac_useropt
1155 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1156 case $ac_user_opts in
1157 *"
1158"with_$ac_useropt"
1159"*) ;;
1160 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1161 ac_unrecognized_sep=', ';;
1162 esac
1163 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 --x)
1166 # Obsolete; use --with-x.
1167 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1170 | --x-incl | --x-inc | --x-in | --x-i)
1171 ac_prev=x_includes ;;
1172 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1173 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1177 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1178 ac_prev=x_libraries ;;
1179 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1180 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001183 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1184Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 ;;
1186
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 *=*)
1188 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1189 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 case $ac_envvar in #(
1191 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001194 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 export $ac_envvar ;;
1196
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001197 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001202 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203 ;;
1204
1205 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001206done
1207
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211fi
1212
Matthias Kloseb9621712010-04-24 17:59:49 +00001213if test -n "$ac_unrecognized_opts"; then
1214 case $enable_option_checking in
1215 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1218 esac
1219fi
1220
1221# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001222for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1223 datadir sysconfdir sharedstatedir localstatedir includedir \
1224 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1225 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 # Remove trailing slashes.
1229 case $ac_val in
1230 */ )
1231 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1232 eval $ac_var=\$ac_val;;
1233 esac
1234 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236 [\\/$]* | ?:[\\/]* ) continue;;
1237 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001240done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242# There might be people who depend on the old broken behavior: `$host'
1243# used to hold the argument of --host etc.
1244# FIXME: To remove some day.
1245build=$build_alias
1246host=$host_alias
1247target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249# FIXME: To remove some day.
1250if test "x$host_alias" != x; then
1251 if test "x$build_alias" = x; then
1252 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001253 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1254 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 elif test "x$build_alias" != "x$host_alias"; then
1256 cross_compiling=yes
1257 fi
1258fi
1259
1260ac_tool_prefix=
1261test -n "$host_alias" && ac_tool_prefix=$host_alias-
1262
1263test "$silent" = yes && exec 6>/dev/null
1264
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266ac_pwd=`pwd` && test -n "$ac_pwd" &&
1267ac_ls_di=`ls -di .` &&
1268ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001272
1273
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274# Find the source files, if location was not specified.
1275if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 ac_confdir=`$as_dirname -- "$as_myself" ||
1279$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1280 X"$as_myself" : 'X\(//\)[^/]' \| \
1281 X"$as_myself" : 'X\(//\)$' \| \
1282 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1283$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1285 s//\1/
1286 q
1287 }
1288 /^X\(\/\/\)[^/].*/{
1289 s//\1/
1290 q
1291 }
1292 /^X\(\/\/\)$/{
1293 s//\1/
1294 q
1295 }
1296 /^X\(\/\).*/{
1297 s//\1/
1298 q
1299 }
1300 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303 srcdir=..
1304 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305else
1306 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308if test ! -r "$srcdir/$ac_unique_file"; then
1309 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1313ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001314 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315 pwd)`
1316# When building in place, set srcdir=.
1317if test "$ac_abs_confdir" = "$ac_pwd"; then
1318 srcdir=.
1319fi
1320# Remove unnecessary trailing slashes from srcdir.
1321# Double slashes in file names in object file debugging info
1322# mess up M-x gdb in Emacs.
1323case $srcdir in
1324*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1325esac
1326for ac_var in $ac_precious_vars; do
1327 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1328 eval ac_env_${ac_var}_value=\$${ac_var}
1329 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1330 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1331done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332
Martin v. Löwis11437992002-04-12 09:54:03 +00001333#
1334# Report the --help message.
1335#
1336if test "$ac_init_help" = "long"; then
1337 # Omit some internal or obsolete options to make the list less imposing.
1338 # This message is too long to be a string in the A/UX 3.1 sh.
1339 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001340\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001341
1342Usage: $0 [OPTION]... [VAR=VALUE]...
1343
1344To assign environment variables (e.g., CC, CFLAGS...), specify them as
1345VAR=VALUE. See below for descriptions of some of the useful variables.
1346
1347Defaults for the options are specified in brackets.
1348
1349Configuration:
1350 -h, --help display this help and exit
1351 --help=short display options specific to this package
1352 --help=recursive display the short help of all the included packages
1353 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001354 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001355 --cache-file=FILE cache test results in FILE [disabled]
1356 -C, --config-cache alias for \`--cache-file=config.cache'
1357 -n, --no-create do not create output files
1358 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360Installation directories:
1361 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001362 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001363 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001364 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001365
1366By default, \`make install' will install all the files in
1367\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1368an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1369for instance \`--prefix=\$HOME'.
1370
1371For better control, use the options below.
1372
1373Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001374 --bindir=DIR user executables [EPREFIX/bin]
1375 --sbindir=DIR system admin executables [EPREFIX/sbin]
1376 --libexecdir=DIR program executables [EPREFIX/libexec]
1377 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1378 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1379 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1380 --libdir=DIR object code libraries [EPREFIX/lib]
1381 --includedir=DIR C header files [PREFIX/include]
1382 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1383 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1384 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1385 --infodir=DIR info documentation [DATAROOTDIR/info]
1386 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1387 --mandir=DIR man documentation [DATAROOTDIR/man]
1388 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1389 --htmldir=DIR html documentation [DOCDIR]
1390 --dvidir=DIR dvi documentation [DOCDIR]
1391 --pdfdir=DIR pdf documentation [DOCDIR]
1392 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001393_ACEOF
1394
1395 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001396
1397System types:
1398 --build=BUILD configure for building on BUILD [guessed]
1399 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400_ACEOF
1401fi
1402
1403if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001404 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001405 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001406 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001407 cat <<\_ACEOF
1408
1409Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001410 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1412 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001413 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001414 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001415 --enable-framework[=INSTALLDIR]
1416 Build (MacOSX|Darwin) framework
1417 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001418 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001419 --enable-loadable-sqlite-extensions
1420 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001421 --enable-ipv6 Enable ipv6 (with ipv4) support
1422 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001423 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426Optional Packages:
1427 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1428 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001429 --with-universal-archs=ARCH
1430 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001431 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001432 --with-framework-name=FRAMEWORK
1433 specify an alternate name of the framework built
1434 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001436 --with-cxx-main=<compiler>
1437 compile main() and link python executable with C++
1438 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --with-suffix=.exe set executable suffix
1440 --with-pydebug build with Py_DEBUG defined
1441 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001442 --with-system-expat build pyexpat module using an installed expat
1443 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001444 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001445 --with-system-libmpdec build _decimal module using an installed libmpdec
1446 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001447 --with-dbmliborder=db1:db2:...
1448 order to check db backends for dbm. Valid value is a
1449 colon separated string with the backend names
1450 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --with(out)-threads[=DIRECTORY]
1453 disable/enable thread support
1454 --with(out)-thread[=DIRECTORY]
1455 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001457 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001459 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-fpectl enable SIGFPE catching
1461 --with-libm=STRING math library
1462 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001463 --with(out)-computed-gotos
1464 Use computed gotos in evaluation loop (enabled by
1465 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Some influential environment variables:
1468 CC C compiler command
1469 CFLAGS C compiler flags
1470 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1471 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001472 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001474 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 CPP C preprocessor
1476
1477Use these variables to override the choices made by `configure' or to help
1478it to find libraries and programs with nonstandard names/locations.
1479
Georg Brandle2e15612009-05-20 18:25:10 +00001480Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001482ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001483fi
1484
1485if test "$ac_init_help" = "recursive"; then
1486 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 test -d "$ac_dir" ||
1489 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1490 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_builddir=.
1492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493case "$ac_dir" in
1494.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1495*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001496 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001497 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001499 case $ac_top_builddir_sub in
1500 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1502 esac ;;
1503esac
1504ac_abs_top_builddir=$ac_pwd
1505ac_abs_builddir=$ac_pwd$ac_dir_suffix
1506# for backward compatibility:
1507ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001508
1509case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 ac_top_srcdir=$ac_top_builddir_sub
1513 ac_abs_top_srcdir=$ac_pwd ;;
1514 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 ac_top_srcdir=$srcdir
1517 ac_abs_top_srcdir=$srcdir ;;
1518 *) # Relative name.
1519 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1520 ac_top_srcdir=$ac_top_build_prefix$srcdir
1521 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001522esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 cd "$ac_dir" || { ac_status=$?; continue; }
1526 # Check for guested configure.
1527 if test -f "$ac_srcdir/configure.gnu"; then
1528 echo &&
1529 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1530 elif test -f "$ac_srcdir/configure"; then
1531 echo &&
1532 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001534 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 fi || ac_status=$?
1536 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 done
1538fi
1539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001541if $ac_init_version; then
1542 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001543python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001544generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001546Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547This configure script is free software; the Free Software Foundation
1548gives unlimited permission to copy, distribute and modify it.
1549_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001552
1553## ------------------------ ##
1554## Autoconf initialization. ##
1555## ------------------------ ##
1556
1557# ac_fn_c_try_compile LINENO
1558# --------------------------
1559# Try to compile conftest.$ac_ext, and return whether this succeeded.
1560ac_fn_c_try_compile ()
1561{
1562 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563 rm -f conftest.$ac_objext
1564 if { { ac_try="$ac_compile"
1565case "(($ac_try" in
1566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567 *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571 (eval "$ac_compile") 2>conftest.err
1572 ac_status=$?
1573 if test -s conftest.err; then
1574 grep -v '^ *+' conftest.err >conftest.er1
1575 cat conftest.er1 >&5
1576 mv -f conftest.er1 conftest.err
1577 fi
1578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1579 test $ac_status = 0; } && {
1580 test -z "$ac_c_werror_flag" ||
1581 test ! -s conftest.err
1582 } && test -s conftest.$ac_objext; then :
1583 ac_retval=0
1584else
1585 $as_echo "$as_me: failed program was:" >&5
1586sed 's/^/| /' conftest.$ac_ext >&5
1587
1588 ac_retval=1
1589fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001590 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 as_fn_set_status $ac_retval
1592
1593} # ac_fn_c_try_compile
1594
Matthias Kloseb9621712010-04-24 17:59:49 +00001595# ac_fn_c_try_link LINENO
1596# -----------------------
1597# Try to link conftest.$ac_ext, and return whether this succeeded.
1598ac_fn_c_try_link ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 rm -f conftest.$ac_objext conftest$ac_exeext
1602 if { { ac_try="$ac_link"
1603case "(($ac_try" in
1604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605 *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609 (eval "$ac_link") 2>conftest.err
1610 ac_status=$?
1611 if test -s conftest.err; then
1612 grep -v '^ *+' conftest.err >conftest.er1
1613 cat conftest.er1 >&5
1614 mv -f conftest.er1 conftest.err
1615 fi
1616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1617 test $ac_status = 0; } && {
1618 test -z "$ac_c_werror_flag" ||
1619 test ! -s conftest.err
1620 } && test -s conftest$ac_exeext && {
1621 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001622 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 }; then :
1624 ac_retval=0
1625else
1626 $as_echo "$as_me: failed program was:" >&5
1627sed 's/^/| /' conftest.$ac_ext >&5
1628
1629 ac_retval=1
1630fi
1631 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1632 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1633 # interfere with the next link command; also delete a directory that is
1634 # left behind by Apple's compiler. We do this before executing the actions.
1635 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001636 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001637 as_fn_set_status $ac_retval
1638
1639} # ac_fn_c_try_link
1640
Matthias Kloseb9621712010-04-24 17:59:49 +00001641# ac_fn_c_try_cpp LINENO
1642# ----------------------
1643# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1644ac_fn_c_try_cpp ()
1645{
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 if { { ac_try="$ac_cpp conftest.$ac_ext"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001662 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001663 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 }; then :
1666 ac_retval=0
1667else
1668 $as_echo "$as_me: failed program was:" >&5
1669sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001673 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 as_fn_set_status $ac_retval
1675
1676} # ac_fn_c_try_cpp
1677
1678# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1679# -------------------------------------------------------
1680# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1681# the include files in INCLUDES and setting the cache variable VAR
1682# accordingly.
1683ac_fn_c_check_header_mongrel ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001686 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1688$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001689if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 $as_echo_n "(cached) " >&6
1691fi
1692eval ac_res=\$$3
1693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1694$as_echo "$ac_res" >&6; }
1695else
1696 # Is the header compilable?
1697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1698$as_echo_n "checking $2 usability... " >&6; }
1699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700/* end confdefs.h. */
1701$4
1702#include <$2>
1703_ACEOF
1704if ac_fn_c_try_compile "$LINENO"; then :
1705 ac_header_compiler=yes
1706else
1707 ac_header_compiler=no
1708fi
1709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1711$as_echo "$ac_header_compiler" >&6; }
1712
1713# Is the header present?
1714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1715$as_echo_n "checking $2 presence... " >&6; }
1716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717/* end confdefs.h. */
1718#include <$2>
1719_ACEOF
1720if ac_fn_c_try_cpp "$LINENO"; then :
1721 ac_header_preproc=yes
1722else
1723 ac_header_preproc=no
1724fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001725rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1727$as_echo "$ac_header_preproc" >&6; }
1728
1729# So? What about this header?
1730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1731 yes:no: )
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1733$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1735$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1736 ;;
1737 no:yes:* )
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1739$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1741$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1743$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1745$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1747$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001748( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001749## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001750## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 ) | sed "s/^/$as_me: WARNING: /" >&2
1752 ;;
1753esac
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1755$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001756if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 $as_echo_n "(cached) " >&6
1758else
1759 eval "$3=\$ac_header_compiler"
1760fi
1761eval ac_res=\$$3
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766
1767} # ac_fn_c_check_header_mongrel
1768
1769# ac_fn_c_try_run LINENO
1770# ----------------------
1771# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1772# that executables *can* be run.
1773ac_fn_c_try_run ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1776 if { { ac_try="$ac_link"
1777case "(($ac_try" in
1778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1779 *) ac_try_echo=$ac_try;;
1780esac
1781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1782$as_echo "$ac_try_echo"; } >&5
1783 (eval "$ac_link") 2>&5
1784 ac_status=$?
1785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1787 { { case "(($ac_try" in
1788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1789 *) ac_try_echo=$ac_try;;
1790esac
1791eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1792$as_echo "$ac_try_echo"; } >&5
1793 (eval "$ac_try") 2>&5
1794 ac_status=$?
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; }; }; then :
1797 ac_retval=0
1798else
1799 $as_echo "$as_me: program exited with status $ac_status" >&5
1800 $as_echo "$as_me: failed program was:" >&5
1801sed 's/^/| /' conftest.$ac_ext >&5
1802
1803 ac_retval=$ac_status
1804fi
1805 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 as_fn_set_status $ac_retval
1808
1809} # ac_fn_c_try_run
1810
1811# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1812# -------------------------------------------------------
1813# Tests whether HEADER exists and can be compiled using the include files in
1814# INCLUDES, setting the cache variable VAR accordingly.
1815ac_fn_c_check_header_compile ()
1816{
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001820if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 $as_echo_n "(cached) " >&6
1822else
1823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1824/* end confdefs.h. */
1825$4
1826#include <$2>
1827_ACEOF
1828if ac_fn_c_try_compile "$LINENO"; then :
1829 eval "$3=yes"
1830else
1831 eval "$3=no"
1832fi
1833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1834fi
1835eval ac_res=\$$3
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1837$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001839
1840} # ac_fn_c_check_header_compile
1841
Matthias Kloseb9621712010-04-24 17:59:49 +00001842# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1843# -------------------------------------------
1844# Tests whether TYPE exists after having included INCLUDES, setting cache
1845# variable VAR accordingly.
1846ac_fn_c_check_type ()
1847{
1848 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1850$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001851if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001852 $as_echo_n "(cached) " >&6
1853else
1854 eval "$3=no"
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858int
1859main ()
1860{
1861if (sizeof ($2))
1862 return 0;
1863 ;
1864 return 0;
1865}
1866_ACEOF
1867if ac_fn_c_try_compile "$LINENO"; then :
1868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1869/* end confdefs.h. */
1870$4
1871int
1872main ()
1873{
1874if (sizeof (($2)))
1875 return 0;
1876 ;
1877 return 0;
1878}
1879_ACEOF
1880if ac_fn_c_try_compile "$LINENO"; then :
1881
1882else
1883 eval "$3=yes"
1884fi
1885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1886fi
1887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1888fi
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893
1894} # ac_fn_c_check_type
1895
1896# ac_fn_c_find_uintX_t LINENO BITS VAR
1897# ------------------------------------
1898# Finds an unsigned integer type with width BITS, setting cache variable VAR
1899# accordingly.
1900ac_fn_c_find_uintX_t ()
1901{
1902 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1904$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001905if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001906 $as_echo_n "(cached) " >&6
1907else
1908 eval "$3=no"
1909 # Order is important - never check a type that is potentially smaller
1910 # than half of the expected target width.
1911 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1912 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$ac_includes_default
1916int
1917main ()
1918{
1919static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001920test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001921
1922 ;
1923 return 0;
1924}
1925_ACEOF
1926if ac_fn_c_try_compile "$LINENO"; then :
1927 case $ac_type in #(
1928 uint$2_t) :
1929 eval "$3=yes" ;; #(
1930 *) :
1931 eval "$3=\$ac_type" ;;
1932esac
1933fi
1934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001935 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936
1937else
1938 break
1939fi
1940 done
1941fi
1942eval ac_res=\$$3
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1944$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001945 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001946
1947} # ac_fn_c_find_uintX_t
1948
1949# ac_fn_c_find_intX_t LINENO BITS VAR
1950# -----------------------------------
1951# Finds a signed integer type with width BITS, setting cache variable VAR
1952# accordingly.
1953ac_fn_c_find_intX_t ()
1954{
1955 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1957$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001958if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959 $as_echo_n "(cached) " >&6
1960else
1961 eval "$3=no"
1962 # Order is important - never check a type that is potentially smaller
1963 # than half of the expected target width.
1964 for ac_type in int$2_t 'int' 'long int' \
1965 'long long int' 'short int' 'signed char'; do
1966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1967/* end confdefs.h. */
1968$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001969 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001970int
1971main ()
1972{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001973static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001974test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001975
1976 ;
1977 return 0;
1978}
1979_ACEOF
1980if ac_fn_c_try_compile "$LINENO"; then :
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001984 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001985int
1986main ()
1987{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001989 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001990test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997
1998else
1999 case $ac_type in #(
2000 int$2_t) :
2001 eval "$3=yes" ;; #(
2002 *) :
2003 eval "$3=\$ac_type" ;;
2004esac
2005fi
2006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2007fi
2008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002009 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002010
2011else
2012 break
2013fi
2014 done
2015fi
2016eval ac_res=\$$3
2017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2018$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002019 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002020
2021} # ac_fn_c_find_intX_t
2022
2023# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2024# --------------------------------------------
2025# Tries to find the compile-time value of EXPR in a program that includes
2026# INCLUDES, setting VAR accordingly. Returns whether the value could be
2027# computed
2028ac_fn_c_compute_int ()
2029{
2030 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031 if test "$cross_compiling" = yes; then
2032 # Depending upon the size, compute the lo and hi bounds.
2033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$4
2036int
2037main ()
2038{
2039static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002040test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042 ;
2043 return 0;
2044}
2045_ACEOF
2046if ac_fn_c_try_compile "$LINENO"; then :
2047 ac_lo=0 ac_mid=0
2048 while :; do
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002056test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 ac_hi=$ac_mid; break
2064else
2065 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2066 if test $ac_lo -le $ac_mid; then
2067 ac_lo= ac_hi=
2068 break
2069 fi
2070 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073 done
2074else
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002082test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=-1 ac_mid=-1
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002098test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002099
2100 ;
2101 return 0;
2102}
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105 ac_lo=$ac_mid; break
2106else
2107 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2108 if test $ac_mid -le $ac_hi; then
2109 ac_lo= ac_hi=
2110 break
2111 fi
2112 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115 done
2116else
2117 ac_lo= ac_hi=
2118fi
2119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122# Binary search between lo and hi bounds.
2123while test "x$ac_lo" != "x$ac_hi"; do
2124 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126/* end confdefs.h. */
2127$4
2128int
2129main ()
2130{
2131static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002132test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_hi=$ac_mid
2140else
2141 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144done
2145case $ac_lo in #((
2146?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2147'') ac_retval=1 ;;
2148esac
2149 else
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153static long int longval () { return $2; }
2154static unsigned long int ulongval () { return $2; }
2155#include <stdio.h>
2156#include <stdlib.h>
2157int
2158main ()
2159{
2160
2161 FILE *f = fopen ("conftest.val", "w");
2162 if (! f)
2163 return 1;
2164 if (($2) < 0)
2165 {
2166 long int i = longval ();
2167 if (i != ($2))
2168 return 1;
2169 fprintf (f, "%ld", i);
2170 }
2171 else
2172 {
2173 unsigned long int i = ulongval ();
2174 if (i != ($2))
2175 return 1;
2176 fprintf (f, "%lu", i);
2177 }
2178 /* Do not output a trailing newline, as this causes \r\n confusion
2179 on some platforms. */
2180 return ferror (f) || fclose (f) != 0;
2181
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_run "$LINENO"; then :
2187 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2188else
2189 ac_retval=1
2190fi
2191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2192 conftest.$ac_objext conftest.beam conftest.$ac_ext
2193rm -f conftest.val
2194
2195 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002196 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002197 as_fn_set_status $ac_retval
2198
2199} # ac_fn_c_compute_int
2200
2201# ac_fn_c_check_func LINENO FUNC VAR
2202# ----------------------------------
2203# Tests whether FUNC exists, setting the cache variable VAR accordingly
2204ac_fn_c_check_func ()
2205{
2206 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2208$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002209if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002210 $as_echo_n "(cached) " >&6
2211else
2212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213/* end confdefs.h. */
2214/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2216#define $2 innocuous_$2
2217
2218/* System header to define __stub macros and hopefully few prototypes,
2219 which can conflict with char $2 (); below.
2220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2221 <limits.h> exists even on freestanding compilers. */
2222
2223#ifdef __STDC__
2224# include <limits.h>
2225#else
2226# include <assert.h>
2227#endif
2228
2229#undef $2
2230
2231/* Override any GCC internal prototype to avoid an error.
2232 Use char because int might match the return type of a GCC
2233 builtin and then its argument prototype would still apply. */
2234#ifdef __cplusplus
2235extern "C"
2236#endif
2237char $2 ();
2238/* The GNU C library defines this for functions which it implements
2239 to always fail with ENOSYS. Some functions are actually named
2240 something starting with __ and the normal name is an alias. */
2241#if defined __stub_$2 || defined __stub___$2
2242choke me
2243#endif
2244
2245int
2246main ()
2247{
2248return $2 ();
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253if ac_fn_c_try_link "$LINENO"; then :
2254 eval "$3=yes"
2255else
2256 eval "$3=no"
2257fi
2258rm -f core conftest.err conftest.$ac_objext \
2259 conftest$ac_exeext conftest.$ac_ext
2260fi
2261eval ac_res=\$$3
2262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2263$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002264 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002265
2266} # ac_fn_c_check_func
2267
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002268# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2269# ---------------------------------------------
2270# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2271# accordingly.
2272ac_fn_c_check_decl ()
2273{
2274 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275 as_decl_name=`echo $2|sed 's/ *(.*//'`
2276 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2278$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2279if eval \${$3+:} false; then :
2280 $as_echo_n "(cached) " >&6
2281else
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h. */
2284$4
2285int
2286main ()
2287{
2288#ifndef $as_decl_name
2289#ifdef __cplusplus
2290 (void) $as_decl_use;
2291#else
2292 (void) $as_decl_name;
2293#endif
2294#endif
2295
2296 ;
2297 return 0;
2298}
2299_ACEOF
2300if ac_fn_c_try_compile "$LINENO"; then :
2301 eval "$3=yes"
2302else
2303 eval "$3=no"
2304fi
2305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306fi
2307eval ac_res=\$$3
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2309$as_echo "$ac_res" >&6; }
2310 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311
2312} # ac_fn_c_check_decl
2313
Matthias Kloseb9621712010-04-24 17:59:49 +00002314# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2315# ----------------------------------------------------
2316# Tries to find if the field MEMBER exists in type AGGR, after including
2317# INCLUDES, setting cache variable VAR accordingly.
2318ac_fn_c_check_member ()
2319{
2320 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2322$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002323if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002324 $as_echo_n "(cached) " >&6
2325else
2326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h. */
2328$5
2329int
2330main ()
2331{
2332static $2 ac_aggr;
2333if (ac_aggr.$3)
2334return 0;
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_compile "$LINENO"; then :
2340 eval "$4=yes"
2341else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h. */
2344$5
2345int
2346main ()
2347{
2348static $2 ac_aggr;
2349if (sizeof ac_aggr.$3)
2350return 0;
2351 ;
2352 return 0;
2353}
2354_ACEOF
2355if ac_fn_c_try_compile "$LINENO"; then :
2356 eval "$4=yes"
2357else
2358 eval "$4=no"
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363fi
2364eval ac_res=\$$4
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002368
2369} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002371This file contains any messages produced by compilers while
2372running configure, to aid debugging if configure makes a mistake.
2373
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002374It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002375generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002376
2377 $ $0 $@
2378
2379_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002381{
2382cat <<_ASUNAME
2383## --------- ##
2384## Platform. ##
2385## --------- ##
2386
2387hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2388uname -m = `(uname -m) 2>/dev/null || echo unknown`
2389uname -r = `(uname -r) 2>/dev/null || echo unknown`
2390uname -s = `(uname -s) 2>/dev/null || echo unknown`
2391uname -v = `(uname -v) 2>/dev/null || echo unknown`
2392
2393/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2394/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2395
2396/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2397/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2398/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002400/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2401/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2402/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2403
2404_ASUNAME
2405
2406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2407for as_dir in $PATH
2408do
2409 IFS=$as_save_IFS
2410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 $as_echo "PATH: $as_dir"
2412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002414
2415} >&5
2416
2417cat >&5 <<_ACEOF
2418
2419
2420## ----------- ##
2421## Core tests. ##
2422## ----------- ##
2423
2424_ACEOF
2425
2426
2427# Keep a trace of the command line.
2428# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002429# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002430# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002432ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002433ac_configure_args0=
2434ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002435ac_must_keep_next=false
2436for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002437do
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 for ac_arg
2439 do
2440 case $ac_arg in
2441 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2442 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2443 | -silent | --silent | --silen | --sile | --sil)
2444 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 esac
2448 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002449 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002450 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002452 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002453 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002454 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002455 case $ac_arg in
2456 *=* | --config-cache | -C | -disable-* | --disable-* \
2457 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2458 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2459 | -with-* | --with-* | -without-* | --without-* | --x)
2460 case "$ac_configure_args0 " in
2461 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2462 esac
2463 ;;
2464 -* ) ac_must_keep_next=true ;;
2465 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471done
Matthias Kloseb9621712010-04-24 17:59:49 +00002472{ ac_configure_args0=; unset ac_configure_args0;}
2473{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002474
2475# When interrupted or exit'd, cleanup temporary files, and complete
2476# config.log. We remove comments because anyway the quotes in there
2477# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478# WARNING: Use '\'' to represent an apostrophe within the trap.
2479# 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 +00002480trap 'exit_status=$?
2481 # Save into config.log some information that might help in debugging.
2482 {
2483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002486## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
2489 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490(
2491 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2492 eval ac_val=\$$ac_var
2493 case $ac_val in #(
2494 *${as_nl}*)
2495 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2497$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
2499 case $ac_var in #(
2500 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2502 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002503 esac ;;
2504 esac
2505 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2508 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 "s/'\''/'\''\\\\'\'''\''/g;
2511 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2512 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002513 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002515 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac |
2517 sort
2518)
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002520
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002522## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 echo
2525 for ac_var in $ac_subst_vars
2526 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 eval ac_val=\$$ac_var
2528 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 done | sort
2533 echo
2534
2535 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002538## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 echo
2540 for ac_var in $ac_subst_files
2541 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 eval ac_val=\$$ac_var
2543 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002546 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 done | sort
2548 echo
2549 fi
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002553## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002554## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
2558 fi
2559 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 $as_echo "$as_me: caught signal $ac_signal"
2561 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 rm -f core *.core core.conftest.* &&
2564 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002567for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002568 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002569done
2570ac_signal=0
2571
2572# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
Matthias Kloseb9621712010-04-24 17:59:49 +00002575$as_echo "/* confdefs.h */" > confdefs.h
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577# Predefined preprocessor variables.
2578
2579cat >>confdefs.h <<_ACEOF
2580#define PACKAGE_NAME "$PACKAGE_NAME"
2581_ACEOF
2582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583cat >>confdefs.h <<_ACEOF
2584#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2585_ACEOF
2586
Martin v. Löwis11437992002-04-12 09:54:03 +00002587cat >>confdefs.h <<_ACEOF
2588#define PACKAGE_VERSION "$PACKAGE_VERSION"
2589_ACEOF
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591cat >>confdefs.h <<_ACEOF
2592#define PACKAGE_STRING "$PACKAGE_STRING"
2593_ACEOF
2594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595cat >>confdefs.h <<_ACEOF
2596#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2597_ACEOF
2598
Matthias Kloseb9621712010-04-24 17:59:49 +00002599cat >>confdefs.h <<_ACEOF
2600#define PACKAGE_URL "$PACKAGE_URL"
2601_ACEOF
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603
2604# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002605# Prefer an explicitly selected file to automatically selected ones.
2606ac_site_file1=NONE
2607ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 # We do not want a PATH search for config.site.
2610 case $CONFIG_SITE in #((
2611 -*) ac_site_file1=./$CONFIG_SITE;;
2612 */*) ac_site_file1=$CONFIG_SITE;;
2613 *) ac_site_file1=./$CONFIG_SITE;;
2614 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 ac_site_file1=$prefix/share/config.site
2617 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 ac_site_file1=$ac_default_prefix/share/config.site
2620 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002622for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623do
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 test "x$ac_site_file" = xNONE && continue
2625 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2627$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629 . "$ac_site_file" \
2630 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2632as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002633See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002634 fi
2635done
2636
2637if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # Some versions of bash will fail to source /dev/null (special files
2639 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2640 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2642$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2645 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 esac
2647 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648else
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2650$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 >$cache_file
2652fi
2653
2654# Check that the precious variables saved in the cache have kept the same
2655# value.
2656ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2659 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2661 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 case $ac_old_set,$ac_new_set in
2663 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2665$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 +00002666 ac_cache_corrupted=: ;;
2667 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2669$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 ac_cache_corrupted=: ;;
2671 ,);;
2672 *)
2673 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 # differences in whitespace do not lead to failure.
2675 ac_old_val_w=`echo x $ac_old_val`
2676 ac_new_val_w=`echo x $ac_new_val`
2677 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2679$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2680 ac_cache_corrupted=:
2681 else
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2683$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2684 eval $ac_var=\$ac_old_val
2685 fi
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2687$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2689$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002690 fi;;
2691 esac
2692 # Pass precious variables to config.status.
2693 if test "$ac_new_set" = set; then
2694 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 *) ac_arg=$ac_var=$ac_new_val ;;
2697 esac
2698 case " $ac_configure_args " in
2699 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 esac
2702 fi
2703done
2704if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2706$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2708$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002709 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002711## -------------------- ##
2712## Main body of script. ##
2713## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002714
Guido van Rossum7f43da71994-08-01 12:15:30 +00002715ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002716ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002717ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2718ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2719ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720
Guido van Rossum627b2d71993-12-24 10:39:16 +00002721
Michael W. Hudson54241132001-12-07 15:38:26 +00002722
Trent Nelson4d4ec652012-10-16 08:51:24 -04002723
Trent Nelson5595ab52012-10-17 04:47:31 -04002724if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002725 # If we're building out-of-tree, we need to make sure the following
2726 # resources get picked up before their $srcdir counterparts.
2727 # Objects/ -> typeslots.inc
2728 # Include/ -> Python-ast.h, graminit.h
2729 # Python/ -> importlib.h
2730 # (A side effect of this is that these resources will automatically be
2731 # regenerated when building out-of-tree, regardless of whether or not
2732 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2733 # off.)
2734 BASECPPFLAGS="-IObjects -IInclude -IPython"
2735else
2736 BASECPPFLAGS=""
2737fi
2738
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002739
2740
2741
2742
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002743if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744then
2745# Extract the first word of "hg", so it can be a program name with args.
2746set dummy hg; ac_word=$2
2747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2748$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002749if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750 $as_echo_n "(cached) " >&6
2751else
2752 if test -n "$HAS_HG"; then
2753 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2754else
2755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2756for as_dir in $PATH
2757do
2758 IFS=$as_save_IFS
2759 test -z "$as_dir" && as_dir=.
2760 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002761 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 -05002762 ac_cv_prog_HAS_HG="found"
2763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2764 break 2
2765 fi
2766done
2767 done
2768IFS=$as_save_IFS
2769
2770 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2771fi
2772fi
2773HAS_HG=$ac_cv_prog_HAS_HG
2774if test -n "$HAS_HG"; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2776$as_echo "$HAS_HG" >&6; }
2777else
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2779$as_echo "no" >&6; }
2780fi
2781
2782
2783else
2784HAS_HG=no-repository
2785fi
2786if test $HAS_HG = found
2787then
2788 HGVERSION="hg id -i \$(srcdir)"
2789 HGTAG="hg id -t \$(srcdir)"
2790 HGBRANCH="hg id -b \$(srcdir)"
2791else
2792 HGVERSION=""
2793 HGTAG=""
2794 HGBRANCH=""
2795fi
2796
2797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002798ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002799
2800
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002801ac_aux_dir=
2802for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2803 if test -f "$ac_dir/install-sh"; then
2804 ac_aux_dir=$ac_dir
2805 ac_install_sh="$ac_aux_dir/install-sh -c"
2806 break
2807 elif test -f "$ac_dir/install.sh"; then
2808 ac_aux_dir=$ac_dir
2809 ac_install_sh="$ac_aux_dir/install.sh -c"
2810 break
2811 elif test -f "$ac_dir/shtool"; then
2812 ac_aux_dir=$ac_dir
2813 ac_install_sh="$ac_aux_dir/shtool install -c"
2814 break
2815 fi
2816done
2817if test -z "$ac_aux_dir"; then
2818 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2819fi
2820
2821# These three variables are undocumented and unsupported,
2822# and are intended to be withdrawn in a future Autoconf release.
2823# They can cause serious problems if a builder's source tree is in a directory
2824# whose full name contains unusual characters.
2825ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2826ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2827ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2828
2829
2830# Make sure we can run config.sub.
2831$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2832 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2833
2834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2835$as_echo_n "checking build system type... " >&6; }
2836if ${ac_cv_build+:} false; then :
2837 $as_echo_n "(cached) " >&6
2838else
2839 ac_build_alias=$build_alias
2840test "x$ac_build_alias" = x &&
2841 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2842test "x$ac_build_alias" = x &&
2843 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2844ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2845 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2849$as_echo "$ac_cv_build" >&6; }
2850case $ac_cv_build in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2853esac
2854build=$ac_cv_build
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_build
2857shift
2858build_cpu=$1
2859build_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863build_os=$*
2864IFS=$ac_save_IFS
2865case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2866
2867
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2869$as_echo_n "checking host system type... " >&6; }
2870if ${ac_cv_host+:} false; then :
2871 $as_echo_n "(cached) " >&6
2872else
2873 if test "x$host_alias" = x; then
2874 ac_cv_host=$ac_cv_build
2875else
2876 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2877 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2878fi
2879
2880fi
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2882$as_echo "$ac_cv_host" >&6; }
2883case $ac_cv_host in
2884*-*-*) ;;
2885*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2886esac
2887host=$ac_cv_host
2888ac_save_IFS=$IFS; IFS='-'
2889set x $ac_cv_host
2890shift
2891host_cpu=$1
2892host_vendor=$2
2893shift; shift
2894# Remember, the first character of IFS is used to create $*,
2895# except with old shells:
2896host_os=$*
2897IFS=$ac_save_IFS
2898case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2899
2900
2901
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002902if test "$cross_compiling" = yes; then
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2904$as_echo_n "checking for python interpreter for cross build... " >&6; }
2905 if test -z "$PYTHON_FOR_BUILD"; then
2906 for interp in python$PACKAGE_VERSION python3 python; do
2907 which $interp >/dev/null 2>&1 || continue
2908 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2909 break
2910 fi
2911 interp=
2912 done
2913 if test x$interp = x; then
2914 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2915 fi
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2917$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002918 PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919 fi
2920else
2921 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2922fi
2923
2924
Martin v. Löwis11437992002-04-12 09:54:03 +00002925
Benjamin Petersond23f8222009-04-05 19:13:16 +00002926if test "$prefix" != "/"; then
2927 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2928fi
2929
2930
Martin v. Löwis11437992002-04-12 09:54:03 +00002931
2932
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002933# We don't use PACKAGE_ variables, and they cause conflicts
2934# with other autoconf-based packages that include Python.h
2935grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2936rm confdefs.h
2937mv confdefs.h.new confdefs.h
2938
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002939
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002940VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002941
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002942# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002943
2944SOVERSION=1.0
2945
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002946# The later defininition of _XOPEN_SOURCE disables certain features
2947# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2948
Matthias Kloseb9621712010-04-24 17:59:49 +00002949$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002950
2951
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002952# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2953# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2954# them.
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002957
2958
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002959# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2960# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2961# them.
2962
Matthias Kloseb9621712010-04-24 17:59:49 +00002963$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002964
2965
Martin v. Löwisd6320502004-08-12 13:45:08 +00002966# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2967# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002970
2971
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002977
2978
2979
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002980define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002982# Arguments passed to configure.
2983
2984CONFIG_ARGS="$ac_configure_args"
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2987$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002988# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002989if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002990 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002991 case $enableval in
2992 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002993 # Locate the best usable SDK, see Mac/README.txt for more
2994 # information
2995 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2996 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002997 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002998 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2999 if test ! -d "${enableval}"
3000 then
3001 enableval=/
3002 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003003 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 ;;
3005 esac
3006 case $enableval in
3007 no)
3008 UNIVERSALSDK=
3009 enable_universalsdk=
3010 ;;
3011 *)
3012 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 if test ! -d "${UNIVERSALSDK}"
3014 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003015 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003019
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021else
3022
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003026fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003027
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028if test -n "${UNIVERSALSDK}"
3029then
Matthias Kloseb9621712010-04-24 17:59:49 +00003030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3031$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032else
Matthias Kloseb9621712010-04-24 17:59:49 +00003033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3034$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003037
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003038
3039
Ned Deilycbfb9a52012-06-23 16:02:19 -07003040# For backward compatibility reasons we prefer to select '32-bit' if available,
3041# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003042UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003043if test "`uname -s`" = "Darwin"
3044then
3045 if test -n "${UNIVERSALSDK}"
3046 then
3047 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3048 then
3049 UNIVERSAL_ARCHS="intel"
3050 fi
3051 fi
3052fi
3053
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003054
Matthias Kloseb9621712010-04-24 17:59:49 +00003055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3056$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003057
3058# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003059if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3062$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063 UNIVERSAL_ARCHS="$withval"
3064
3065else
3066
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3068$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003069
3070fi
3071
3072
3073
3074
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003075
3076# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003078 withval=$with_framework_name;
3079 PYTHONFRAMEWORK=${withval}
3080 PYTHONFRAMEWORKDIR=${withval}.framework
3081 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3082
3083else
3084
3085 PYTHONFRAMEWORK=Python
3086 PYTHONFRAMEWORKDIR=Python.framework
3087 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3088
3089fi
3090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003091# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003094 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003095 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003096 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 esac
3098 case $enableval in
3099 no)
3100 PYTHONFRAMEWORK=
3101 PYTHONFRAMEWORKDIR=no-framework
3102 PYTHONFRAMEWORKPREFIX=
3103 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003104 FRAMEWORKINSTALLFIRST=
3105 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003106 FRAMEWORKALTINSTALLFIRST=
3107 FRAMEWORKALTINSTALLLAST=
3108 if test "x${prefix}" = "xNONE"; then
3109 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003114 ;;
3115 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003116 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003118 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003119 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003120 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3121 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003122 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003123
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 if test "x${prefix}" = "xNONE" ; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003126
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130
3131 case "${enableval}" in
3132 /System*)
3133 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3134 if test "${prefix}" = "NONE" ; then
3135 # See below
3136 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3137 fi
3138 ;;
3139
3140 /Library*)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143
3144 */Library/Frameworks)
3145 MDIR="`dirname "${enableval}"`"
3146 MDIR="`dirname "${MDIR}"`"
3147 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3148
3149 if test "${prefix}" = "NONE"; then
3150 # User hasn't specified the
3151 # --prefix option, but wants to install
3152 # the framework in a non-default location,
3153 # ensure that the compatibility links get
3154 # installed relative to that prefix as well
3155 # instead of in /usr/local.
3156 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3157 fi
3158 ;;
3159
3160 *)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163 esac
3164
Jack Jansen127e56e2001-09-11 14:41:54 +00003165 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003167 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003173 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3174
3175 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3176
Jack Jansene578a632001-08-15 01:27:14 +00003177 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003178
Guido van Rossum563e7081996-09-10 18:20:48 +00003179else
Martin v. Löwis11437992002-04-12 09:54:03 +00003180
Jack Jansene578a632001-08-15 01:27:14 +00003181 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003182 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003183 PYTHONFRAMEWORKPREFIX=
3184 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 FRAMEWORKINSTALLFIRST=
3186 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003187 FRAMEWORKALTINSTALLFIRST=
3188 FRAMEWORKALTINSTALLLAST=
3189 if test "x${prefix}" = "xNONE" ; then
3190 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3191 else
3192 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3193 fi
Jack Jansene578a632001-08-15 01:27:14 +00003194 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003195
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197fi
3198
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
3200
Michael W. Hudson54241132001-12-07 15:38:26 +00003201
3202
3203
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206
3207
3208
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003209
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003210
Jack Jansene578a632001-08-15 01:27:14 +00003211##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003212## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003213## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003214##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215# Set name for machine-dependent library files
3216
Matthias Kloseb9621712010-04-24 17:59:49 +00003217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3218$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219if test -z "$MACHDEP"
3220then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003221 # avoid using uname for cross builds
3222 if test "$cross_compiling" = yes; then
3223 # ac_sys_system and ac_sys_release are only used for setting
3224 # `define_xopen_source' in the case statement below. For the
3225 # current supported cross builds, this macro is not adjusted.
3226 case "$host" in
3227 *-*-linux*)
3228 ac_sys_system=Linux
3229 ;;
3230 *-*-cygwin*)
3231 ac_sys_system=Cygwin
3232 ;;
3233 *)
3234 # for now, limit cross builds to known configurations
3235 MACHDEP="unknown"
3236 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3237 esac
3238 ac_sys_release=
3239 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003240 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003241 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003242 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003243 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003245 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 fi
3248 ac_md_system=`echo $ac_sys_system |
3249 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3250 ac_md_release=`echo $ac_sys_release |
3251 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3252 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003253
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003255 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003256 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003257 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003258 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003259 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261fi
Guido van Rossum91922671997-10-09 20:24:13 +00003262
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003263
3264if test "$cross_compiling" = yes; then
3265 case "$host" in
3266 *-*-linux*)
3267 case "$host_cpu" in
3268 arm*)
3269 _host_cpu=arm
3270 ;;
3271 *)
3272 _host_cpu=$host_cpu
3273 esac
3274 ;;
3275 *-*-cygwin*)
3276 _host_cpu=
3277 ;;
3278 *)
3279 # for now, limit cross builds to known configurations
3280 MACHDEP="unknown"
3281 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3282 esac
3283 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3284fi
3285
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003286# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3287# disable features if it is defined, without any means to access these
3288# features as extensions. For these systems, we skip the definition of
3289# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3290# some feature, make sure there is no alternative way to access this
3291# feature. Also, when using wildcards, make sure you have verified the
3292# need for not defining _XOPEN_SOURCE on all systems matching the
3293# wildcard, and that the wildcard does not include future systems
3294# (which may remove their limitations).
3295case $ac_sys_system/$ac_sys_release in
3296 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3297 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003298 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003299 # In addition, Stefan Krah confirms that issue #1244610 exists through
3300 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003301 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003302 define_xopen_source=no
3303 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3304 # also defined. This can be overridden by defining _BSD_SOURCE
3305 # As this has a different meaning on Linux, only define it on OpenBSD
3306
Matthias Kloseb9621712010-04-24 17:59:49 +00003307$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003308
3309 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003310 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003311 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3312 # also defined. This can be overridden by defining _BSD_SOURCE
3313 # As this has a different meaning on Linux, only define it on OpenBSD
3314
Matthias Kloseb9621712010-04-24 17:59:49 +00003315$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003316
3317 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003318 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3319 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3320 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003321 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 +00003322 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003323 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3324 # request to enable features supported by the standard as a request
3325 # to disable features not supported by the standard. The best way
3326 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3327 # entirely and define __EXTENSIONS__ instead.
3328 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003329 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003330 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3331 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003332 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003333 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003334 define_xopen_source=no;;
3335 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003336 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003337 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003338 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003339 # On FreeBSD 4, the math functions C89 does not cover are never defined
3340 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3341 FreeBSD/4.*)
3342 define_xopen_source=no;;
3343 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3344 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3345 # identifies itself as Darwin/7.*
3346 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3347 # disables platform specific features beyond repair.
3348 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3349 # has no effect, don't bother defining them
3350 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003351 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003352 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003353 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003354 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3355 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3356 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003357 AIX/4)
3358 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003359 AIX/5)
3360 if test `uname -r` -eq 1; then
3361 define_xopen_source=no
3362 fi
3363 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003364 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3365 # defining NI_NUMERICHOST.
3366 QNX/6.3.2)
3367 define_xopen_source=no
3368 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003369
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003370esac
3371
3372if test $define_xopen_source = yes
3373then
Victor Stinner14d098d2011-09-07 22:29:43 +02003374 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003375
Victor Stinner14d098d2011-09-07 22:29:43 +02003376$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003377
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003378
3379 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3380 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3381 # several APIs are not declared. Since this is also needed in some
3382 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003383
Matthias Kloseb9621712010-04-24 17:59:49 +00003384$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003385
3386
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003387
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003388$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003389
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003390fi
3391
Guido van Rossum91922671997-10-09 20:24:13 +00003392#
3393# SGI compilers allow the specification of the both the ABI and the
3394# ISA on the command line. Depending on the values of these switches,
3395# different and often incompatable code will be generated.
3396#
3397# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3398# thus supply support for various ABI/ISA combinations. The MACHDEP
3399# variable is also adjusted.
3400#
3401
3402if test ! -z "$SGI_ABI"
3403then
3404 CC="cc $SGI_ABI"
3405 LDFLAGS="$SGI_ABI $LDFLAGS"
3406 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3409$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003410
Jack Jansen6b08a402004-06-03 12:41:45 +00003411# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3412# it may influence the way we can build extensions, so distutils
3413# needs to check it
3414
Thomas Wouters477c8d52006-05-27 19:21:47 +00003415
Jack Jansen6b08a402004-06-03 12:41:45 +00003416CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003417EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003418
Guido van Rossum627b2d71993-12-24 10:39:16 +00003419# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003420
3421# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3422# for debug/optimization stuff. BASECFLAGS is for flags that are required
3423# just to get things to compile and link. Users are free to override OPT
3424# when running configure or make. The build should not break if they do.
3425# BASECFLAGS should generally not be messed with, however.
3426
3427# XXX shouldn't some/most/all of this code be merged with the stuff later
3428# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3430$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003432# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003433if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003435 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003436 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003437 without_gcc=yes;;
3438 yes) CC=gcc
3439 without_gcc=no;;
3440 *) CC=$withval
3441 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003442 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003443else
Martin v. Löwis11437992002-04-12 09:54:03 +00003444
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003445 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003446 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003447 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003448 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003449 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003450fi
3451
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3453$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003454
Guido van Rossum8b131c51995-03-09 14:10:13 +00003455# If the user switches compilers, we can't believe the cache
3456if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3457then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003458 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003459(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460fi
3461
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003462# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3463# when the compiler supports them, but we don't always want -O2, and
3464# we set -g later.
3465if test -z "$CFLAGS"; then
3466 CFLAGS=
3467fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003468
3469if test "$ac_sys_system" = "Darwin"
3470then
3471 # Compiler selection on MacOSX is more complicated than
3472 # AC_PROG_CC can handle, see Mac/README.txt for more
3473 # information
3474 if test -z "${CC}"
3475 then
3476 found_gcc=
3477 found_clang=
3478 as_save_IFS=$IFS; IFS=:
3479 for as_dir in $PATH
3480 do
3481 IFS=$as_save_IFS
3482 if test -x $as_dir/gcc; then
3483 if test -z "${found_gcc}"; then
3484 found_gcc=$as_dir/gcc
3485 fi
3486 fi
3487 if test -x $as_dir/clang; then
3488 if test -z "${found_clang}"; then
3489 found_clang=$as_dir/clang
3490 fi
3491 fi
3492 done
3493 IFS=$as_save_IFS
3494
3495 if test -n "$found_gcc" -a -n "$found_clang"
3496 then
3497 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3498 then
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3500$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3501 CC="$found_clang"
3502 CXX="$found_clang++"
3503 fi
3504
3505
3506 elif test -z "$found_gcc" -a -n "$found_clang"
3507 then
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3509$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3510 CC="$found_clang"
3511 CXX="$found_clang++"
3512
3513 elif test -z "$found_gcc" -a -z "$found_clang"
3514 then
3515 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3516 if test -n "${found_clang}"
3517 then
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3519$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3520 CC="${found_clang}"
3521 CXX="`/usr/bin/xcrun -find clang++`"
3522
3523 # else: use default behaviour
3524 fi
3525 fi
3526 fi
3527fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003528ac_ext=c
3529ac_cpp='$CPP $CPPFLAGS'
3530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3532ac_compiler_gnu=$ac_cv_c_compiler_gnu
3533if test -n "$ac_tool_prefix"; then
3534 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3535set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3537$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003538if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003540else
3541 if test -n "$CC"; then
3542 ac_cv_prog_CC="$CC" # Let the user override the test.
3543else
Martin v. Löwis11437992002-04-12 09:54:03 +00003544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545for as_dir in $PATH
3546do
3547 IFS=$as_save_IFS
3548 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003550 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 +00003551 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $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 +00003553 break 2
3554 fi
3555done
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003558
Jack Jansendd19cf82001-12-06 22:36:17 +00003559fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003562if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3564$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003565else
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003568fi
3569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572if test -z "$ac_cv_prog_CC"; then
3573 ac_ct_CC=$CC
3574 # Extract the first word of "gcc", so it can be a program name with args.
3575set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003578if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003580else
3581 if test -n "$ac_ct_CC"; then
3582 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3583else
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003590 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 +00003591 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $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 +00003593 break 2
3594 fi
3595done
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003598
3599fi
3600fi
3601ac_ct_CC=$ac_cv_prog_ac_ct_CC
3602if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3604$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605else
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 if test "x$ac_ct_CC" = x; then
3611 CC=""
3612 else
3613 case $cross_compiling:$ac_tool_warned in
3614yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617ac_tool_warned=yes ;;
3618esac
3619 CC=$ac_ct_CC
3620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624
Jack Jansendd19cf82001-12-06 22:36:17 +00003625if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 if test -n "$ac_tool_prefix"; then
3627 # 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 +00003628set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
Martin v. Löwis11437992002-04-12 09:54:03 +00003637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003643 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 +00003644 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $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 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
3652fi
3653fi
3654CC=$ac_cv_prog_CC
3655if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666if test -z "$CC"; then
3667 # Extract the first word of "cc", so it can be a program name with args.
3668set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 if test -n "$CC"; then
3675 ac_cv_prog_CC="$CC" # Let the user override the test.
3676else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003677 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003684 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 +00003685 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3686 ac_prog_rejected=yes
3687 continue
3688 fi
3689 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $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 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003697if test $ac_prog_rejected = yes; then
3698 # We found a bogon in the path, so make sure we never use it.
3699 set dummy $ac_cv_prog_CC
3700 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702 # We chose a different compiler from the bogus one.
3703 # However, it has the same basename, so the bogon will be chosen
3704 # first if we set CC to just the basename; use the full file name.
3705 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003706 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 fi
3708fi
3709fi
3710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715else
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718fi
3719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 do
3726 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003742 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 +00003743 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
3751fi
3752fi
3753CC=$ac_cv_prog_CC
3754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 test -n "$CC" && break
3764 done
3765fi
3766if test -z "$CC"; then
3767 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769do
3770 # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003776else
3777 if test -n "$ac_ct_CC"; then
3778 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3779else
3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003786 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 +00003787 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $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 +00003789 break 2
3790 fi
3791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
3796fi
3797ac_ct_CC=$ac_cv_prog_ac_ct_CC
3798if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3800$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$ac_ct_CC" && break
3808done
Michael W. Hudson54241132001-12-07 15:38:26 +00003809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 if test "x$ac_ct_CC" = x; then
3811 CC=""
3812 else
3813 case $cross_compiling:$ac_tool_warned in
3814yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817ac_tool_warned=yes ;;
3818esac
3819 CC=$ac_ct_CC
3820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822
3823fi
3824
3825
Matthias Kloseb9621712010-04-24 17:59:49 +00003826test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003828as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003829See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
3831# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3833set X $ac_compile
3834ac_compiler=$2
3835for ac_option in --version -v -V -qversion; do
3836 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837case "(($ac_try" in
3838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3839 *) ac_try_echo=$ac_try;;
3840esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3842$as_echo "$ac_try_echo"; } >&5
3843 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 if test -s conftest.err; then
3846 sed '10a\
3847... rest of stderr output deleted ...
3848 10q' conftest.err >conftest.er1
3849 cat conftest.er1 >&5
3850 fi
3851 rm -f conftest.er1 conftest.err
3852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3853 test $ac_status = 0; }
3854done
Martin v. Löwis11437992002-04-12 09:54:03 +00003855
Matthias Kloseb9621712010-04-24 17:59:49 +00003856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003857/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859int
3860main ()
3861{
3862
3863 ;
3864 return 0;
3865}
3866_ACEOF
3867ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003868ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003869# Try to create an executable without -o first, disregard a.out.
3870# It will help us diagnose broken compilers, and finding out an intuition
3871# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3873$as_echo_n "checking whether the C compiler works... " >&6; }
3874ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3875
3876# The possible output files:
3877ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_rmfiles=
3880for ac_file in $ac_files
3881do
3882 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3885 esac
3886done
3887rm -f $ac_rmfiles
3888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890case "(($ac_try" in
3891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892 *) ac_try_echo=$ac_try;;
3893esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3901# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3902# in a Makefile. We should not override ac_cv_exeext if it was cached,
3903# so that the user can short-circuit this test for compilers unknown to
3904# Autoconf.
3905for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003906do
3907 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910 ;;
3911 [ab].out )
3912 # We found the default executable, but exeext='' is most
3913 # certainly right.
3914 break;;
3915 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 then :; else
3918 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3919 fi
3920 # We set ac_cv_exeext here because the later test for it is not
3921 # safe: cross compilers may not add the suffix if given an `-o'
3922 # argument, so we may need to know it at that point already.
3923 # Even if this section looks crufty: it has the advantage of
3924 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003925 break;;
3926 * )
3927 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 esac
3929done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930test "$ac_cv_exeext" = no && ac_cv_exeext=
3931
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003932else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 ac_file=''
3934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if test -z "$ac_file"; then :
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003939sed 's/^/| /' conftest.$ac_ext >&5
3940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003943as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003944See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003945else
3946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3947$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3950$as_echo_n "checking for C compiler default output file name... " >&6; }
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3952$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954
Matthias Kloseb9621712010-04-24 17:59:49 +00003955rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3958$as_echo_n "checking for suffix of executables... " >&6; }
3959if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3971# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3972# work properly (i.e., refer to `conftest.exe'), while it won't with
3973# `rm'.
3974for ac_file in conftest.exe conftest conftest.*; do
3975 test -f "$ac_file" || continue
3976 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3979 break;;
3980 * ) break;;
3981 esac
3982done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f conftest conftest$ac_cv_exeext
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3991$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992
3993rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003994EXEEXT=$ac_cv_exeext
3995ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997/* end confdefs.h. */
3998#include <stdio.h>
3999int
4000main ()
4001{
4002FILE *f = fopen ("conftest.out", "w");
4003 return ferror (f) || fclose (f) != 0;
4004
4005 ;
4006 return 0;
4007}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files conftest.out"
4010# Check that the compiler produces executables we can run. If not, either
4011# the compiler is broken, or we cross compile.
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4013$as_echo_n "checking whether we are cross compiling... " >&6; }
4014if test "$cross_compiling" != yes; then
4015 { { ac_try="$ac_link"
4016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
4020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
4022 (eval "$ac_link") 2>&5
4023 ac_status=$?
4024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }
4026 if { ac_try='./conftest$ac_cv_exeext'
4027 { { case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_try") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; }; then
4037 cross_compiling=no
4038 else
4039 if test "$cross_compiling" = maybe; then
4040 cross_compiling=yes
4041 else
4042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004044as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004045If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004046See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 fi
4048 fi
4049fi
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4051$as_echo "$cross_compiling" >&6; }
4052
4053rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4054ac_clean_files=$ac_clean_files_save
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4056$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004057if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 $as_echo_n "(cached) " >&6
4059else
4060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061/* end confdefs.h. */
4062
4063int
4064main ()
4065{
4066
4067 ;
4068 return 0;
4069}
4070_ACEOF
4071rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004072if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 for ac_file in conftest.o conftest.obj conftest.*; do
4084 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4088 break;;
4089 esac
4090done
4091else
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004093sed 's/^/| /' conftest.$ac_ext >&5
4094
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004097as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004098See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004099fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004100rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4103$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104OBJEXT=$ac_cv_objext
4105ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4107$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004108if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004113
Martin v. Löwis11437992002-04-12 09:54:03 +00004114int
4115main ()
4116{
4117#ifndef __GNUC__
4118 choke me
4119#endif
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_compiler_gnu=yes
4127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004131ac_cv_c_compiler_gnu=$ac_compiler_gnu
4132
4133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4135$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4136if test $ac_compiler_gnu = yes; then
4137 GCC=yes
4138else
4139 GCC=
4140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141ac_test_CFLAGS=${CFLAGS+set}
4142ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4144$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004145if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004147else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148 ac_save_c_werror_flag=$ac_c_werror_flag
4149 ac_c_werror_flag=yes
4150 ac_cv_prog_cc_g=no
4151 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004164 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 CFLAGS=""
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168/* end confdefs.h. */
4169
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179
Matthias Kloseb9621712010-04-24 17:59:49 +00004180else
4181 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184/* end confdefs.h. */
4185
4186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202 ac_c_werror_flag=$ac_save_c_werror_flag
4203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4205$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004208elif test $ac_cv_prog_cc_g = yes; then
4209 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 CFLAGS="-g -O2"
4211 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213 fi
4214else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215 if test "$GCC" = yes; then
4216 CFLAGS="-O2"
4217 else
4218 CFLAGS=
4219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4222$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004223if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004227ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
4230#include <stdarg.h>
4231#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004232#include <sys/types.h>
4233#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4235struct buf { int x; };
4236FILE * (*rcsopen) (struct buf *, struct stat *, int);
4237static char *e (p, i)
4238 char **p;
4239 int i;
4240{
4241 return p[i];
4242}
4243static char *f (char * (*g) (char **, int), char **p, ...)
4244{
4245 char *s;
4246 va_list v;
4247 va_start (v,p);
4248 s = g (p, va_arg (v,int));
4249 va_end (v);
4250 return s;
4251}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252
4253/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4254 function prototypes and stuff, but not '\xHH' hex character constants.
4255 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4258 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4263 inside strings and character constants. */
4264#define FOO(x) 'x'
4265int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4266
Skip Montanaro6dead952003-09-25 14:50:04 +00004267int test (int i, double x);
4268struct s1 {int (*f) (int a);};
4269struct s2 {int (*f) (double a);};
4270int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4271int argc;
4272char **argv;
4273int
4274main ()
4275{
4276return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4277 ;
4278 return 0;
4279}
4280_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4282 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004283do
4284 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext
4289 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292CC=$ac_save_CC
4293
4294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295# AC_CACHE_VAL
4296case "x$ac_cv_prog_cc_c89" in
4297 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4299$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4302$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004303 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4306$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004309
Matthias Kloseb9621712010-04-24 17:59:49 +00004310fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004318
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004319
4320
Matthias Kloseb9621712010-04-24 17:59:49 +00004321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4322$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004325if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004327
4328 case $withval in
4329 no) with_cxx_main=no
4330 MAINCC='$(CC)';;
4331 yes) with_cxx_main=yes
4332 MAINCC='$(CXX)';;
4333 *) with_cxx_main=yes
4334 MAINCC=$withval
4335 if test -z "$CXX"
4336 then
4337 CXX=$withval
4338 fi;;
4339 esac
4340else
4341
4342 with_cxx_main=no
4343 MAINCC='$(CC)'
4344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345fi
4346
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4348$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004349
4350preset_cxx="$CXX"
4351if test -z "$CXX"
4352then
4353 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004354 gcc) if test -n "$ac_tool_prefix"; then
4355 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4356set dummy ${ac_tool_prefix}g++; ac_word=$2
4357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4358$as_echo_n "checking for $ac_word... " >&6; }
4359if ${ac_cv_path_CXX+:} false; then :
4360 $as_echo_n "(cached) " >&6
4361else
4362 case $CXX in
4363 [\\/]* | ?:[\\/]*)
4364 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4365 ;;
4366 *)
4367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4368for as_dir in notfound
4369do
4370 IFS=$as_save_IFS
4371 test -z "$as_dir" && as_dir=.
4372 for ac_exec_ext in '' $ac_executable_extensions; do
4373 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4374 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4376 break 2
4377 fi
4378done
4379 done
4380IFS=$as_save_IFS
4381
4382 ;;
4383esac
4384fi
4385CXX=$ac_cv_path_CXX
4386if test -n "$CXX"; then
4387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4388$as_echo "$CXX" >&6; }
4389else
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4391$as_echo "no" >&6; }
4392fi
4393
4394
4395fi
4396if test -z "$ac_cv_path_CXX"; then
4397 ac_pt_CXX=$CXX
4398 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004399set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004402if ${ac_cv_path_ac_pt_CXX+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 case $ac_pt_CXX in
4406 [\\/]* | ?:[\\/]*)
4407 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4408 ;;
4409 *)
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in notfound
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
4415 for ac_exec_ext in '' $ac_executable_extensions; do
4416 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4417 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419 break 2
4420 fi
4421done
4422 done
4423IFS=$as_save_IFS
4424
4425 ;;
4426esac
4427fi
4428ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4429if test -n "$ac_pt_CXX"; then
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4431$as_echo "$ac_pt_CXX" >&6; }
4432else
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437 if test "x$ac_pt_CXX" = x; then
4438 CXX="g++"
4439 else
4440 case $cross_compiling:$ac_tool_warned in
4441yes:)
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4443$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4444ac_tool_warned=yes ;;
4445esac
4446 CXX=$ac_pt_CXX
4447 fi
4448else
4449 CXX="$ac_cv_path_CXX"
4450fi
4451 ;;
4452 cc) if test -n "$ac_tool_prefix"; then
4453 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4454set dummy ${ac_tool_prefix}c++; ac_word=$2
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4456$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004457if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004459else
4460 case $CXX in
4461 [\\/]* | ?:[\\/]*)
4462 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4463 ;;
4464 *)
4465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4466for as_dir in notfound
4467do
4468 IFS=$as_save_IFS
4469 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004470 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004471 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 +00004472 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004474 break 2
4475 fi
4476done
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004479
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004480 ;;
4481esac
4482fi
4483CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004484if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4486$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004487else
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4489$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004492
4493fi
4494if test -z "$ac_cv_path_CXX"; then
4495 ac_pt_CXX=$CXX
4496 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004497set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004500if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004503 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004505 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 +00004506 ;;
4507 *)
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in notfound
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004514 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4515 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004517 break 2
4518 fi
4519done
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 ;;
4524esac
4525fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004526ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4527if test -n "$ac_pt_CXX"; then
4528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4529$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004530else
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004534
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535 if test "x$ac_pt_CXX" = x; then
4536 CXX="c++"
4537 else
4538 case $cross_compiling:$ac_tool_warned in
4539yes:)
4540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4542ac_tool_warned=yes ;;
4543esac
4544 CXX=$ac_pt_CXX
4545 fi
4546else
4547 CXX="$ac_cv_path_CXX"
4548fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004550 clang|*/clang) if test -n "$ac_tool_prefix"; then
4551 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4552set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4554$as_echo_n "checking for $ac_word... " >&6; }
4555if ${ac_cv_path_CXX+:} false; then :
4556 $as_echo_n "(cached) " >&6
4557else
4558 case $CXX in
4559 [\\/]* | ?:[\\/]*)
4560 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4561 ;;
4562 *)
4563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4564for as_dir in notfound
4565do
4566 IFS=$as_save_IFS
4567 test -z "$as_dir" && as_dir=.
4568 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569 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 -07004570 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4572 break 2
4573 fi
4574done
4575 done
4576IFS=$as_save_IFS
4577
Ned Deilycbfb9a52012-06-23 16:02:19 -07004578 ;;
4579esac
4580fi
4581CXX=$ac_cv_path_CXX
4582if test -n "$CXX"; then
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4584$as_echo "$CXX" >&6; }
4585else
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588fi
4589
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004590
4591fi
4592if test -z "$ac_cv_path_CXX"; then
4593 ac_pt_CXX=$CXX
4594 # Extract the first word of "clang++", so it can be a program name with args.
4595set dummy clang++; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_path_ac_pt_CXX+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 case $ac_pt_CXX in
4602 [\\/]* | ?:[\\/]*)
4603 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4604 ;;
4605 *)
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in notfound
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_exec_ext in '' $ac_executable_extensions; do
4612 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 break 2
4616 fi
4617done
4618 done
4619IFS=$as_save_IFS
4620
4621 ;;
4622esac
4623fi
4624ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4625if test -n "$ac_pt_CXX"; then
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4627$as_echo "$ac_pt_CXX" >&6; }
4628else
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633 if test "x$ac_pt_CXX" = x; then
4634 CXX="clang++"
4635 else
4636 case $cross_compiling:$ac_tool_warned in
4637yes:)
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4640ac_tool_warned=yes ;;
4641esac
4642 CXX=$ac_pt_CXX
4643 fi
4644else
4645 CXX="$ac_cv_path_CXX"
4646fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004647 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648 esac
4649 if test "$CXX" = "notfound"
4650 then
4651 CXX=""
4652 fi
4653fi
4654if test -z "$CXX"
4655then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656 if test -n "$ac_tool_prefix"; then
4657 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4658 do
4659 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004663if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665else
4666 if test -n "$CXX"; then
4667 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4668else
4669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670for as_dir in $PATH
4671do
4672 IFS=$as_save_IFS
4673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004674 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4676 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678 break 2
4679 fi
4680done
Matthias Kloseb9621712010-04-24 17:59:49 +00004681 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004682IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004683
4684fi
4685fi
4686CXX=$ac_cv_prog_CXX
4687if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4689$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690else
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693fi
4694
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004695
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004696 test -n "$CXX" && break
4697 done
4698fi
4699if test -z "$CXX"; then
4700 ac_ct_CXX=$CXX
4701 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4702do
4703 # Extract the first word of "$ac_prog", so it can be a program name with args.
4704set dummy $ac_prog; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4708 $as_echo_n "(cached) " >&6
4709else
4710 if test -n "$ac_ct_CXX"; then
4711 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4712else
4713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4714for as_dir in $PATH
4715do
4716 IFS=$as_save_IFS
4717 test -z "$as_dir" && as_dir=.
4718 for ac_exec_ext in '' $ac_executable_extensions; do
4719 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4720 ac_cv_prog_ac_ct_CXX="$ac_prog"
4721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4722 break 2
4723 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004725 done
4726IFS=$as_save_IFS
4727
4728fi
4729fi
4730ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4731if test -n "$ac_ct_CXX"; then
4732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4733$as_echo "$ac_ct_CXX" >&6; }
4734else
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736$as_echo "no" >&6; }
4737fi
4738
4739
4740 test -n "$ac_ct_CXX" && break
4741done
4742
4743 if test "x$ac_ct_CXX" = x; then
4744 CXX="notfound"
4745 else
4746 case $cross_compiling:$ac_tool_warned in
4747yes:)
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4750ac_tool_warned=yes ;;
4751esac
4752 CXX=$ac_ct_CXX
4753 fi
4754fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004755
4756 if test "$CXX" = "notfound"
4757 then
4758 CXX=""
4759 fi
4760fi
4761if test "$preset_cxx" != "$CXX"
4762then
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764
4765 By default, distutils will build C++ extension modules with \"$CXX\".
4766 If this is not intended, then set CXX on the configure command line.
4767 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004768$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769
4770 By default, distutils will build C++ extension modules with \"$CXX\".
4771 If this is not intended, then set CXX on the configure command line.
4772 " >&2;}
4773fi
4774
4775
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4777$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4778save_LDFLAGS="$LDFLAGS"
4779LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004780
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4782/* end confdefs.h. */
4783
4784int
4785main ()
4786{
4787
4788 ;
4789 return 0;
4790}
4791_ACEOF
4792if ac_fn_c_try_link "$LINENO"; then :
4793 NO_AS_NEEDED="-Wl,--no-as-needed"
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4795$as_echo "yes" >&6; }
4796else
4797 NO_AS_NEEDED=""
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4799$as_echo "no" >&6; }
4800fi
4801rm -f core conftest.err conftest.$ac_objext \
4802 conftest$ac_exeext conftest.$ac_ext
4803LDFLAGS="$save_LDFLAGS"
4804
4805
4806
4807# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004808ac_ext=c
4809ac_cpp='$CPP $CPPFLAGS'
4810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4812ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4814$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004815# On Suns, sometimes $CPP names a directory.
4816if test -n "$CPP" && test -d "$CPP"; then
4817 CPP=
4818fi
4819if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004820 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004822else
Martin v. Löwis11437992002-04-12 09:54:03 +00004823 # Double quotes because CPP needs to be expanded
4824 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4825 do
4826 ac_preproc_ok=false
4827for ac_c_preproc_warn_flag in '' yes
4828do
4829 # Use a header file that comes with gcc, so configuring glibc
4830 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004831 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4832 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004833 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004836/* end confdefs.h. */
4837#ifdef __STDC__
4838# include <limits.h>
4839#else
4840# include <assert.h>
4841#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004842 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004844if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004845
Matthias Kloseb9621712010-04-24 17:59:49 +00004846else
Martin v. Löwis11437992002-04-12 09:54:03 +00004847 # Broken: fails on valid input.
4848continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004849fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004850rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004852 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004856#include <ac_nonexistent.h>
4857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004858if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 # Broken: success on invalid input.
4860continue
4861else
Martin v. Löwis11437992002-04-12 09:54:03 +00004862 # Passes both tests.
4863ac_preproc_ok=:
4864break
4865fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004866rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004867
4868done
4869# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004870rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004871if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 break
4873fi
4874
4875 done
4876 ac_cv_prog_CPP=$CPP
4877
4878fi
4879 CPP=$ac_cv_prog_CPP
4880else
4881 ac_cv_prog_CPP=$CPP
4882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4884$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004885ac_preproc_ok=false
4886for ac_c_preproc_warn_flag in '' yes
4887do
4888 # Use a header file that comes with gcc, so configuring glibc
4889 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004890 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4891 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # On the NeXT, cc -E runs the code through the compiler's parser,
4893 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004895/* end confdefs.h. */
4896#ifdef __STDC__
4897# include <limits.h>
4898#else
4899# include <assert.h>
4900#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004901 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004903if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004904
Matthias Kloseb9621712010-04-24 17:59:49 +00004905else
Martin v. Löwis11437992002-04-12 09:54:03 +00004906 # Broken: fails on valid input.
4907continue
4908fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004909rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004911 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004912 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004915#include <ac_nonexistent.h>
4916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004917if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # Broken: success on invalid input.
4919continue
4920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Passes both tests.
4922ac_preproc_ok=:
4923break
4924fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004925rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004926
4927done
4928# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004929rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004930if $ac_preproc_ok; then :
4931
Martin v. Löwis11437992002-04-12 09:54:03 +00004932else
Matthias Kloseb9621712010-04-24 17:59:49 +00004933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004935as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004936See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004937fi
4938
4939ac_ext=c
4940ac_cpp='$CPP $CPPFLAGS'
4941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4943ac_compiler_gnu=$ac_cv_c_compiler_gnu
4944
4945
Matthias Kloseb9621712010-04-24 17:59:49 +00004946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004948if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004949 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004950else
Matthias Kloseb9621712010-04-24 17:59:49 +00004951 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004952 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 # Loop through the user's path and test for each of PROGNAME-LIST
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 for ac_prog in grep ggrep; do
4960 for ac_exec_ext in '' $ac_executable_extensions; do
4961 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004962 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004963# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004964 # Check for GNU $ac_path_GREP
4965case `"$ac_path_GREP" --version 2>&1` in
4966*GNU*)
4967 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4968*)
4969 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004970 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004971 while :
4972 do
4973 cat "conftest.in" "conftest.in" >"conftest.tmp"
4974 mv "conftest.tmp" "conftest.in"
4975 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004977 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4978 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4981 # Best one so far, save it but keep looking for a better one
4982 ac_cv_path_GREP="$ac_path_GREP"
4983 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004984 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 # 10*(2^10) chars as input seems more than enough
4986 test $ac_count -gt 10 && break
4987 done
4988 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4989esac
4990
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 $ac_path_GREP_found && break 3
4992 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004993 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004996 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004997 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 +00004998 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999else
5000 ac_cv_path_GREP=$GREP
5001fi
5002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5005$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006 GREP="$ac_cv_path_GREP"
5007
5008
Matthias Kloseb9621712010-04-24 17:59:49 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5010$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005011if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013else
5014 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5015 then ac_cv_path_EGREP="$GREP -E"
5016 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 # Loop through the user's path and test for each of PROGNAME-LIST
5020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005021for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5022do
5023 IFS=$as_save_IFS
5024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 for ac_prog in egrep; do
5026 for ac_exec_ext in '' $ac_executable_extensions; do
5027 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005028 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005029# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030 # Check for GNU $ac_path_EGREP
5031case `"$ac_path_EGREP" --version 2>&1` in
5032*GNU*)
5033 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5034*)
5035 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005037 while :
5038 do
5039 cat "conftest.in" "conftest.in" >"conftest.tmp"
5040 mv "conftest.tmp" "conftest.in"
5041 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5044 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5047 # Best one so far, save it but keep looking for a better one
5048 ac_cv_path_EGREP="$ac_path_EGREP"
5049 ac_path_EGREP_max=$ac_count
5050 fi
5051 # 10*(2^10) chars as input seems more than enough
5052 test $ac_count -gt 10 && break
5053 done
5054 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5055esac
5056
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 $ac_path_EGREP_found && break 3
5058 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005063 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 +00005064 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065else
5066 ac_cv_path_EGREP=$EGREP
5067fi
5068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 fi
5070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5072$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005074
5075
Matthias Kloseb9621712010-04-24 17:59:49 +00005076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5077$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005078if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n "(cached) " >&6
5080else
5081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005082/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005083#include <stdlib.h>
5084#include <stdarg.h>
5085#include <string.h>
5086#include <float.h>
5087
5088int
5089main ()
5090{
5091
5092 ;
5093 return 0;
5094}
5095_ACEOF
5096if ac_fn_c_try_compile "$LINENO"; then :
5097 ac_cv_header_stdc=yes
5098else
5099 ac_cv_header_stdc=no
5100fi
5101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5102
5103if test $ac_cv_header_stdc = yes; then
5104 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106/* end confdefs.h. */
5107#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005108
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005109_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005112
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005113else
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005116rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005117
Matthias Kloseb9621712010-04-24 17:59:49 +00005118fi
5119
5120if test $ac_cv_header_stdc = yes; then
5121 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5123/* end confdefs.h. */
5124#include <stdlib.h>
5125
5126_ACEOF
5127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5128 $EGREP "free" >/dev/null 2>&1; then :
5129
5130else
5131 ac_cv_header_stdc=no
5132fi
5133rm -f conftest*
5134
5135fi
5136
5137if test $ac_cv_header_stdc = yes; then
5138 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5139 if test "$cross_compiling" = yes; then :
5140 :
5141else
5142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5143/* end confdefs.h. */
5144#include <ctype.h>
5145#include <stdlib.h>
5146#if ((' ' & 0x0FF) == 0x020)
5147# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5148# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5149#else
5150# define ISLOWER(c) \
5151 (('a' <= (c) && (c) <= 'i') \
5152 || ('j' <= (c) && (c) <= 'r') \
5153 || ('s' <= (c) && (c) <= 'z'))
5154# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5155#endif
5156
5157#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5158int
5159main ()
5160{
5161 int i;
5162 for (i = 0; i < 256; i++)
5163 if (XOR (islower (i), ISLOWER (i))
5164 || toupper (i) != TOUPPER (i))
5165 return 2;
5166 return 0;
5167}
5168_ACEOF
5169if ac_fn_c_try_run "$LINENO"; then :
5170
5171else
5172 ac_cv_header_stdc=no
5173fi
5174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5175 conftest.$ac_objext conftest.beam conftest.$ac_ext
5176fi
5177
5178fi
5179fi
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5181$as_echo "$ac_cv_header_stdc" >&6; }
5182if test $ac_cv_header_stdc = yes; then
5183
5184$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5185
5186fi
5187
5188# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5189for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5190 inttypes.h stdint.h unistd.h
5191do :
5192 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5193ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5194"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005195if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005196 cat >>confdefs.h <<_ACEOF
5197#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5198_ACEOF
5199
5200fi
5201
5202done
5203
5204
5205
5206 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 +02005207if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005208 MINIX=yes
5209else
5210 MINIX=
5211fi
5212
5213
5214 if test "$MINIX" = yes; then
5215
5216$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5217
5218
5219$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5220
5221
5222$as_echo "#define _MINIX 1" >>confdefs.h
5223
5224 fi
5225
5226
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5228$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005229if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005230 $as_echo_n "(cached) " >&6
5231else
5232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5233/* end confdefs.h. */
5234
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005235# define __EXTENSIONS__ 1
5236 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005237int
5238main ()
5239{
5240
5241 ;
5242 return 0;
5243}
5244_ACEOF
5245if ac_fn_c_try_compile "$LINENO"; then :
5246 ac_cv_safe_to_define___extensions__=yes
5247else
5248 ac_cv_safe_to_define___extensions__=no
5249fi
5250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5251fi
5252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5253$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5254 test $ac_cv_safe_to_define___extensions__ = yes &&
5255 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5256
5257 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5258
5259 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5260
5261 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5262
5263 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5264
5265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005267# Check for unsupported systems
5268case $ac_sys_system/$ac_sys_release in
5269atheos*|Linux*/1*)
5270 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5271 echo See README for details.
5272 exit 1;;
5273esac
5274
5275
Matthias Kloseb9621712010-04-24 17:59:49 +00005276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5277$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005278
5279# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005280if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281 withval=$with_suffix;
5282 case $withval in
5283 no) EXEEXT=;;
5284 yes) EXEEXT=.exe;;
5285 *) EXEEXT=$withval;;
5286 esac
5287fi
5288
Matthias Kloseb9621712010-04-24 17:59:49 +00005289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5290$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291
5292# Test whether we're running on a non-case-sensitive system, in which
5293# case we give a warning if no ext is given
5294
Matthias Kloseb9621712010-04-24 17:59:49 +00005295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5296$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297if test ! -d CaseSensitiveTestDir; then
5298mkdir CaseSensitiveTestDir
5299fi
5300
5301if test -d casesensitivetestdir
5302then
Matthias Kloseb9621712010-04-24 17:59:49 +00005303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5304$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 BUILDEXEEXT=.exe
5306else
Matthias Kloseb9621712010-04-24 17:59:49 +00005307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309 BUILDEXEEXT=$EXEEXT
5310fi
5311rmdir CaseSensitiveTestDir
5312
5313case $MACHDEP in
5314bsdos*)
5315 case $CC in
5316 gcc) CC="$CC -D_HAVE_BSDI";;
5317 esac;;
5318esac
5319
5320case $ac_sys_system in
5321hp*|HP*)
5322 case $CC in
5323 cc|*/cc) CC="$CC -Ae";;
5324 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325esac
5326
5327
5328
Matthias Kloseb9621712010-04-24 17:59:49 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5330$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005331if test -z "$LIBRARY"
5332then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005333 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5336$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
5338# LDLIBRARY is the name of the library to link against (as opposed to the
5339# name of the library into which to insert object files). BLDLIBRARY is also
5340# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5341# is blank as the main program is not linked directly against LDLIBRARY.
5342# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5343# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5344# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5345# DLLLIBRARY is the shared (i.e., DLL) library.
5346#
5347# RUNSHARED is used to run shared python without installed libraries
5348#
5349# INSTSONAME is the name of the shared library that will be use to install
5350# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005351#
5352# LDVERSION is the shared library version number, normally the Python version
5353# with the ABI build flags appended.
5354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355
5356
5357
5358
5359
5360
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362LDLIBRARY="$LIBRARY"
5363BLDLIBRARY='$(LDLIBRARY)'
5364INSTSONAME='$(LDLIBRARY)'
5365DLLLIBRARY=''
5366LDLIBRARYDIR=''
5367RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005368LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369
5370# LINKCC is the command that links the python executable -- default is $(CC).
5371# If CXX is set, and if it is needed to link a main function that was
5372# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5373# python might then depend on the C++ runtime
5374# This is altered for AIX in order to build the export list before
5375# linking.
5376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5378$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379if test -z "$LINKCC"
5380then
5381 LINKCC='$(PURIFY) $(MAINCC)'
5382 case $ac_sys_system in
5383 AIX*)
5384 exp_extra="\"\""
5385 if test $ac_sys_release -ge 5 -o \
5386 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5387 exp_extra="."
5388 fi
5389 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390 QNX*)
5391 # qcc must be used because the other compilers do not
5392 # support -N.
5393 LINKCC=qcc;;
5394 esac
5395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5397$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398
5399# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5400# make sure we default having it set to "no": this is used by
5401# distutils.unixccompiler to know if it should add --enable-new-dtags
5402# to linker command lines, and failing to detect GNU ld simply results
5403# in the same bahaviour as before.
5404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5406$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407ac_prog=ld
5408if test "$GCC" = yes; then
5409 ac_prog=`$CC -print-prog-name=ld`
5410fi
5411case `"$ac_prog" -V 2>&1 < /dev/null` in
5412 *GNU*)
5413 GNULD=yes;;
5414 *)
5415 GNULD=no;;
5416esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5418$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005419
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5421$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005422if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005423 $as_echo_n "(cached) " >&6
5424else
5425 ac_cv_c_inline=no
5426for ac_kw in inline __inline__ __inline; do
5427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5428/* end confdefs.h. */
5429#ifndef __cplusplus
5430typedef int foo_t;
5431static $ac_kw foo_t static_foo () {return 0; }
5432$ac_kw foo_t foo () {return 0; }
5433#endif
5434
5435_ACEOF
5436if ac_fn_c_try_compile "$LINENO"; then :
5437 ac_cv_c_inline=$ac_kw
5438fi
5439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5440 test "$ac_cv_c_inline" != no && break
5441done
5442
5443fi
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5445$as_echo "$ac_cv_c_inline" >&6; }
5446
5447case $ac_cv_c_inline in
5448 inline | yes) ;;
5449 *)
5450 case $ac_cv_c_inline in
5451 no) ac_val=;;
5452 *) ac_val=$ac_cv_c_inline;;
5453 esac
5454 cat >>confdefs.h <<_ACEOF
5455#ifndef __cplusplus
5456#define inline $ac_val
5457#endif
5458_ACEOF
5459 ;;
5460esac
5461
5462if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005463
5464$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005465
5466
5467fi
5468
5469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5471$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005473if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474 enableval=$enable_shared;
5475fi
5476
5477
5478if test -z "$enable_shared"
5479then
5480 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005481 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005482 enable_shared="yes";;
5483 *)
5484 enable_shared="no";;
5485 esac
5486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5488$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
Matthias Kloseb9621712010-04-24 17:59:49 +00005490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5491$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005493if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005494 enableval=$enable_profiling;
5495fi
5496
5497if test "x$enable_profiling" = xyes; then
5498 ac_save_cc="$CC"
5499 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501/* end confdefs.h. */
5502int main() { return 0; }
5503_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005504if ac_fn_c_try_link "$LINENO"; then :
5505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005506else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005507 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005509rm -f core conftest.err conftest.$ac_objext \
5510 conftest$ac_exeext conftest.$ac_ext
5511 CC="$ac_save_cc"
5512else
5513 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5516$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517
doko@ubuntu.comba015832012-06-30 16:52:05 +02005518if test "x$enable_profiling" = xyes; then
5519 BASECFLAGS="-pg $BASECFLAGS"
5520 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521fi
5522
Matthias Kloseb9621712010-04-24 17:59:49 +00005523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5524$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525
5526# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5527# library that we build, but we do not want to link against it (we
5528# will find it with a -framework option). For this reason there is an
5529# extra variable BLDLIBRARY against which Python and the extension
5530# modules are linked, BLDLIBRARY. This is normally the same as
5531# LDLIBRARY, but empty for MacOSX framework builds.
5532if test "$enable_framework"
5533then
5534 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5535 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5536 BLDLIBRARY=''
5537else
5538 BLDLIBRARY='$(LDLIBRARY)'
5539fi
5540
5541# Other platforms follow
5542if test $enable_shared = "yes"; then
5543
Matthias Kloseb9621712010-04-24 17:59:49 +00005544$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
5546 case $ac_sys_system in
5547 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005548 LDLIBRARY='libpython$(LDVERSION).dll.a'
5549 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550 ;;
5551 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005552 LDLIBRARY='libpython$(LDVERSION).so'
5553 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5555 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005556 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005557 then
5558 PY3LIBRARY=libpython3.so
5559 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005561 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005562 LDLIBRARY='libpython$(LDVERSION).so'
5563 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005564 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5565 case $ac_sys_system in
5566 FreeBSD*)
5567 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5568 ;;
5569 esac
5570 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005571 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005572 then
5573 PY3LIBRARY=libpython3.so
5574 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575 ;;
5576 hp*|HP*)
5577 case `uname -m` in
5578 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005579 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580 ;;
5581 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005582 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 ;;
5584 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005585 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5587 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005589 LDLIBRARY='libpython$(LDVERSION).dylib'
5590 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5592 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005593 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005594 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005595 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5596 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
5598 esac
5599else # shared is disabled
5600 case $ac_sys_system in
5601 CYGWIN*)
5602 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005603 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 ;;
5605 esac
5606fi
5607
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005608if test "$cross_compiling" = yes; then
5609 RUNSHARED=
5610fi
5611
Matthias Kloseb9621712010-04-24 17:59:49 +00005612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5613$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005614
5615if test -n "$ac_tool_prefix"; then
5616 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5617set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005620if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622else
5623 if test -n "$RANLIB"; then
5624 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5625else
5626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629 IFS=$as_save_IFS
5630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005632 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 +00005633 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 break 2
5636 fi
5637done
Matthias Kloseb9621712010-04-24 17:59:49 +00005638 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639IFS=$as_save_IFS
5640
5641fi
5642fi
5643RANLIB=$ac_cv_prog_RANLIB
5644if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5646$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647else
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650fi
5651
5652
5653fi
5654if test -z "$ac_cv_prog_RANLIB"; then
5655 ac_ct_RANLIB=$RANLIB
5656 # Extract the first word of "ranlib", so it can be a program name with args.
5657set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005660if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662else
5663 if test -n "$ac_ct_RANLIB"; then
5664 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5665else
5666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667for as_dir in $PATH
5668do
5669 IFS=$as_save_IFS
5670 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005672 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 +00005673 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 break 2
5676 fi
5677done
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679IFS=$as_save_IFS
5680
5681fi
5682fi
5683ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5684if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5686$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687else
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690fi
5691
5692 if test "x$ac_ct_RANLIB" = x; then
5693 RANLIB=":"
5694 else
5695 case $cross_compiling:$ac_tool_warned in
5696yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699ac_tool_warned=yes ;;
5700esac
5701 RANLIB=$ac_ct_RANLIB
5702 fi
5703else
5704 RANLIB="$ac_cv_prog_RANLIB"
5705fi
5706
5707
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005708if test -n "$ac_tool_prefix"; then
5709 for ac_prog in ar aal
5710 do
5711 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5712set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5714$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005715if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717else
5718 if test -n "$AR"; then
5719 ac_cv_prog_AR="$AR" # Let the user override the test.
5720else
5721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5722for as_dir in $PATH
5723do
5724 IFS=$as_save_IFS
5725 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005727 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5728 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730 break 2
5731 fi
5732done
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734IFS=$as_save_IFS
5735
5736fi
5737fi
5738AR=$ac_cv_prog_AR
5739if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5741$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745fi
5746
5747
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005748 test -n "$AR" && break
5749 done
5750fi
5751if test -z "$AR"; then
5752 ac_ct_AR=$AR
5753 for ac_prog in ar aal
5754do
5755 # Extract the first word of "$ac_prog", so it can be a program name with args.
5756set dummy $ac_prog; ac_word=$2
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if ${ac_cv_prog_ac_ct_AR+:} false; then :
5760 $as_echo_n "(cached) " >&6
5761else
5762 if test -n "$ac_ct_AR"; then
5763 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5764else
5765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766for as_dir in $PATH
5767do
5768 IFS=$as_save_IFS
5769 test -z "$as_dir" && as_dir=.
5770 for ac_exec_ext in '' $ac_executable_extensions; do
5771 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5772 ac_cv_prog_ac_ct_AR="$ac_prog"
5773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5774 break 2
5775 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005777 done
5778IFS=$as_save_IFS
5779
5780fi
5781fi
5782ac_ct_AR=$ac_cv_prog_ac_ct_AR
5783if test -n "$ac_ct_AR"; then
5784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5785$as_echo "$ac_ct_AR" >&6; }
5786else
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
5789fi
5790
5791
5792 test -n "$ac_ct_AR" && break
5793done
5794
5795 if test "x$ac_ct_AR" = x; then
5796 AR="ar"
5797 else
5798 case $cross_compiling:$ac_tool_warned in
5799yes:)
5800{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5802ac_tool_warned=yes ;;
5803esac
5804 AR=$ac_ct_AR
5805 fi
5806fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807
5808
5809# tweak ARFLAGS only if the user didn't set it on the command line
5810
5811if test -z "$ARFLAGS"
5812then
5813 ARFLAGS="rc"
5814fi
5815
doko@ubuntu.com58844492012-06-30 18:25:32 +02005816if test -n "$ac_tool_prefix"; then
5817 for ac_prog in readelf
5818 do
5819 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5820set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822$as_echo_n "checking for $ac_word... " >&6; }
5823if ${ac_cv_prog_READELF+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825else
5826 if test -n "$READELF"; then
5827 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5828else
5829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830for as_dir in $PATH
5831do
5832 IFS=$as_save_IFS
5833 test -z "$as_dir" && as_dir=.
5834 for ac_exec_ext in '' $ac_executable_extensions; do
5835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5836 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5838 break 2
5839 fi
5840done
5841 done
5842IFS=$as_save_IFS
5843
5844fi
5845fi
5846READELF=$ac_cv_prog_READELF
5847if test -n "$READELF"; then
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5849$as_echo "$READELF" >&6; }
5850else
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852$as_echo "no" >&6; }
5853fi
5854
5855
5856 test -n "$READELF" && break
5857 done
5858fi
5859if test -z "$READELF"; then
5860 ac_ct_READELF=$READELF
5861 for ac_prog in readelf
5862do
5863 # Extract the first word of "$ac_prog", so it can be a program name with args.
5864set dummy $ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5868 $as_echo_n "(cached) " >&6
5869else
5870 if test -n "$ac_ct_READELF"; then
5871 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5872else
5873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876 IFS=$as_save_IFS
5877 test -z "$as_dir" && as_dir=.
5878 for ac_exec_ext in '' $ac_executable_extensions; do
5879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5880 ac_cv_prog_ac_ct_READELF="$ac_prog"
5881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882 break 2
5883 fi
5884done
5885 done
5886IFS=$as_save_IFS
5887
5888fi
5889fi
5890ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5891if test -n "$ac_ct_READELF"; then
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5893$as_echo "$ac_ct_READELF" >&6; }
5894else
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
5897fi
5898
5899
5900 test -n "$ac_ct_READELF" && break
5901done
5902
5903 if test "x$ac_ct_READELF" = x; then
5904 READELF=":"
5905 else
5906 case $cross_compiling:$ac_tool_warned in
5907yes:)
5908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5910ac_tool_warned=yes ;;
5911esac
5912 READELF=$ac_ct_READELF
5913 fi
5914fi
5915
5916if test "$cross_compiling" = yes; then
5917 case "$READELF" in
5918 readelf|:)
5919 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5920 ;;
5921 esac
5922fi
5923
5924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
Matthias Klosec4c48422012-10-21 23:05:35 +02005926for ac_prog in python$PACKAGE_VERSION python3 python
5927do
5928 # Extract the first word of "$ac_prog", so it can be a program name with args.
5929set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5931$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005932if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005933 $as_echo_n "(cached) " >&6
5934else
Matthias Klosec4c48422012-10-21 23:05:35 +02005935 if test -n "$PYTHON"; then
5936 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005937else
5938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941 IFS=$as_save_IFS
5942 test -z "$as_dir" && as_dir=.
5943 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005945 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5947 break 2
5948 fi
5949done
5950 done
5951IFS=$as_save_IFS
5952
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005953fi
5954fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005955PYTHON=$ac_cv_prog_PYTHON
5956if test -n "$PYTHON"; then
5957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5958$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005959else
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5961$as_echo "no" >&6; }
5962fi
5963
5964
Matthias Klosec4c48422012-10-21 23:05:35 +02005965 test -n "$PYTHON" && break
5966done
5967test -n "$PYTHON" || PYTHON="not-found"
5968
5969if $PYTHON = not-found; then
5970 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5971else
5972 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005973fi
5974
5975
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976case $MACHDEP in
5977bsdos*|hp*|HP*)
5978 # install -d does not work on BSDI or HP-UX
5979 if test -z "$INSTALL"
5980 then
5981 INSTALL="${srcdir}/install-sh -c"
5982 fi
5983esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984# Find a good install program. We prefer a C program (faster),
5985# so one script is as good as another. But avoid the broken or
5986# incompatible versions:
5987# SysV /etc/install, /usr/sbin/install
5988# SunOS /usr/etc/install
5989# IRIX /sbin/install
5990# AIX /bin/install
5991# AmigaOS /C/install, which installs bootblocks on floppy discs
5992# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5993# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5994# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5995# OS/2's system install, which has a completely different semantic
5996# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005997# Reject install programs that cannot install multiple files.
5998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5999$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006001if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006002 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003else
6004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007 IFS=$as_save_IFS
6008 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 # Account for people who put trailing slashes in PATH elements.
6010case $as_dir/ in #((
6011 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006013 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 /usr/ucb/* ) ;;
6015 *)
6016 # OSF1 and SCO ODT 3.0 have their own names for install.
6017 # Don't use installbsd from OSF since it installs stuff as root
6018 # by default.
6019 for ac_prog in ginstall scoinst install; do
6020 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006021 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 +00006022 if test $ac_prog = install &&
6023 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6024 # AIX install. It has an incompatible calling convention.
6025 :
6026 elif test $ac_prog = install &&
6027 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6028 # program-specific install script used by HP pwplus--don't use.
6029 :
6030 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 rm -rf conftest.one conftest.two conftest.dir
6032 echo one > conftest.one
6033 echo two > conftest.two
6034 mkdir conftest.dir
6035 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6036 test -s conftest.one && test -s conftest.two &&
6037 test -s conftest.dir/conftest.one &&
6038 test -s conftest.dir/conftest.two
6039 then
6040 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6041 break 3
6042 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 fi
6044 fi
6045 done
6046 done
6047 ;;
6048esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006049
6050 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051IFS=$as_save_IFS
6052
Matthias Kloseb9621712010-04-24 17:59:49 +00006053rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006054
6055fi
6056 if test "${ac_cv_path_install+set}" = set; then
6057 INSTALL=$ac_cv_path_install
6058 else
6059 # As a last resort, use the slow shell script. Don't cache a
6060 # value for INSTALL within a source directory, because that will
6061 # break other packages using the cache if that directory is
6062 # removed, or if the value is a relative name.
6063 INSTALL=$ac_install_sh
6064 fi
6065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6067$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068
6069# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6070# It thinks the first close brace ends the variable substitution.
6071test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6072
6073test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6074
6075test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6076
Matthias Klose93a0ef12012-03-15 18:08:34 +01006077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6078$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6079if test -z "$MKDIR_P"; then
6080 if ${ac_cv_path_mkdir+:} false; then :
6081 $as_echo_n "(cached) " >&6
6082else
6083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6085do
6086 IFS=$as_save_IFS
6087 test -z "$as_dir" && as_dir=.
6088 for ac_prog in mkdir gmkdir; do
6089 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006090 { 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 +01006091 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6092 'mkdir (GNU coreutils) '* | \
6093 'mkdir (coreutils) '* | \
6094 'mkdir (fileutils) '4.1*)
6095 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6096 break 3;;
6097 esac
6098 done
6099 done
6100 done
6101IFS=$as_save_IFS
6102
6103fi
6104
6105 test -d ./--version && rmdir ./--version
6106 if test "${ac_cv_path_mkdir+set}" = set; then
6107 MKDIR_P="$ac_cv_path_mkdir -p"
6108 else
6109 # As a last resort, use the slow shell script. Don't cache a
6110 # value for MKDIR_P within a source directory, because that will
6111 # break other packages using the cache if that directory is
6112 # removed, or if the value is a relative name.
6113 MKDIR_P="$ac_install_sh -d"
6114 fi
6115fi
6116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6117$as_echo "$MKDIR_P" >&6; }
6118
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119
6120# Not every filesystem supports hard links
6121
6122if test -z "$LN" ; then
6123 case $ac_sys_system in
6124 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125 *) LN=ln;;
6126 esac
6127fi
6128
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006129# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006130
6131ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006132
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6135$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136
6137# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006138if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139 withval=$with_pydebug;
6140if test "$withval" != no
6141then
6142
Matthias Kloseb9621712010-04-24 17:59:49 +00006143$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6146$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006148 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006149else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6150$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151fi
6152else
Matthias Kloseb9621712010-04-24 17:59:49 +00006153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6154$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155fi
6156
6157
6158# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6159# merged with this chunk of code?
6160
6161# Optimizer/debugger flags
6162# ------------------------
6163# (The following bit of code is complicated enough - please keep things
6164# indented properly. Just pretend you're editing Python code. ;-)
6165
6166# There are two parallel sets of case statements below, one that checks to
6167# see if OPT was set and one that does BASECFLAGS setting based upon
6168# compiler and platform. BASECFLAGS tweaks need to be made even if the
6169# user set OPT.
6170
6171# tweak OPT based on compiler and platform, only if the user didn't set
6172# it on the command line
6173
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006174if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175then
6176 case $GCC in
6177 yes)
6178 if test "$CC" != 'g++' ; then
6179 STRICT_PROTO="-Wstrict-prototypes"
6180 fi
6181 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6182 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6183 WRAP="-fwrapv"
6184 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006185
6186 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006187 case $CC in
6188 *clang*) WRAP="-fwrapv"
6189 ;;
6190 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006191
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 case $ac_cv_prog_cc_g in
6193 yes)
6194 if test "$Py_DEBUG" = 'true' ; then
6195 # Optimization messes up debuggers, so turn it off for
6196 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006197 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 else
6199 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6200 fi
6201 ;;
6202 *)
6203 OPT="-O3 -Wall $STRICT_PROTO"
6204 ;;
6205 esac
6206 case $ac_sys_system in
6207 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6208 ;;
6209 esac
6210 ;;
6211
6212 *)
6213 OPT="-O"
6214 ;;
6215 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006216fi
6217
6218
6219
6220# The -arch flags for universal builds on OSX
6221UNIVERSAL_ARCH_FLAGS=
6222
6223
6224# tweak BASECFLAGS based on compiler and platform
6225case $GCC in
6226yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006227 # Python doesn't violate C99 aliasing rules, but older versions of
6228 # GCC produce warnings for legal Python code. Enable
6229 # -fno-strict-aliasing on versions of GCC that support but produce
6230 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6232$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233 ac_save_cc="$CC"
6234 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006235 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006236 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006237 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006238else
Matthias Kloseb9621712010-04-24 17:59:49 +00006239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006241
Matthias Kloseb159a552010-04-25 21:00:44 +00006242
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006243int
6244main ()
6245{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006246
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006247 ;
6248 return 0;
6249}
Matthias Kloseb159a552010-04-25 21:00:44 +00006250
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006252if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006253
6254 CC="$ac_save_cc -fstrict-aliasing"
6255 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006257/* end confdefs.h. */
6258
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006259 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006260int
6261main ()
6262{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006263double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006264 ;
6265 return 0;
6266}
Matthias Kloseb159a552010-04-25 21:00:44 +00006267
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006269if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006270
6271 ac_cv_no_strict_aliasing=no
6272
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273else
Matthias Kloseb159a552010-04-25 21:00:44 +00006274
6275 ac_cv_no_strict_aliasing=yes
6276
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006277fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006279
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006280else
Matthias Kloseb159a552010-04-25 21:00:44 +00006281
6282 ac_cv_no_strict_aliasing=no
6283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006286fi
6287
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006288 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6291$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006292 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293 then
6294 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6295 fi
6296
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6298$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6299 ac_save_cc="$CC"
6300 CC="$CC -Wunused-result -Werror"
6301 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006302 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006303 $as_echo_n "(cached) " >&6
6304else
6305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6306/* end confdefs.h. */
6307
6308
6309int
6310main ()
6311{
6312
6313 ;
6314 return 0;
6315}
6316
6317_ACEOF
6318if ac_fn_c_try_compile "$LINENO"; then :
6319
6320 ac_cv_disable_unused_result_warning=yes
6321
6322else
6323
6324 ac_cv_disable_unused_result_warning=no
6325
6326fi
6327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6328fi
6329
6330 CFLAGS="$save_CFLAGS"
6331 CC="$ac_save_cc"
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6333$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6334
6335 if test $ac_cv_disable_unused_result_warning = yes
6336 then
6337 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6338 fi
6339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6341 # support. Without this, treatment of subnormals doesn't follow
6342 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006343 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344 alpha*)
6345 BASECFLAGS="$BASECFLAGS -mieee"
6346 ;;
6347 esac
6348
6349 case $ac_sys_system in
6350 SCO_SV*)
6351 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6352 ;;
6353 # is there any other compiler on Darwin besides gcc?
6354 Darwin*)
6355 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6356 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006357 if test "${CC}" = gcc
6358 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6360$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006361 case "${UNIVERSALSDK}" in
6362 */MacOSX10.4u.sdk)
6363 # Build using 10.4 SDK, force usage of gcc when the
6364 # compiler is gcc, otherwise the user will get very
6365 # confusing error messages when building on OSX 10.6
6366 CC=gcc-4.0
6367 CPP=cpp-4.0
6368 ;;
6369 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6371$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006372 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373
6374
6375 if test "${enable_universalsdk}"; then
6376 UNIVERSAL_ARCH_FLAGS=""
6377 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6378 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6379 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006380 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6382 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006383 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006384 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385
6386 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6387 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006388 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006389 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006390
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006391 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6392 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006393 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006394 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006395
6396 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6397 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006398 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006399 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006402 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 +00006403
6404 fi
6405
6406
Ronald Oussoren666028b2010-04-18 19:07:43 +00006407 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6408 if test "${UNIVERSALSDK}" != "/"
6409 then
6410 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6411 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006412 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413 fi
6414 fi
6415
6416 # Calculate the right deployment target for this build.
6417 #
6418 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006419 if test ${cur_target} '>' 10.2 && \
6420 test ${cur_target} '<' 10.6
6421 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006423 if test ${enable_universalsdk}; then
6424 if test "${UNIVERSAL_ARCHS}" = "all"; then
6425 # Ensure that the default platform for a
6426 # 4-way universal build is OSX 10.5,
6427 # that's the first OS release where
6428 # 4-way builds make sense.
6429 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006430
6431 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6432 cur_target='10.5'
6433
6434 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6435 cur_target='10.5'
6436
6437 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6438 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006439 fi
6440 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006441 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006442 # On Intel macs default to a deployment
6443 # target of 10.4, that's the first OSX
6444 # release with Intel support.
6445 cur_target="10.4"
6446 fi
6447 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006448 fi
6449 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6450
6451 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6452 # environment with a value that is the same as what we'll use
6453 # in the Makefile to ensure that we'll get the same compiler
6454 # environment during configure and build time.
6455 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6456 export MACOSX_DEPLOYMENT_TARGET
6457 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6458
6459 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460 esac
6461 ;;
6462
6463*)
6464 case $ac_sys_system in
6465 OpenUNIX*|UnixWare*)
6466 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6467 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468 SCO_SV*)
6469 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6470 ;;
6471 esac
6472 ;;
6473esac
6474
6475if test "$Py_DEBUG" = 'true'; then
6476 :
6477else
6478 OPT="-DNDEBUG $OPT"
6479fi
6480
6481if test "$ac_arch_flags"
6482then
6483 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6484fi
6485
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486# Check whether GCC supports PyArg_ParseTuple format
6487if test "$GCC" = "yes"
6488then
Matthias Kloseb9621712010-04-24 17:59:49 +00006489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6490$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491 save_CFLAGS=$CFLAGS
6492 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494/* end confdefs.h. */
6495
6496 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497int
6498main ()
6499{
6500
6501 ;
6502 return 0;
6503}
Matthias Kloseb159a552010-04-25 21:00:44 +00006504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006506if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006507
Matthias Kloseb159a552010-04-25 21:00:44 +00006508
Matthias Kloseb9621712010-04-24 17:59:49 +00006509$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006510
Matthias Kloseb159a552010-04-25 21:00:44 +00006511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006512$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514else
Matthias Kloseb159a552010-04-25 21:00:44 +00006515
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006517$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006518
6519fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6521 CFLAGS=$save_CFLAGS
6522fi
6523
6524# On some compilers, pthreads are available without further options
6525# (e.g. MacOS X). On some of these systems, the compiler will not
6526# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6527# So we have to see first whether pthreads are available without
6528# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6530$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006531if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006532 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533else
Matthias Kloseb9621712010-04-24 17:59:49 +00006534 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535 ac_cv_pthread_is_default=no
6536else
Matthias Kloseb9621712010-04-24 17:59:49 +00006537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538/* end confdefs.h. */
6539
6540#include <pthread.h>
6541
6542void* routine(void* p){return NULL;}
6543
6544int main(){
6545 pthread_t p;
6546 if(pthread_create(&p,NULL,routine,NULL)!=0)
6547 return 1;
6548 (void)pthread_detach(p);
6549 return 0;
6550}
6551
6552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554
6555 ac_cv_pthread_is_default=yes
6556 ac_cv_kthread=no
6557 ac_cv_pthread=no
6558
6559else
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6563 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564fi
6565
6566
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006567fi
6568
Matthias Kloseb9621712010-04-24 17:59:49 +00006569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6570$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571
6572
6573if test $ac_cv_pthread_is_default = yes
6574then
6575 ac_cv_kpthread=no
6576else
6577# -Kpthread, if available, provides the right #defines
6578# and linker options to make pthread_create available
6579# Some compilers won't report that they do not support -Kpthread,
6580# so we need to run a program to see whether it really made the
6581# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6583$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006584if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586else
6587 ac_save_cc="$CC"
6588CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006589if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590 ac_cv_kpthread=no
6591else
Matthias Kloseb9621712010-04-24 17:59:49 +00006592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593/* end confdefs.h. */
6594
6595#include <pthread.h>
6596
6597void* routine(void* p){return NULL;}
6598
6599int main(){
6600 pthread_t p;
6601 if(pthread_create(&p,NULL,routine,NULL)!=0)
6602 return 1;
6603 (void)pthread_detach(p);
6604 return 0;
6605}
6606
6607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006608if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609 ac_cv_kpthread=yes
6610else
Matthias Kloseb9621712010-04-24 17:59:49 +00006611 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006615fi
6616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617CC="$ac_save_cc"
6618fi
6619
Matthias Kloseb9621712010-04-24 17:59:49 +00006620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6621$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006622fi
6623
6624if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6625then
6626# -Kthread, if available, provides the right #defines
6627# and linker options to make pthread_create available
6628# Some compilers won't report that they do not support -Kthread,
6629# so we need to run a program to see whether it really made the
6630# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6632$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006633if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635else
6636 ac_save_cc="$CC"
6637CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006638if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006639 ac_cv_kthread=no
6640else
Matthias Kloseb9621712010-04-24 17:59:49 +00006641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642/* end confdefs.h. */
6643
6644#include <pthread.h>
6645
6646void* routine(void* p){return NULL;}
6647
6648int main(){
6649 pthread_t p;
6650 if(pthread_create(&p,NULL,routine,NULL)!=0)
6651 return 1;
6652 (void)pthread_detach(p);
6653 return 0;
6654}
6655
6656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006657if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658 ac_cv_kthread=yes
6659else
Matthias Kloseb9621712010-04-24 17:59:49 +00006660 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664fi
6665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666CC="$ac_save_cc"
6667fi
6668
Matthias Kloseb9621712010-04-24 17:59:49 +00006669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6670$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006671fi
6672
6673if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6674then
6675# -pthread, if available, provides the right #defines
6676# and linker options to make pthread_create available
6677# Some compilers won't report that they do not support -pthread,
6678# so we need to run a program to see whether it really made the
6679# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6681$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006682if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684else
6685 ac_save_cc="$CC"
6686CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006687if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688 ac_cv_pthread=no
6689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691/* end confdefs.h. */
6692
6693#include <pthread.h>
6694
6695void* routine(void* p){return NULL;}
6696
6697int main(){
6698 pthread_t p;
6699 if(pthread_create(&p,NULL,routine,NULL)!=0)
6700 return 1;
6701 (void)pthread_detach(p);
6702 return 0;
6703}
6704
6705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006706if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707 ac_cv_pthread=yes
6708else
Matthias Kloseb9621712010-04-24 17:59:49 +00006709 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713fi
6714
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715CC="$ac_save_cc"
6716fi
6717
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6719$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720fi
6721
6722# If we have set a CC compiler flag for thread support then
6723# check if it works for CXX, too.
6724ac_cv_cxx_thread=no
6725if test ! -z "$CXX"
6726then
Matthias Kloseb9621712010-04-24 17:59:49 +00006727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6728$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729ac_save_cxx="$CXX"
6730
6731if test "$ac_cv_kpthread" = "yes"
6732then
6733 CXX="$CXX -Kpthread"
6734 ac_cv_cxx_thread=yes
6735elif test "$ac_cv_kthread" = "yes"
6736then
6737 CXX="$CXX -Kthread"
6738 ac_cv_cxx_thread=yes
6739elif test "$ac_cv_pthread" = "yes"
6740then
6741 CXX="$CXX -pthread"
6742 ac_cv_cxx_thread=yes
6743fi
6744
6745if test $ac_cv_cxx_thread = yes
6746then
6747 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6748 $CXX -c conftest.$ac_ext 2>&5
6749 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6750 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6751 then
6752 ac_cv_cxx_thread=yes
6753 else
6754 ac_cv_cxx_thread=no
6755 fi
6756 rm -fr conftest*
6757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6759$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
6761CXX="$ac_save_cxx"
6762
6763
6764# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6766$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006767if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769else
Matthias Kloseb9621712010-04-24 17:59:49 +00006770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771/* end confdefs.h. */
6772#include <stdlib.h>
6773#include <stdarg.h>
6774#include <string.h>
6775#include <float.h>
6776
6777int
6778main ()
6779{
6780
6781 ;
6782 return 0;
6783}
6784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006785if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786 ac_cv_header_stdc=yes
6787else
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6791
6792if test $ac_cv_header_stdc = yes; then
6793 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795/* end confdefs.h. */
6796#include <string.h>
6797
6798_ACEOF
6799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006800 $EGREP "memchr" >/dev/null 2>&1; then :
6801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802else
6803 ac_cv_header_stdc=no
6804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006805rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806
6807fi
6808
6809if test $ac_cv_header_stdc = yes; then
6810 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812/* end confdefs.h. */
6813#include <stdlib.h>
6814
6815_ACEOF
6816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 $EGREP "free" >/dev/null 2>&1; then :
6818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819else
6820 ac_cv_header_stdc=no
6821fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006822rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823
6824fi
6825
6826if test $ac_cv_header_stdc = yes; then
6827 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829 :
6830else
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832/* end confdefs.h. */
6833#include <ctype.h>
6834#include <stdlib.h>
6835#if ((' ' & 0x0FF) == 0x020)
6836# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6837# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6838#else
6839# define ISLOWER(c) \
6840 (('a' <= (c) && (c) <= 'i') \
6841 || ('j' <= (c) && (c) <= 'r') \
6842 || ('s' <= (c) && (c) <= 'z'))
6843# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6844#endif
6845
6846#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6847int
6848main ()
6849{
6850 int i;
6851 for (i = 0; i < 256; i++)
6852 if (XOR (islower (i), ISLOWER (i))
6853 || toupper (i) != TOUPPER (i))
6854 return 2;
6855 return 0;
6856}
6857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006858if ac_fn_c_try_run "$LINENO"; then :
6859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860else
Matthias Kloseb9621712010-04-24 17:59:49 +00006861 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865fi
6866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867fi
6868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6870$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871if test $ac_cv_header_stdc = yes; then
6872
Matthias Kloseb9621712010-04-24 17:59:49 +00006873$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874
6875fi
6876
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006877ac_save_cppflags="$CPPFLAGS"
6878CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006879for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006880fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006881ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006882sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006883unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006884poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006885sys/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 +01006886sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006887sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006888sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006889sys/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 -07006890libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006891bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006892do :
6893 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6894ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006895if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006896 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006897#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006898_ACEOF
6899
6900fi
6901
Guido van Rossum627b2d71993-12-24 10:39:16 +00006902done
6903
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006904CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006905ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006906for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006907 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6909$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006910if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006911 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006912else
Matthias Kloseb9621712010-04-24 17:59:49 +00006913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006914/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006915#include <sys/types.h>
6916#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006917
Martin v. Löwis11437992002-04-12 09:54:03 +00006918int
6919main ()
6920{
6921if ((DIR *) 0)
6922return 0;
6923 ;
6924 return 0;
6925}
6926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006927if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006928 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006929else
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006934eval ac_res=\$$as_ac_Header
6935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6936$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006937if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006939#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006940_ACEOF
6941
6942ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945done
6946# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6947if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6949$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006950if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006952else
Martin v. Löwis11437992002-04-12 09:54:03 +00006953 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006957/* Override any GCC internal prototype to avoid an error.
6958 Use char because int might match the return type of a GCC
6959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006960#ifdef __cplusplus
6961extern "C"
6962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006963char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006964int
6965main ()
6966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 ;
6969 return 0;
6970}
6971_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972for ac_lib in '' dir; do
6973 if test -z "$ac_lib"; then
6974 ac_res="none required"
6975 else
6976 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006977 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982rm -f core conftest.err conftest.$ac_objext \
6983 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006984 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006985 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006987done
Victor Stinnere0be4232011-10-25 13:06:09 +02006988if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990else
6991 ac_cv_search_opendir=no
6992fi
6993rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006994LIBS=$ac_func_search_save_LIBS
6995fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6997$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006999if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007003
Michael W. Hudson54241132001-12-07 15:38:26 +00007004else
Matthias Kloseb9621712010-04-24 17:59:49 +00007005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7006$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007007if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007009else
7010 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014/* Override any GCC internal prototype to avoid an error.
7015 Use char because int might match the return type of a GCC
7016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007017#ifdef __cplusplus
7018extern "C"
7019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007020char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007021int
7022main ()
7023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007025 ;
7026 return 0;
7027}
7028_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029for ac_lib in '' x; do
7030 if test -z "$ac_lib"; then
7031 ac_res="none required"
7032 else
7033 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007039rm -f core conftest.err conftest.$ac_objext \
7040 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007041 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044done
Victor Stinnere0be4232011-10-25 13:06:09 +02007045if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007047else
7048 ac_cv_search_opendir=no
7049fi
7050rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007051LIBS=$ac_func_search_save_LIBS
7052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7054$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007056if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059fi
7060
7061fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007062
Matthias Kloseb9621712010-04-24 17:59:49 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7064$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007065if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007067else
Matthias Kloseb9621712010-04-24 17:59:49 +00007068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007069/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007070#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007071int
7072main ()
7073{
7074return makedev(0, 0);
7075 ;
7076 return 0;
7077}
7078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007080 ac_cv_header_sys_types_h_makedev=yes
7081else
Matthias Kloseb9621712010-04-24 17:59:49 +00007082 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007084rm -f core conftest.err conftest.$ac_objext \
7085 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007086
7087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7089$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007090
7091if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007092ac_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 +02007093if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007094
Matthias Kloseb9621712010-04-24 17:59:49 +00007095$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007096
7097fi
7098
7099
7100
7101 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 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 +02007103if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007104
Matthias Kloseb9621712010-04-24 17:59:49 +00007105$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007106
7107fi
7108
7109
7110 fi
7111fi
7112
Michael W. Hudson54241132001-12-07 15:38:26 +00007113
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007114# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7115for ac_header in net/if.h
7116do :
7117 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7118#ifdef STDC_HEADERS
7119# include <stdlib.h>
7120# include <stddef.h>
7121#else
7122# ifdef HAVE_STDLIB_H
7123# include <stdlib.h>
7124# endif
7125#endif
7126#ifdef HAVE_SYS_SOCKET_H
7127# include <sys/socket.h>
7128#endif
7129
7130"
Victor Stinnere0be4232011-10-25 13:06:09 +02007131if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007132 cat >>confdefs.h <<_ACEOF
7133#define HAVE_NET_IF_H 1
7134_ACEOF
7135
7136fi
7137
7138done
7139
7140
7141
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007142# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007143for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007144do :
7145 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007146#ifdef HAVE_CURSES_H
7147#include <curses.h>
7148#endif
7149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150"
Victor Stinnere0be4232011-10-25 13:06:09 +02007151if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007152 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007153#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007154_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007155
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007156fi
7157
7158done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007159
7160
Martin v. Löwis11017b12006-01-14 18:12:57 +00007161# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007162for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007163do :
7164 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 +00007165#ifdef HAVE_ASM_TYPES_H
7166#include <asm/types.h>
7167#endif
7168#ifdef HAVE_SYS_SOCKET_H
7169#include <sys/socket.h>
7170#endif
7171
Matthias Kloseb9621712010-04-24 17:59:49 +00007172"
Victor Stinnere0be4232011-10-25 13:06:09 +02007173if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007174 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007175#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007176_ACEOF
7177
7178fi
7179
7180done
7181
7182
Charles-François Natali47413c12011-10-06 19:47:44 +02007183# On Linux, can.h and can/raw.h require sys/socket.h
7184for ac_header in linux/can.h linux/can/raw.h
7185do :
7186 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7187ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7188#ifdef HAVE_SYS_SOCKET_H
7189#include <sys/socket.h>
7190#endif
7191
7192"
7193if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7194 cat >>confdefs.h <<_ACEOF
7195#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7196_ACEOF
7197
7198fi
7199
7200done
7201
7202
Guido van Rossum627b2d71993-12-24 10:39:16 +00007203# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007204was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7206$as_echo_n "checking for clock_t in time.h... " >&6; }
7207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007209#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007210
7211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007213 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007214 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007215else
Martin v. Löwis11437992002-04-12 09:54:03 +00007216
7217
Matthias Kloseb9621712010-04-24 17:59:49 +00007218$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007219
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007220
Guido van Rossum627b2d71993-12-24 10:39:16 +00007221fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007222rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007223
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7225$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7228$as_echo_n "checking for makedev... " >&6; }
7229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007230/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007231
Jesus Cea740f53a2010-04-28 11:35:30 +00007232#if defined(MAJOR_IN_MKDEV)
7233#include <sys/mkdev.h>
7234#elif defined(MAJOR_IN_SYSMACROS)
7235#include <sys/sysmacros.h>
7236#else
7237#include <sys/types.h>
7238#endif
7239
Neal Norwitz11690112002-07-30 01:08:28 +00007240int
7241main ()
7242{
Jesus Cea740f53a2010-04-28 11:35:30 +00007243
7244 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007245 ;
7246 return 0;
7247}
Matthias Kloseb159a552010-04-25 21:00:44 +00007248
Neal Norwitz11690112002-07-30 01:08:28 +00007249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007250if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007251 ac_cv_has_makedev=yes
7252else
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007255rm -f core conftest.err conftest.$ac_objext \
7256 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7258$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007259if test "$ac_cv_has_makedev" = "yes"; then
7260
Matthias Kloseb9621712010-04-24 17:59:49 +00007261$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007262
7263fi
7264
Martin v. Löwis399a6892002-10-04 10:22:02 +00007265# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7266# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7267# defined, but the compiler does not support pragma redefine_extname,
7268# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7269# structures (such as rlimit64) without declaring them. As a
7270# work-around, disable LFS on such configurations
7271
7272use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7274$as_echo_n "checking Solaris LFS bug... " >&6; }
7275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007276/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007277
7278#define _LARGEFILE_SOURCE 1
7279#define _FILE_OFFSET_BITS 64
7280#include <sys/resource.h>
7281
Martin v. Löwis399a6892002-10-04 10:22:02 +00007282int
7283main ()
7284{
7285struct rlimit foo;
7286 ;
7287 return 0;
7288}
7289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007291 sol_lfs_bug=no
7292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7297$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007298if test "$sol_lfs_bug" = "yes"; then
7299 use_lfs=no
7300fi
7301
7302if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007303# Two defines needed to enable largefile support on various platforms
7304# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007305case $ac_sys_system/$ac_sys_release in
7306AIX*)
7307
7308$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7309
7310 ;;
7311esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007312
Matthias Kloseb9621712010-04-24 17:59:49 +00007313$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007314
7315
Matthias Kloseb9621712010-04-24 17:59:49 +00007316$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007317
Martin v. Löwis399a6892002-10-04 10:22:02 +00007318fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007319
Guido van Rossum84e7b241996-08-19 21:59:00 +00007320# Add some code to confdefs.h so that the test for off_t works on SCO
7321cat >> confdefs.h <<\EOF
7322#if defined(SCO_DS)
7323#undef _OFF_T
7324#endif
7325EOF
7326
Guido van Rossumef2255b2000-03-10 22:30:29 +00007327# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007328ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007329if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007331else
Martin v. Löwis11437992002-04-12 09:54:03 +00007332
7333cat >>confdefs.h <<_ACEOF
7334#define mode_t int
7335_ACEOF
7336
7337fi
7338
Matthias Kloseb9621712010-04-24 17:59:49 +00007339ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007340if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007341
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007342else
Martin v. Löwis11437992002-04-12 09:54:03 +00007343
7344cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007345#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007346_ACEOF
7347
7348fi
7349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007351if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007352
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007353else
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
7355cat >>confdefs.h <<_ACEOF
7356#define pid_t int
7357_ACEOF
7358
7359fi
7360
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007361
Martin v. Löwis11437992002-04-12 09:54:03 +00007362cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007363#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007364_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007365
Matthias Kloseb9621712010-04-24 17:59:49 +00007366ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007367if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007368
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007369else
Martin v. Löwis11437992002-04-12 09:54:03 +00007370
7371cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007372#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007373_ACEOF
7374
7375fi
7376
Matthias Kloseb9621712010-04-24 17:59:49 +00007377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7378$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007379if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007381else
Matthias Kloseb9621712010-04-24 17:59:49 +00007382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007383/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007384#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
7386_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007389 ac_cv_type_uid_t=yes
7390else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007391 ac_cv_type_uid_t=no
7392fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007393rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7397$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007398if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
7402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007404
7405fi
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7408case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007409 no|yes) ;; #(
7410 *)
7411
Matthias Kloseb9621712010-04-24 17:59:49 +00007412$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007413
7414
7415cat >>confdefs.h <<_ACEOF
7416#define uint32_t $ac_cv_c_uint32_t
7417_ACEOF
7418;;
7419 esac
7420
Matthias Kloseb9621712010-04-24 17:59:49 +00007421ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7422case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007423 no|yes) ;; #(
7424 *)
7425
Matthias Kloseb9621712010-04-24 17:59:49 +00007426$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007427
7428
7429cat >>confdefs.h <<_ACEOF
7430#define uint64_t $ac_cv_c_uint64_t
7431_ACEOF
7432;;
7433 esac
7434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7436case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007437 no|yes) ;; #(
7438 *)
7439
7440cat >>confdefs.h <<_ACEOF
7441#define int32_t $ac_cv_c_int32_t
7442_ACEOF
7443;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007444esac
7445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7447case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007448 no|yes) ;; #(
7449 *)
7450
7451cat >>confdefs.h <<_ACEOF
7452#define int64_t $ac_cv_c_int64_t
7453_ACEOF
7454;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007455esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007458if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007461
7462fi
7463
Stefan Krah1919b7e2012-03-21 18:25:23 +01007464ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7465if test "x$ac_cv_type___uint128_t" = xyes; then :
7466
7467$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7468
7469fi
7470
Jack Jansendd19cf82001-12-06 22:36:17 +00007471
Michael W. Hudson54241132001-12-07 15:38:26 +00007472# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007473# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007474# The cast to long int works around a bug in the HP C Compiler
7475# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7476# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7477# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7479$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007480if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007482else
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 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 +00007484
Martin v. Löwis11437992002-04-12 09:54:03 +00007485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 if test "$ac_cv_type_int" = yes; then
7487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007489as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007490See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007491 else
7492 ac_cv_sizeof_int=0
7493 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495
Martin v. Löwis11437992002-04-12 09:54:03 +00007496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7498$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007499
7500
7501
Martin v. Löwis11437992002-04-12 09:54:03 +00007502cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007503#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007504_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007505
7506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007507# The cast to long int works around a bug in the HP C Compiler
7508# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7509# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7510# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7512$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007513if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007515else
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 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 +00007517
Martin v. Löwis11437992002-04-12 09:54:03 +00007518else
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 if test "$ac_cv_type_long" = yes; then
7520 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7521$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007522as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007523See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007524 else
7525 ac_cv_sizeof_long=0
7526 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007528
Martin v. Löwis11437992002-04-12 09:54:03 +00007529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7531$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007532
7533
7534
Martin v. Löwis11437992002-04-12 09:54:03 +00007535cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007536#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007537_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007538
7539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540# The cast to long int works around a bug in the HP C Compiler
7541# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7542# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7543# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7545$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007546if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007548else
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 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 +00007550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 if test "$ac_cv_type_void_p" = yes; then
7553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007555as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007556See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557 else
7558 ac_cv_sizeof_void_p=0
7559 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7564$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565
7566
7567
Martin v. Löwis11437992002-04-12 09:54:03 +00007568cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007569#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007570_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007571
7572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007573# The cast to long int works around a bug in the HP C Compiler
7574# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7575# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7576# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7578$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007579if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007581else
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 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 +00007583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 if test "$ac_cv_type_short" = yes; then
7586 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007588as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007589See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590 else
7591 ac_cv_sizeof_short=0
7592 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7597$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598
7599
7600
Martin v. Löwis11437992002-04-12 09:54:03 +00007601cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007602#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007603_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007604
7605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606# The cast to long int works around a bug in the HP C Compiler
7607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7609# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7611$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007612if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007614else
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 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 +00007616
Martin v. Löwis11437992002-04-12 09:54:03 +00007617else
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 if test "$ac_cv_type_float" = yes; then
7619 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7620$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007621as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007622See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623 else
7624 ac_cv_sizeof_float=0
7625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627
Martin v. Löwis11437992002-04-12 09:54:03 +00007628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7630$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631
7632
7633
Martin v. Löwis11437992002-04-12 09:54:03 +00007634cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007635#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007636_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007637
7638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639# The cast to long int works around a bug in the HP C Compiler
7640# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7641# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7642# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7644$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007645if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007647else
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 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 +00007649
Martin v. Löwis11437992002-04-12 09:54:03 +00007650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 if test "$ac_cv_type_double" = yes; then
7652 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7653$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007654as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007655See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656 else
7657 ac_cv_sizeof_double=0
7658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660
Martin v. Löwis11437992002-04-12 09:54:03 +00007661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7663$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664
7665
7666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007668#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007669_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007670
7671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672# The cast to long int works around a bug in the HP C Compiler
7673# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7674# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7675# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7677$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007678if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 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 +00007682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 if test "$ac_cv_type_fpos_t" = yes; then
7685 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7686$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007687as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007688See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689 else
7690 ac_cv_sizeof_fpos_t=0
7691 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007693
Martin v. Löwis11437992002-04-12 09:54:03 +00007694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7696$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697
7698
7699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007701#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007702_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007703
Michael W. Hudson54241132001-12-07 15:38:26 +00007704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705# The cast to long int works around a bug in the HP C Compiler
7706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7708# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7710$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007711if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007713else
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 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 +00007715
Martin v. Löwis18e16552006-02-15 17:27:45 +00007716else
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 if test "$ac_cv_type_size_t" = yes; then
7718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007720as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007721See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722 else
7723 ac_cv_sizeof_size_t=0
7724 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726
Martin v. Löwis18e16552006-02-15 17:27:45 +00007727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7729$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730
7731
7732
Martin v. Löwis18e16552006-02-15 17:27:45 +00007733cat >>confdefs.h <<_ACEOF
7734#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7735_ACEOF
7736
7737
Christian Heimes400adb02008-02-01 08:12:03 +00007738# The cast to long int works around a bug in the HP C Compiler
7739# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7740# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7741# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7743$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007744if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 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 +00007748
Christian Heimes400adb02008-02-01 08:12:03 +00007749else
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 if test "$ac_cv_type_pid_t" = yes; then
7751 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007753as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007754See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007755 else
7756 ac_cv_sizeof_pid_t=0
7757 fi
7758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007759
Christian Heimes400adb02008-02-01 08:12:03 +00007760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7762$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007763
7764
7765
7766cat >>confdefs.h <<_ACEOF
7767#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7768_ACEOF
7769
7770
Michael W. Hudson54241132001-12-07 15:38:26 +00007771
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7773$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007774have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007776/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
7780{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007781long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 ;
7783 return 0;
7784}
7785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007787
7788
Matthias Kloseb9621712010-04-24 17:59:49 +00007789$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007790
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007791 have_long_long=yes
7792
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7796$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007797if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007798# The cast to long int works around a bug in the HP C Compiler
7799# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7800# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7801# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7803$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007804if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 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 +00007808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 if test "$ac_cv_type_long_long" = yes; then
7811 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007813as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007814See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007815 else
7816 ac_cv_sizeof_long_long=0
7817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7822$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823
7824
7825
Martin v. Löwis11437992002-04-12 09:54:03 +00007826cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007827#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007828_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007829
Michael W. Hudson54241132001-12-07 15:38:26 +00007830
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007831fi
7832
Matthias Kloseb9621712010-04-24 17:59:49 +00007833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7834$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007835have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007837/* end confdefs.h. */
7838
7839int
7840main ()
7841{
7842long double x; x = (long double)0;
7843 ;
7844 return 0;
7845}
7846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007847if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007848
7849
Matthias Kloseb9621712010-04-24 17:59:49 +00007850$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007851
7852 have_long_double=yes
7853
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007854fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7857$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007858if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007859# The cast to long int works around a bug in the HP C Compiler
7860# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7861# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7862# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7864$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007865if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007867else
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 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 +00007869
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007870else
Matthias Kloseb9621712010-04-24 17:59:49 +00007871 if test "$ac_cv_type_long_double" = yes; then
7872 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007874as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007875See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007876 else
7877 ac_cv_sizeof_long_double=0
7878 fi
7879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7883$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007884
7885
7886
7887cat >>confdefs.h <<_ACEOF
7888#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7889_ACEOF
7890
7891
7892fi
7893
7894
Matthias Kloseb9621712010-04-24 17:59:49 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7896$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007897have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007899/* end confdefs.h. */
7900
7901int
7902main ()
7903{
7904_Bool x; x = (_Bool)0;
7905 ;
7906 return 0;
7907}
7908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007909if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007910
7911
Matthias Kloseb9621712010-04-24 17:59:49 +00007912$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007913
7914 have_c99_bool=yes
7915
Thomas Woutersb2137042007-02-01 18:02:27 +00007916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7919$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007920if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007921# The cast to long int works around a bug in the HP C Compiler
7922# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7923# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7924# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7926$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007927if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007929else
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 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 +00007931
Thomas Woutersb2137042007-02-01 18:02:27 +00007932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 if test "$ac_cv_type__Bool" = yes; then
7934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007936as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007937See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938 else
7939 ac_cv_sizeof__Bool=0
7940 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942
Thomas Woutersb2137042007-02-01 18:02:27 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7945$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946
7947
7948
Thomas Woutersb2137042007-02-01 18:02:27 +00007949cat >>confdefs.h <<_ACEOF
7950#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7951_ACEOF
7952
7953
7954fi
7955
Matthias Kloseb9621712010-04-24 17:59:49 +00007956ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007957 #include <stdint.h>
7958 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007959 #ifdef HAVE_INTTYPES_H
7960 #include <inttypes.h>
7961 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007962"
Victor Stinnere0be4232011-10-25 13:06:09 +02007963if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007964
7965cat >>confdefs.h <<_ACEOF
7966#define HAVE_UINTPTR_T 1
7967_ACEOF
7968
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007969# The cast to long int works around a bug in the HP C Compiler
7970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7974$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 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 +00007979
Martin v. Löwis11437992002-04-12 09:54:03 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 if test "$ac_cv_type_uintptr_t" = yes; then
7982 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7983$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007984as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007985See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 else
7987 ac_cv_sizeof_uintptr_t=0
7988 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990
Martin v. Löwis11437992002-04-12 09:54:03 +00007991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7993$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994
7995
7996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008000
Michael W. Hudson54241132001-12-07 15:38:26 +00008001
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008002fi
8003
Thomas Wouters89f507f2006-12-13 04:49:30 +00008004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008005# The cast to long int works around a bug in the HP C Compiler
8006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8008# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8010$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008011if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008015#ifdef HAVE_SYS_TYPES_H
8016#include <sys/types.h>
8017#endif
8018
Matthias Kloseb9621712010-04-24 17:59:49 +00008019"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008021else
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 if test "$ac_cv_type_off_t" = yes; then
8023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008025as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008026See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008027 else
8028 ac_cv_sizeof_off_t=0
8029 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8034$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008035
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008036
8037
Martin v. Löwis11437992002-04-12 09:54:03 +00008038cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008039#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008040_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008041
Michael W. Hudson54241132001-12-07 15:38:26 +00008042
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8045$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008046if test "$have_long_long" = yes
8047then
8048if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008049 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8054$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008055else
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008058fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008059else
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8061$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008062fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008063
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008064# The cast to long int works around a bug in the HP C Compiler
8065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8069$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008070if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008074#ifdef HAVE_SYS_TYPES_H
8075#include <sys/types.h>
8076#endif
8077#ifdef HAVE_TIME_H
8078#include <time.h>
8079#endif
8080
Matthias Kloseb9621712010-04-24 17:59:49 +00008081"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008082
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008083else
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 if test "$ac_cv_type_time_t" = yes; then
8085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008087as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008088See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008089 else
8090 ac_cv_sizeof_time_t=0
8091 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8096$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008098
8099
Martin v. Löwis11437992002-04-12 09:54:03 +00008100cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008101#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008102_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008103
Michael W. Hudson54241132001-12-07 15:38:26 +00008104
8105
Trent Mick635f6fb2000-08-23 21:33:05 +00008106# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008107ac_save_cc="$CC"
8108if test "$ac_cv_kpthread" = "yes"
8109then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008110elif test "$ac_cv_kthread" = "yes"
8111then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008112elif test "$ac_cv_pthread" = "yes"
8113then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008114fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8117$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008118have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008120/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008121
8122 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008123int
8124main ()
8125{
Guido van Rossum12580492000-09-24 16:47:19 +00008126pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 ;
8128 return 0;
8129}
Matthias Kloseb159a552010-04-25 21:00:44 +00008130
Martin v. Löwis11437992002-04-12 09:54:03 +00008131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008132if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008133 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8137$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008138if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008140# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8141# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8142# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8144$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008145if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008149#ifdef HAVE_PTHREAD_H
8150#include <pthread.h>
8151#endif
8152
Matthias Kloseb9621712010-04-24 17:59:49 +00008153"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008155else
Matthias Kloseb9621712010-04-24 17:59:49 +00008156 if test "$ac_cv_type_pthread_t" = yes; then
8157 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008159as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008160See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008161 else
8162 ac_cv_sizeof_pthread_t=0
8163 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008165
Trent Mick635f6fb2000-08-23 21:33:05 +00008166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8168$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008169
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008170
8171
Martin v. Löwis11437992002-04-12 09:54:03 +00008172cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008173#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008174_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008175
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176
Trent Mick635f6fb2000-08-23 21:33:05 +00008177fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008178CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008179
Michael W. Hudson54241132001-12-07 15:38:26 +00008180
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008181case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008182 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008183 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8184 ;;
8185 Darwin/*)
8186 OTHER_LIBTOOL_OPT=""
8187 ;;
8188esac
8189
8190
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008191ARCH_RUN_32BIT=""
8192
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008193case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008194 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008195 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8196 if test "${enable_universalsdk}"; then
8197 :
8198 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008199 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008200 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008201 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008202 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008203 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008204 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008205 if test ${gcc_version} '<' 4.0
8206 then
8207 LIBTOOL_CRUFT="-lcc_dynamic"
8208 else
8209 LIBTOOL_CRUFT=""
8210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008212 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008215/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008216
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008217 #include <unistd.h>
8218 int main(int argc, char*argv[])
8219 {
8220 if (sizeof(long) == 4) {
8221 return 0;
8222 } else {
8223 return 1;
8224 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008225 }
8226
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008228if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008229 ac_osx_32bit=yes
8230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8234 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008235fi
8236
8237
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008238 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008239 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008240 i386)
8241 MACOSX_DEFAULT_ARCH="i386"
8242 ;;
8243 ppc)
8244 MACOSX_DEFAULT_ARCH="ppc"
8245 ;;
8246 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008247 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008248 ;;
8249 esac
8250 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008251 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008252 i386)
8253 MACOSX_DEFAULT_ARCH="x86_64"
8254 ;;
8255 ppc)
8256 MACOSX_DEFAULT_ARCH="ppc64"
8257 ;;
8258 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008259 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008260 ;;
8261 esac
8262
8263 #ARCH_RUN_32BIT="true"
8264 fi
8265
8266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008267 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008268 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008269esac
8270
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8272$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008273if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008274then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008275 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008277 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008280
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8282$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008283 if test $enable_shared = "yes"
8284 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008285 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 +00008286 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008287else
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8289$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008290fi
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8293$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008294case $ac_sys_system/$ac_sys_release in
8295 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008296
Matthias Kloseb9621712010-04-24 17:59:49 +00008297$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8300$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008301 ;;
8302 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8304$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008305 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008306esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008307
Guido van Rossum0a516c91994-09-12 10:58:40 +00008308# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008309
Michael W. Hudson54241132001-12-07 15:38:26 +00008310
8311
8312
8313
Benjamin Peterson99f03762010-04-11 22:15:28 +00008314
Thomas Wouters477c8d52006-05-27 19:21:47 +00008315
Georg Brandlb1441c72009-01-03 22:33:39 +00008316
Thomas Wouters477c8d52006-05-27 19:21:47 +00008317cat >>confdefs.h <<_ACEOF
8318#define SHLIB_EXT "$SO"
8319_ACEOF
8320
Guido van Rossum0a516c91994-09-12 10:58:40 +00008321# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008322# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008323# (Shared libraries in this instance are shared modules to be loaded into
8324# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8326$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008327if test -z "$LDSHARED"
8328then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008329 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008330 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008331 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008332 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008333 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008334 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008335 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008336 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008337 if test "$GCC" = "yes" ; then
8338 LDSHARED='$(CC) -shared'
8339 LDCXXSHARED='$(CXX) -shared'
8340 else
8341 LDSHARED='$(CC) -G'
8342 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008343 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008344 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008345 if test "$GCC" = "yes" ; then
8346 LDSHARED='$(CC) -shared'
8347 LDCXXSHARED='$(CXX) -shared'
8348 else
8349 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008350 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008351 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008352 LDSHARED='$(CC) -bundle'
8353 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008354 if test "$enable_framework" ; then
8355 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008356 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8357 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008358 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008359 else
8360 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008361 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008362 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008363 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008364 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008365 LDSHARED='$(CC) -bundle'
8366 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008367 if test "$enable_framework" ; then
8368 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008369 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8370 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008371 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008372 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008373 # No framework, use the Python app as bundle-loader
8374 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008375 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008376 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008377 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008378 Darwin/*)
8379 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8380 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008381
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008382 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008383 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008384 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008385 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008386 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008387 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8388 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008389 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008390 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008391 LDSHARED='$(CC) -bundle'
8392 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008393 if test "$enable_framework" ; then
8394 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008395 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8396 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008397 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008398 else
8399 # No framework, use the Python app as bundle-loader
8400 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8401 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008402 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008403 fi
8404 fi
8405 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008406 Linux*|GNU*|QNX*)
8407 LDSHARED='$(CC) -shared'
8408 LDCXXSHARED='$(CXX) -shared';;
8409 BSD/OS*/4*)
8410 LDSHARED="gcc -shared"
8411 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008412 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008413 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008414 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008415 LDSHARED='$(CC) -shared'
8416 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008417 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008418 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008419 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008420 OpenBSD*)
8421 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8422 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008423 LDSHARED='$(CC) -shared $(CCSHARED)'
8424 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008425 else
8426 case `uname -r` in
8427 [01].* | 2.[0-7] | 2.[0-7].*)
8428 LDSHARED="ld -Bshareable ${LDFLAGS}"
8429 ;;
8430 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008431 LDSHARED='$(CC) -shared $(CCSHARED)'
8432 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008433 ;;
8434 esac
8435 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008436 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008437 LDSHARED='$(CC) -shared'
8438 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008439 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008440 if test "$GCC" = "yes" ; then
8441 LDSHARED='$(CC) -shared'
8442 LDCXXSHARED='$(CXX) -shared'
8443 else
8444 LDSHARED='$(CC) -G'
8445 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008446 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008447 SCO_SV*)
8448 LDSHARED='$(CC) -Wl,-G,-Bexport'
8449 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8450 CYGWIN*)
8451 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8452 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008453 *) LDSHARED="ld";;
8454 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8457$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008458LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008459BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008460# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008461# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8463$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008464if test -z "$CCSHARED"
8465then
Guido van Rossum07397971997-04-29 21:49:50 +00008466 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008467 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008468 then CCSHARED="-fPIC";
8469 elif test `uname -p` = sparc;
8470 then CCSHARED="-xcode=pic32";
8471 else CCSHARED="-Kpic";
8472 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008473 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008474 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008475 else CCSHARED="+z";
8476 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008477 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008478 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008479 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008480 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008481 if test "$GCC" = "yes"
8482 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008483 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008484 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008485 SCO_SV*)
8486 if test "$GCC" = "yes"
8487 then CCSHARED="-fPIC"
8488 else CCSHARED="-Kpic -belf"
8489 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008490 IRIX*/6*) case $CC in
8491 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008492 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008493 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008494 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8497$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008498# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008499# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8501$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008502if test -z "$LINKFORSHARED"
8503then
Guido van Rossum07397971997-04-29 21:49:50 +00008504 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008505 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008506 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008507 LINKFORSHARED="-Wl,-E -Wl,+s";;
8508# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008509 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008510 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008511 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008513 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008514 if test "$enable_framework"
8515 then
Jack Jansenda49e192005-01-07 13:08:22 +00008516 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008517 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008518 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008519 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008520 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008521 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008522 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008523 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8524 then
8525 LINKFORSHARED="-Wl,--export-dynamic"
8526 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008527 SunOS/5*) case $CC in
8528 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008529 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008530 then
8531 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008532 fi;;
8533 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008534 CYGWIN*)
8535 if test $enable_shared = "no"
8536 then
8537 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8538 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008539 QNX*)
8540 # -Wl,-E causes the symbols to be added to the dynamic
8541 # symbol table so that they can be found when a module
8542 # is loaded. -N 2048K causes the stack size to be set
8543 # to 2048 kilobytes so that the stack doesn't overflow
8544 # when running test_compile.py.
8545 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008546 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8549$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008550
Michael W. Hudson54241132001-12-07 15:38:26 +00008551
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008552
Matthias Kloseb9621712010-04-24 17:59:49 +00008553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8554$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008555if test ! "$LIBRARY" = "$LDLIBRARY"
8556then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008557 case $ac_sys_system in
8558 CYGWIN*)
8559 # Cygwin needs CCSHARED when building extension DLLs
8560 # but not when building the interpreter DLL.
8561 CFLAGSFORSHARED='';;
8562 *)
8563 CFLAGSFORSHARED='$(CCSHARED)'
8564 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8567$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008568
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008569# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8570# library (with --enable-shared).
8571# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008572# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8573# if it is not required, since it creates a dependency of the shared library
8574# to LIBS. This, in turn, means that applications linking the shared libpython
8575# don't need to link LIBS explicitly. The default should be only changed
8576# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8579$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008580case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008581 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008582 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008583esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8585$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008586
8587
Guido van Rossum627b2d71993-12-24 10:39:16 +00008588# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8590$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008591if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008592 $as_echo_n "(cached) " >&6
8593else
8594 ac_check_lib_save_LIBS=$LIBS
8595LIBS="-lsendfile $LIBS"
8596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8597/* end confdefs.h. */
8598
8599/* Override any GCC internal prototype to avoid an error.
8600 Use char because int might match the return type of a GCC
8601 builtin and then its argument prototype would still apply. */
8602#ifdef __cplusplus
8603extern "C"
8604#endif
8605char sendfile ();
8606int
8607main ()
8608{
8609return sendfile ();
8610 ;
8611 return 0;
8612}
8613_ACEOF
8614if ac_fn_c_try_link "$LINENO"; then :
8615 ac_cv_lib_sendfile_sendfile=yes
8616else
8617 ac_cv_lib_sendfile_sendfile=no
8618fi
8619rm -f core conftest.err conftest.$ac_objext \
8620 conftest$ac_exeext conftest.$ac_ext
8621LIBS=$ac_check_lib_save_LIBS
8622fi
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8624$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008625if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008626 cat >>confdefs.h <<_ACEOF
8627#define HAVE_LIBSENDFILE 1
8628_ACEOF
8629
8630 LIBS="-lsendfile $LIBS"
8631
8632fi
8633
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8635$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008636if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008637 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008638else
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008640LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644/* Override any GCC internal prototype to avoid an error.
8645 Use char because int might match the return type of a GCC
8646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647#ifdef __cplusplus
8648extern "C"
8649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008650char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008651int
8652main ()
8653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008655 ;
8656 return 0;
8657}
8658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008659if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008660 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664rm -f core conftest.err conftest.$ac_objext \
8665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008666LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8669$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008670if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 cat >>confdefs.h <<_ACEOF
8672#define HAVE_LIBDL 1
8673_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008674
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008675 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008676
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008677fi
8678 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8680$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008683else
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689/* Override any GCC internal prototype to avoid an error.
8690 Use char because int might match the return type of a GCC
8691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008692#ifdef __cplusplus
8693extern "C"
8694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008695char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008696int
8697main ()
8698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ;
8701 return 0;
8702}
8703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709rm -f core conftest.err conftest.$ac_objext \
8710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008711LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8714$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008715if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008716 cat >>confdefs.h <<_ACEOF
8717#define HAVE_LIBDLD 1
8718_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008719
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008720 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008722fi
8723 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008724
Georg Brandlb1441c72009-01-03 22:33:39 +00008725# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008726if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8728$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008729if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008731else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008732 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736/* Override any GCC internal prototype to avoid an error.
8737 Use char because int might match the return type of a GCC
8738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008739#ifdef __cplusplus
8740extern "C"
8741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008742char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008743int
8744main ()
8745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 ;
8748 return 0;
8749}
8750_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751for ac_lib in '' pthread rt posix4; do
8752 if test -z "$ac_lib"; then
8753 ac_res="none required"
8754 else
8755 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008756 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761rm -f core conftest.err conftest.$ac_objext \
8762 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008763 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766done
Victor Stinnere0be4232011-10-25 13:06:09 +02008767if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769else
8770 ac_cv_search_sem_init=no
8771fi
8772rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008773LIBS=$ac_func_search_save_LIBS
8774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8776$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008778if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008780
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008781fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008782 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008783 # posix4 on Solaris 2.6
8784 # pthread (first!) on Linux
8785fi
8786
Martin v. Löwis19d17342003-06-14 21:03:05 +00008787# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8789$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008790if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008791 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008792else
8793 ac_check_lib_save_LIBS=$LIBS
8794LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008796/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798/* Override any GCC internal prototype to avoid an error.
8799 Use char because int might match the return type of a GCC
8800 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008801#ifdef __cplusplus
8802extern "C"
8803#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008804char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008805int
8806main ()
8807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008809 ;
8810 return 0;
8811}
8812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008813if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008814 ac_cv_lib_intl_textdomain=yes
8815else
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008818rm -f core conftest.err conftest.$ac_objext \
8819 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008820LIBS=$ac_check_lib_save_LIBS
8821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8823$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008824if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008827
Brett Cannonc6d936e2009-06-07 20:09:53 +00008828 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008829fi
8830
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008831
8832# checks for system dependent C++ extensions support
8833case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8835$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008837/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008838
Georg Brandl59e87bd2011-02-15 19:48:59 +00008839 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008840int
8841main ()
8842{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008843loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ;
8845 return 0;
8846}
Matthias Kloseb159a552010-04-25 21:00:44 +00008847
Martin v. Löwis11437992002-04-12 09:54:03 +00008848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008849if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008850
Matthias Kloseb159a552010-04-25 21:00:44 +00008851
Matthias Kloseb9621712010-04-24 17:59:49 +00008852$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008853
Matthias Kloseb159a552010-04-25 21:00:44 +00008854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008855$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008856
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008857else
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
8859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008860$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008861
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863rm -f core conftest.err conftest.$ac_objext \
8864 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008865 *) ;;
8866esac
8867
Guido van Rossum70c7f481998-03-26 18:44:10 +00008868# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8870$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008871if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008873else
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008875LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879/* Override any GCC internal prototype to avoid an error.
8880 Use char because int might match the return type of a GCC
8881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882#ifdef __cplusplus
8883extern "C"
8884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008885char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
8893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008896else
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899rm -f core conftest.err conftest.$ac_objext \
8900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8904$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008905if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008906 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008907fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008908 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8910$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008911if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008913else
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008915LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919/* Override any GCC internal prototype to avoid an error.
8920 Use char because int might match the return type of a GCC
8921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008922#ifdef __cplusplus
8923extern "C"
8924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008925char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008926int
8927main ()
8928{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ;
8931 return 0;
8932}
8933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008934if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008936else
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008939rm -f core conftest.err conftest.$ac_objext \
8940 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008941LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8944$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008946 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008947fi
8948 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008949
Matthias Kloseb9621712010-04-24 17:59:49 +00008950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8951$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008954if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8957$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008958LIBS="$withval $LIBS"
8959
8960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963fi
8964
Guido van Rossum7f43da71994-08-01 12:15:30 +00008965
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008966if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008967 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8968set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8970$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008973else
8974 case $PKG_CONFIG in
8975 [\\/]* | ?:[\\/]*)
8976 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8977 ;;
8978 *)
8979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8980for as_dir in $PATH
8981do
8982 IFS=$as_save_IFS
8983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008985 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 +00008986 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008988 break 2
8989 fi
8990done
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008992IFS=$as_save_IFS
8993
8994 ;;
8995esac
8996fi
8997PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8998if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9000$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009001else
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9003$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009004fi
9005
9006
9007fi
9008if test -z "$ac_cv_path_PKG_CONFIG"; then
9009 ac_pt_PKG_CONFIG=$PKG_CONFIG
9010 # Extract the first word of "pkg-config", so it can be a program name with args.
9011set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9013$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009014if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009015 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009016else
9017 case $ac_pt_PKG_CONFIG in
9018 [\\/]* | ?:[\\/]*)
9019 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9020 ;;
9021 *)
9022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9023for as_dir in $PATH
9024do
9025 IFS=$as_save_IFS
9026 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02009028 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 +00009029 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009031 break 2
9032 fi
9033done
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009035IFS=$as_save_IFS
9036
9037 ;;
9038esac
9039fi
9040ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9041if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9043$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9046$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009047fi
9048
9049 if test "x$ac_pt_PKG_CONFIG" = x; then
9050 PKG_CONFIG=""
9051 else
9052 case $cross_compiling:$ac_tool_warned in
9053yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9055$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009056ac_tool_warned=yes ;;
9057esac
9058 PKG_CONFIG=$ac_pt_PKG_CONFIG
9059 fi
9060else
9061 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9062fi
9063
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009064
9065# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9067$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009068
9069# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009070if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009071 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009072else
9073 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009074fi
9075
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9078$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009079
9080# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9082$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009083
9084# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009085if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009086 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009087else
9088 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009089fi
9090
9091
9092if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009093 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9094else
9095 LIBFFI_INCLUDEDIR=""
9096fi
9097
9098
Matthias Kloseb9621712010-04-24 17:59:49 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9100$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009101
Stefan Krah60187b52012-03-23 19:06:27 +01009102# Check for use of the system libmpdec library
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9104$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9105
9106# Check whether --with-system_libmpdec was given.
9107if test "${with_system_libmpdec+set}" = set; then :
9108 withval=$with_system_libmpdec;
9109else
9110 with_system_libmpdec="no"
9111fi
9112
9113
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9115$as_echo "$with_system_libmpdec" >&6; }
9116
Benjamin Peterson076ed002010-10-31 17:11:02 +00009117# Check for support for loadable sqlite extensions
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9119$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9120# Check whether --enable-loadable-sqlite-extensions was given.
9121if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9122 enableval=$enable_loadable_sqlite_extensions;
9123else
9124 enable_loadable_sqlite_extensions="no"
9125fi
9126
9127
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9129$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9130
Matthias Klose55708cc2009-04-30 08:06:49 +00009131# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9133$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009134
9135# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009136if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009137 withval=$with_dbmliborder;
9138if test x$with_dbmliborder = xyes
9139then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009140as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009141else
9142 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9143 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9144 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009145 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009146 fi
9147 done
9148fi
9149fi
9150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9152$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009153
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009154# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009155
9156
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9158$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009161if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162 withval=$with_signal_module;
9163fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009164
9165
9166if test -z "$with_signal_module"
9167then with_signal_module="yes"
9168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9170$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009171
9172if test "${with_signal_module}" = "yes"; then
9173 USE_SIGNAL_MODULE=""
9174 SIGNAL_OBJS=""
9175else
9176 USE_SIGNAL_MODULE="#"
9177 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9178fi
9179
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009180# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009181
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009182USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184
Martin v. Löwis11437992002-04-12 09:54:03 +00009185
9186# Templates for things AC_DEFINEd more than once.
9187# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009188
9189
Martin v. Löwis11437992002-04-12 09:54:03 +00009190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9192$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009195if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009196 withval=$with_threads;
9197fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009198
9199
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009200# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009203if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204 withval=$with_thread; with_threads=$with_thread
9205fi
9206
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009207
9208if test -z "$with_threads"
9209then with_threads="yes"
9210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9212$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009213
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009214
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009215if test "$with_threads" = "no"
9216then
9217 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009218elif test "$ac_cv_pthread_is_default" = yes
9219then
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009221
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009222 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009224
9225 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009227elif test "$ac_cv_kpthread" = "yes"
9228then
9229 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009230 if test "$ac_cv_cxx_thread" = "yes"; then
9231 CXX="$CXX -Kpthread"
9232 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009235 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009236 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009237elif test "$ac_cv_kthread" = "yes"
9238then
9239 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009240 if test "$ac_cv_cxx_thread" = "yes"; then
9241 CXX="$CXX -Kthread"
9242 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009244
9245 posix_threads=yes
9246 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009247elif test "$ac_cv_pthread" = "yes"
9248then
9249 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009250 if test "$ac_cv_cxx_thread" = "yes"; then
9251 CXX="$CXX -pthread"
9252 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009254
9255 posix_threads=yes
9256 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009257else
9258 if test ! -z "$with_threads" -a -d "$with_threads"
9259 then LDFLAGS="$LDFLAGS -L$with_threads"
9260 fi
9261 if test ! -z "$withval" -a -d "$withval"
9262 then LDFLAGS="$LDFLAGS -L$withval"
9263 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009264
9265 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009266 # define _POSIX_THREADS in unistd.h. Some apparently don't
9267 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9269$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009271/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009272
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009273#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009274#ifdef _POSIX_THREADS
9275yes
9276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009277
9278_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009280 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009281 unistd_defines_pthreads=yes
9282else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009283 unistd_defines_pthreads=no
9284fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009285rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009286
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9288$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009289
Matthias Kloseb9621712010-04-24 17:59:49 +00009290 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009291
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009292 # Just looking for pthread_create in libpthread is not enough:
9293 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9294 # So we really have to include pthread.h, and then link.
9295 _libs=$LIBS
9296 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9298$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009301#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009302
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009303void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009304int
9305main ()
9306{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009307
9308pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009309 ;
9310 return 0;
9311}
9312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009313if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009314
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9316$as_echo "yes" >&6; }
9317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009318
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009319 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009320 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009321else
Martin v. Löwis11437992002-04-12 09:54:03 +00009322
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009323 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009324 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009325if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009327
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009328 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009329 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009330else
Guido van Rossumad678af1998-10-02 14:42:15 +00009331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9333$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009334if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009335 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009336else
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009338LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009341
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009342/* Override any GCC internal prototype to avoid an error.
9343 Use char because int might match the return type of a GCC
9344 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009345#ifdef __cplusplus
9346extern "C"
9347#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009348char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ;
9354 return 0;
9355}
9356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009359else
Matthias Kloseb9621712010-04-24 17:59:49 +00009360 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009362rm -f core conftest.err conftest.$ac_objext \
9363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009364LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9367$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009368if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009370
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009371 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009372 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009373 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009374else
Greg Steinadf63d62000-07-05 10:38:09 +00009375
Matthias Kloseb9621712010-04-24 17:59:49 +00009376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9377$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009378if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009379 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009380else
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009382LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009386/* Override any GCC internal prototype to avoid an error.
9387 Use char because int might match the return type of a GCC
9388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009389#ifdef __cplusplus
9390extern "C"
9391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009392char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009393int
9394main ()
9395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009396return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ;
9398 return 0;
9399}
9400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009402 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009403else
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009406rm -f core conftest.err conftest.$ac_objext \
9407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009408LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9411$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009412if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009414
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009415 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009416 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009417 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009418else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9421$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009422if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009423 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009424else
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009426LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430/* Override any GCC internal prototype to avoid an error.
9431 Use char because int might match the return type of a GCC
9432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009433#ifdef __cplusplus
9434extern "C"
9435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009436char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009437int
9438main ()
9439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ;
9442 return 0;
9443}
9444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009447else
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009450rm -f core conftest.err conftest.$ac_objext \
9451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9455$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009456if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009458
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009459 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009460 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009461 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009462else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009463
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9465$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009466if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009468else
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009470LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474/* Override any GCC internal prototype to avoid an error.
9475 Use char because int might match the return type of a GCC
9476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009477#ifdef __cplusplus
9478extern "C"
9479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009480char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009481int
9482main ()
9483{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 ;
9486 return 0;
9487}
9488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009491else
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009494rm -f core conftest.err conftest.$ac_objext \
9495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009496LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9499$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009500if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009502
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009503 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009504 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009505 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009506else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009507
Martin v. Löwis130fb172001-07-19 11:00:41 +00009508 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009509fi
9510
Guido van Rossum627b2d71993-12-24 10:39:16 +00009511
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009512fi
9513
Guido van Rossum0be3e491997-05-22 20:33:33 +00009514fi
9515
Guido van Rossum49545951997-12-02 19:28:29 +00009516fi
9517
Guido van Rossumb93a8621998-05-07 13:27:32 +00009518fi
9519
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521rm -f core conftest.err conftest.$ac_objext \
9522 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009523
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9525$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009526if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009527 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009528else
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009530LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534/* Override any GCC internal prototype to avoid an error.
9535 Use char because int might match the return type of a GCC
9536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009537#ifdef __cplusplus
9538extern "C"
9539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009540char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009541int
9542main ()
9543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009544return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ;
9546 return 0;
9547}
9548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009551else
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009554rm -f core conftest.err conftest.$ac_objext \
9555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009556LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9559$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009560if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009561 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009562
Martin v. Löwis130fb172001-07-19 11:00:41 +00009563 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009564 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009565 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009566fi
9567
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009568
Neal Norwitza978ab02002-11-02 16:58:05 +00009569 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9571$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009572if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009573 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009574else
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009576LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580/* Override any GCC internal prototype to avoid an error.
9581 Use char because int might match the return type of a GCC
9582 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009583#ifdef __cplusplus
9584extern "C"
9585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009586char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009587int
9588main ()
9589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 ;
9592 return 0;
9593}
9594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009597else
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009600rm -f core conftest.err conftest.$ac_objext \
9601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009602LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9605$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009606if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009608
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009609 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009610 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009611 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009612fi
9613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009614 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009615fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009616
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009617if test "$posix_threads" = "yes"; then
9618 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009619
Matthias Kloseb9621712010-04-24 17:59:49 +00009620$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009621
9622 fi
9623
9624 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9625 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009626 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009627$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009628
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009629 ;;
9630 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009631$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009632
9633 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009634 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009635$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009636
9637 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009638 esac
9639
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9641$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009642 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009644else
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646 ac_cv_pthread_system_supported=no
9647else
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009649/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009650#include <pthread.h>
9651 void *foo(void *parm) {
9652 return NULL;
9653 }
9654 main() {
9655 pthread_attr_t attr;
9656 pthread_t id;
9657 if (pthread_attr_init(&attr)) exit(-1);
9658 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9659 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9660 exit(0);
9661 }
9662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009664 ac_cv_pthread_system_supported=yes
9665else
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009670fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672
Guido van Rossum627b2d71993-12-24 10:39:16 +00009673fi
9674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9676$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009677 if test "$ac_cv_pthread_system_supported" = "yes"; then
9678
Matthias Kloseb9621712010-04-24 17:59:49 +00009679$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009680
9681 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009682 for ac_func in pthread_sigmask
9683do :
9684 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009687#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009688_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009689 case $ac_sys_system in
9690 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009691
Matthias Kloseb9621712010-04-24 17:59:49 +00009692$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009693
9694 ;;
9695 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009696fi
9697done
9698
9699fi
9700
9701
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009702# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
Matthias Kloseb9621712010-04-24 17:59:49 +00009704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9705$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009707if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009709 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009712 ipv6=no
9713 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9715$as_echo "yes" >&6; }
9716 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009717
9718 ipv6=yes
9719 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9726$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727 ipv6=no
9728
9729else
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009731/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009732 /* AF_INET6 available check */
9733#include <sys/types.h>
9734#include <sys/socket.h>
9735main()
9736{
9737 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9738 exit(1);
9739 else
9740 exit(0);
9741}
9742
Martin v. Löwis11437992002-04-12 09:54:03 +00009743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009744if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009745
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9747$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009748 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009749
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009750else
Matthias Kloseb159a552010-04-25 21:00:44 +00009751
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009754 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009755
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009759fi
9760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009761
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009762if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9764$as_echo_n "checking if RFC2553 API is available... " >&6; }
9765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009766/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009767
9768 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009769#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009770int
9771main ()
9772{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009773struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009774 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ;
9776 return 0;
9777}
Matthias Kloseb159a552010-04-25 21:00:44 +00009778
Martin v. Löwis11437992002-04-12 09:54:03 +00009779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009780if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009781
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009783$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009784 ipv6=yes
9785
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009786else
Matthias Kloseb159a552010-04-25 21:00:44 +00009787
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009789$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009790 ipv6=no
9791
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009794fi
9795
9796if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009797 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009798
9799fi
9800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801fi
9802
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009803
9804ipv6type=unknown
9805ipv6lib=none
9806ipv6trylibc=no
9807
9808if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9810$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009811 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9812 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009813 case $i in
9814 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009816/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818#include <netinet/in.h>
9819#ifdef IPV6_INRIA_VERSION
9820yes
9821#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009822_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009825 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009827rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009828
9829 ;;
9830 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009833
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834#include <netinet/in.h>
9835#ifdef __KAME__
9836yes
9837#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009838_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009841 ipv6type=$i;
9842 ipv6lib=inet6
9843 ipv6libdir=/usr/local/v6/lib
9844 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009845fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009846rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009847
9848 ;;
9849 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009852
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009853#include <features.h>
9854#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9855yes
9856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009857_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009859 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009860 ipv6type=$i;
9861 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009862fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009863rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009864
9865 ;;
9866 linux-inet6)
9867 if test -d /usr/inet6; then
9868 ipv6type=$i
9869 ipv6lib=inet6
9870 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009871 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872 fi
9873 ;;
9874 solaris)
9875 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009876 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009877 ipv6type=$i
9878 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009879 fi
9880 fi
9881 ;;
9882 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886#include <sys/param.h>
9887#ifdef _TOSHIBA_INET6
9888yes
9889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893 ipv6type=$i;
9894 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009895 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009896fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009897rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898
9899 ;;
9900 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904#include </usr/local/v6/include/sys/v6config.h>
9905#ifdef __V6D__
9906yes
9907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009908_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911 ipv6type=$i;
9912 ipv6lib=v6;
9913 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009914 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009915fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009916rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917
9918 ;;
9919 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009922
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923#include <sys/param.h>
9924#ifdef _ZETA_MINAMI_INET6
9925yes
9926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009927_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009930 ipv6type=$i;
9931 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009932 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009934rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935
9936 ;;
9937 esac
9938 if test "$ipv6type" != "unknown"; then
9939 break
9940 fi
9941 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9943$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944fi
9945
9946if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9947 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9948 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9949 echo "using lib$ipv6lib"
9950 else
9951 if test $ipv6trylibc = "yes"; then
9952 echo "using libc"
9953 else
9954 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9955 echo "You need to fetch lib$ipv6lib.a from appropriate"
9956 echo 'ipv6 kit and compile beforehand.'
9957 exit 1
9958 fi
9959 fi
9960fi
9961
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9963$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009965/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009966
9967 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009968int
9969main ()
9970{
9971FSIORefNum fRef = 0
9972 ;
9973 return 0;
9974}
Matthias Kloseb159a552010-04-25 21:00:44 +00009975
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009977if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009978
Matthias Kloseb159a552010-04-25 21:00:44 +00009979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9983$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009984
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009985else
Matthias Kloseb159a552010-04-25 21:00:44 +00009986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009989
9990fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9992
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009993# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9995$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009998if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999 withval=$with_doc_strings;
10000fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010001
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010002
10003if test -z "$with_doc_strings"
10004then with_doc_strings="yes"
10005fi
10006if test "$with_doc_strings" != "no"
10007then
10008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010010
10011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10013$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010014
Antoine Pitrou042b1282010-08-13 21:15:58 +000010015# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10017$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010020if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010022if test "$withval" != no
10023then
10024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010026
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10028$as_echo "yes" >&6; }
10029else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10030$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010031fi
10032else
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010035fi
10036
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010037
10038# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10040$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010043if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044 withval=$with_pymalloc;
10045fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010046
Neil Schemenauera35c6882001-02-27 04:45:05 +000010047
Neil Schemenauer16c22972002-03-22 15:34:49 +000010048if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010049then
10050 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010051fi
10052if test "$with_pymalloc" != "no"
10053then
Martin v. Löwis11437992002-04-12 09:54:03 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010056
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010057 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10060$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010061
Benjamin Peterson05159c42009-12-03 03:01:27 +000010062# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10064$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010065
10066# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010068 withval=$with_valgrind;
10069else
10070 with_valgrind=no
10071fi
10072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10074$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010075if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010076 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 +020010077if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010078
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010080
10081else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010082 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010083
10084fi
10085
10086
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010087 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010088fi
10089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010090# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010091
Guido van Rossum98935bf2001-09-05 19:13:16 +000010092DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010093
Guido van Rossume97ee181999-12-20 21:27:22 +000010094# the dlopen() function means we might want to use dynload_shlib.o. some
10095# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010096for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010097do :
10098 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010099if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010101#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010102_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010103
Guido van Rossume97ee181999-12-20 21:27:22 +000010104fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010105done
Guido van Rossume97ee181999-12-20 21:27:22 +000010106
Michael W. Hudson54241132001-12-07 15:38:26 +000010107
Guido van Rossume97ee181999-12-20 21:27:22 +000010108# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10109# loading of modules.
10110
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10112$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010113if test -z "$DYNLOADFILE"
10114then
10115 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010116 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10117 if test "$ac_cv_func_dlopen" = yes
10118 then DYNLOADFILE="dynload_shlib.o"
10119 else DYNLOADFILE="dynload_aix.o"
10120 fi
10121 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010122 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010123 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10124 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010125 *)
10126 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10127 # out any dynamic loading
10128 if test "$ac_cv_func_dlopen" = yes
10129 then DYNLOADFILE="dynload_shlib.o"
10130 else DYNLOADFILE="dynload_stub.o"
10131 fi
10132 ;;
10133 esac
10134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10136$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010137if test "$DYNLOADFILE" != "dynload_stub.o"
10138then
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
Matthias Kloseb9621712010-04-24 17:59:49 +000010140$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010141
10142fi
10143
Neil Schemenauer4e425612001-06-19 15:44:15 +000010144# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10145
Michael W. Hudson54241132001-12-07 15:38:26 +000010146
Matthias Kloseb9621712010-04-24 17:59:49 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10148$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010149if test -z "$MACHDEP_OBJS"
10150then
Jack Jansene578a632001-08-15 01:27:14 +000010151 MACHDEP_OBJS=$extra_machdep_objs
10152else
10153 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010154fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010155if test -z "$MACHDEP_OBJS"; then
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10157$as_echo "none" >&6; }
10158else
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10160$as_echo "$MACHDEP_OBJS" >&6; }
10161fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010162
Guido van Rossum627b2d71993-12-24 10:39:16 +000010163# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010164for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010165 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010166 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010167 futimens futimes gai_strerror \
10168 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010169 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010170 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010171 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10172 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010173 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010174 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010175 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010176 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010177 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010178 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010179 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10180 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010181 sigaction sigaltstack siginterrupt sigpending sigrelse \
10182 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010183 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010184 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10185 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010186do :
10187 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10188ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010189if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010191#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010192_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010193
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010194fi
10195done
10196
Michael W. Hudson54241132001-12-07 15:38:26 +000010197
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010198ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10199 #include <dirent.h>
10200"
10201if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10202
10203$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10204
10205fi
10206
10207
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010208# For some functions, having a definition is not sufficient, since
10209# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10211$as_echo_n "checking for chroot... " >&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=chroot
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_CHROOT 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 link" >&5
10236$as_echo_n "checking for link... " >&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=link
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_LINK 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 symlink" >&5
10261$as_echo_n "checking for symlink... " >&6; }
10262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010263/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010264#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010265int
10266main ()
10267{
10268void *x=symlink
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öwisc8ad7cc2002-11-11 13:23:45 +000010274
Matthias Kloseb9621712010-04-24 17:59:49 +000010275$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 fchdir" >&5
10286$as_echo_n "checking for fchdir... " >&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=fchdir
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_FCHDIR 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 fsync" >&5
10311$as_echo_n "checking for fsync... " >&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=fsync
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_FSYNC 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 fdatasync" >&5
10336$as_echo_n "checking for fdatasync... " >&6; }
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010339#include <unistd.h>
10340int
10341main ()
10342{
10343void *x=fdatasync
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öwisa64988c2003-09-20 15:30:20 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010357
10358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10361$as_echo_n "checking for epoll... " >&6; }
10362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010363/* end confdefs.h. */
10364#include <sys/epoll.h>
10365int
10366main ()
10367{
10368void *x=epoll_create
10369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010376
Matthias Kloseb159a552010-04-25 21:00:44 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010379else
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010382
10383fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10386$as_echo_n "checking for epoll_create1... " >&6; }
10387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10388/* end confdefs.h. */
10389#include <sys/epoll.h>
10390int
10391main ()
10392{
10393void *x=epoll_create1
10394 ;
10395 return 0;
10396}
10397_ACEOF
10398if ac_fn_c_try_compile "$LINENO"; then :
10399
10400$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10401
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10403$as_echo "yes" >&6; }
10404else
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
10407
10408fi
10409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10411$as_echo_n "checking for kqueue... " >&6; }
10412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010413/* end confdefs.h. */
10414
10415#include <sys/types.h>
10416#include <sys/event.h>
10417
10418int
10419main ()
10420{
10421int x=kqueue()
10422 ;
10423 return 0;
10424}
10425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010426if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010429
Matthias Kloseb159a552010-04-25 21:00:44 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010431$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010432else
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010435
10436fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010438# On some systems (eg. FreeBSD 5), we would find a definition of the
10439# functions ctermid_r, setgroups in the library, but no prototype
10440# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10441# address to avoid compiler warnings and potential miscompilations
10442# because of the missing prototypes.
10443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10445$as_echo_n "checking for ctermid_r... " >&6; }
10446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010448
Martin v. Löwisd5843682002-11-21 20:41:28 +000010449#include <stdio.h>
10450
Martin v. Löwisd5843682002-11-21 20:41:28 +000010451int
10452main ()
10453{
10454void* p = ctermid_r
10455 ;
10456 return 0;
10457}
10458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010460
Matthias Kloseb9621712010-04-24 17:59:49 +000010461$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010462
Matthias Kloseb159a552010-04-25 21:00:44 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010464$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010468
10469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10471
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10473$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010474if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010475 $as_echo_n "(cached) " >&6
10476else
10477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010479#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010480int
10481main ()
10482{
10483void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010484
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010490 ac_cv_flock_decl=yes
10491else
10492 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010493
10494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010496
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010497fi
10498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10499$as_echo "$ac_cv_flock_decl" >&6; }
10500if test "x${ac_cv_flock_decl}" = xyes; then
10501 for ac_func in flock
10502do :
10503 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010504if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010505 cat >>confdefs.h <<_ACEOF
10506#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010507_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010508
Antoine Pitroua3000072010-09-07 14:52:42 +000010509else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010511$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010512if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010513 $as_echo_n "(cached) " >&6
10514else
10515 ac_check_lib_save_LIBS=$LIBS
10516LIBS="-lbsd $LIBS"
10517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10518/* end confdefs.h. */
10519
10520/* Override any GCC internal prototype to avoid an error.
10521 Use char because int might match the return type of a GCC
10522 builtin and then its argument prototype would still apply. */
10523#ifdef __cplusplus
10524extern "C"
10525#endif
10526char flock ();
10527int
10528main ()
10529{
10530return flock ();
10531 ;
10532 return 0;
10533}
10534_ACEOF
10535if ac_fn_c_try_link "$LINENO"; then :
10536 ac_cv_lib_bsd_flock=yes
10537else
10538 ac_cv_lib_bsd_flock=no
10539fi
10540rm -f core conftest.err conftest.$ac_objext \
10541 conftest$ac_exeext conftest.$ac_ext
10542LIBS=$ac_check_lib_save_LIBS
10543fi
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10545$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010546if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010547 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010548
10549
10550$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10551
10552
10553fi
10554
10555
10556fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010557done
10558
Antoine Pitroua3000072010-09-07 14:52:42 +000010559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560
Matthias Kloseb9621712010-04-24 17:59:49 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10562$as_echo_n "checking for getpagesize... " >&6; }
10563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010565
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010566#include <unistd.h>
10567
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010568int
10569main ()
10570{
10571void* p = getpagesize
10572 ;
10573 return 0;
10574}
10575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010579
Matthias Kloseb159a552010-04-25 21:00:44 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010581$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010582else
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010585
10586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010588
Victor Stinner984890f2011-11-24 13:53:38 +010010589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10590$as_echo_n "checking for broken unsetenv... " >&6; }
10591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10592/* end confdefs.h. */
10593
10594#include <stdlib.h>
10595
10596int
10597main ()
10598{
10599int res = unsetenv("DUMMY")
10600 ;
10601 return 0;
10602}
10603_ACEOF
10604if ac_fn_c_try_compile "$LINENO"; then :
10605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607else
10608
10609$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10610
10611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10612$as_echo "yes" >&6; }
10613
10614fi
10615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10616
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617for ac_prog in true
10618do
10619 # Extract the first word of "$ac_prog", so it can be a program name with args.
10620set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010623if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625else
10626 if test -n "$TRUE"; then
10627 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10628else
10629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10630for as_dir in $PATH
10631do
10632 IFS=$as_save_IFS
10633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010635 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 +000010636 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 $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 +000010638 break 2
10639 fi
10640done
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643
10644fi
10645fi
10646TRUE=$ac_cv_prog_TRUE
10647if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10649$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653fi
10654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010656 test -n "$TRUE" && break
10657done
10658test -n "$TRUE" || TRUE="/bin/true"
10659
10660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10662$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010663if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010665else
10666 ac_check_lib_save_LIBS=$LIBS
10667LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671/* Override any GCC internal prototype to avoid an error.
10672 Use char because int might match the return type of a GCC
10673 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010674#ifdef __cplusplus
10675extern "C"
10676#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010677char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010678int
10679main ()
10680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010681return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010682 ;
10683 return 0;
10684}
10685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010686if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010687 ac_cv_lib_c_inet_aton=yes
10688else
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010691rm -f core conftest.err conftest.$ac_objext \
10692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010693LIBS=$ac_check_lib_save_LIBS
10694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10696$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010697if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010699else
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10701$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010702if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010704else
10705 ac_check_lib_save_LIBS=$LIBS
10706LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010708/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710/* Override any GCC internal prototype to avoid an error.
10711 Use char because int might match the return type of a GCC
10712 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010713#ifdef __cplusplus
10714extern "C"
10715#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010716char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010717int
10718main ()
10719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010726 ac_cv_lib_resolv_inet_aton=yes
10727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010730rm -f core conftest.err conftest.$ac_objext \
10731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010732LIBS=$ac_check_lib_save_LIBS
10733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10735$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010736if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737 cat >>confdefs.h <<_ACEOF
10738#define HAVE_LIBRESOLV 1
10739_ACEOF
10740
10741 LIBS="-lresolv $LIBS"
10742
10743fi
10744
10745
10746fi
10747
10748
Christian Heimesd0764e22007-12-04 15:00:33 +000010749# On Tru64, chflags seems to be present, but calling it will
10750# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10752$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010753if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010755else
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010757 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010758else
Matthias Kloseb9621712010-04-24 17:59:49 +000010759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010760/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010761
Christian Heimesd0764e22007-12-04 15:00:33 +000010762#include <sys/stat.h>
10763#include <unistd.h>
10764int main(int argc, char*argv[])
10765{
10766 if(chflags(argv[0], 0) != 0)
10767 return 1;
10768 return 0;
10769}
Ned Deily3eb67d52011-06-28 00:00:28 -070010770
Christian Heimesd0764e22007-12-04 15:00:33 +000010771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010772if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010773 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010774else
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010779fi
10780
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010781
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10784$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010785if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010787if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010788 ac_cv_have_chflags="yes"
10789else
10790 ac_cv_have_chflags="no"
10791fi
10792
10793fi
10794if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010795
Matthias Kloseb9621712010-04-24 17:59:49 +000010796$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010797
10798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10801$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010802if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010804else
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010806 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010807else
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010809/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010810
Christian Heimesd0764e22007-12-04 15:00:33 +000010811#include <sys/stat.h>
10812#include <unistd.h>
10813int main(int argc, char*argv[])
10814{
10815 if(lchflags(argv[0], 0) != 0)
10816 return 1;
10817 return 0;
10818}
Ned Deily3eb67d52011-06-28 00:00:28 -070010819
Christian Heimesd0764e22007-12-04 15:00:33 +000010820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010822 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010823else
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010828fi
10829
10830
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10833$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010834if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010836if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010837 ac_cv_have_lchflags="yes"
10838else
10839 ac_cv_have_lchflags="no"
10840fi
10841
10842fi
10843if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010844
Matthias Kloseb9621712010-04-24 17:59:49 +000010845$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010846
10847fi
10848
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010849case $ac_sys_system/$ac_sys_release in
10850Darwin/*)
10851 _CUR_CFLAGS="${CFLAGS}"
10852 _CUR_LDFLAGS="${LDFLAGS}"
10853 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10854 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10855 ;;
10856esac
10857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10859$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010860if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010862else
10863 ac_check_lib_save_LIBS=$LIBS
10864LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010866/* end confdefs.h. */
10867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010868/* Override any GCC internal prototype to avoid an error.
10869 Use char because int might match the return type of a GCC
10870 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010871#ifdef __cplusplus
10872extern "C"
10873#endif
10874char inflateCopy ();
10875int
10876main ()
10877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010878return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010879 ;
10880 return 0;
10881}
10882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010883if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010884 ac_cv_lib_z_inflateCopy=yes
10885else
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010888rm -f core conftest.err conftest.$ac_objext \
10889 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010890LIBS=$ac_check_lib_save_LIBS
10891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10893$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010894if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010895
Matthias Kloseb9621712010-04-24 17:59:49 +000010896$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010897
10898fi
10899
10900
10901case $ac_sys_system/$ac_sys_release in
10902Darwin/*)
10903 CFLAGS="${_CUR_CFLAGS}"
10904 LDFLAGS="${_CUR_LDFLAGS}"
10905 ;;
10906esac
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10909$as_echo_n "checking for hstrerror... " >&6; }
10910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010911/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010912
Martin v. Löwise9416172003-05-03 10:12:45 +000010913#include <netdb.h>
10914
Martin v. Löwise9416172003-05-03 10:12:45 +000010915int
10916main ()
10917{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010918void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010919 ;
10920 return 0;
10921}
10922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010926
Matthias Kloseb159a552010-04-25 21:00:44 +000010927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010928$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010929else
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10931$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010932
10933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010934rm -f core conftest.err conftest.$ac_objext \
10935 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10938$as_echo_n "checking for inet_aton... " >&6; }
10939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010941
Martin v. Löwis86d66262006-02-17 08:40:11 +000010942#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010943#include <sys/socket.h>
10944#include <netinet/in.h>
10945#include <arpa/inet.h>
10946
Martin v. Löwise9416172003-05-03 10:12:45 +000010947int
10948main ()
10949{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010950void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010951 ;
10952 return 0;
10953}
10954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010958
Matthias Kloseb159a552010-04-25 21:00:44 +000010959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010961else
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010964
10965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010966rm -f core conftest.err conftest.$ac_objext \
10967 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10970$as_echo_n "checking for inet_pton... " >&6; }
10971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010972/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010973
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010974#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010975#include <sys/socket.h>
10976#include <netinet/in.h>
10977#include <arpa/inet.h>
10978
Martin v. Löwise9416172003-05-03 10:12:45 +000010979int
10980main ()
10981{
10982void* p = inet_pton
10983 ;
10984 return 0;
10985}
10986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010987if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010990
Matthias Kloseb159a552010-04-25 21:00:44 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010996
10997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010999
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011000# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11002$as_echo_n "checking for setgroups... " >&6; }
11003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011005
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011006#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011007#ifdef HAVE_GRP_H
11008#include <grp.h>
11009#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011010
Martin v. Löwisd5843682002-11-21 20:41:28 +000011011int
11012main ()
11013{
11014void* p = setgroups
11015 ;
11016 return 0;
11017}
11018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011019if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011022
Matthias Kloseb159a552010-04-25 21:00:44 +000011023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011024$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011025else
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011028
11029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011032# check for openpty and forkpty
11033
11034for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011035do :
11036 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011037if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011038 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011039#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011041
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011042else
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11044$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011045if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011047else
Martin v. Löwis11437992002-04-12 09:54:03 +000011048 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011049LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053/* Override any GCC internal prototype to avoid an error.
11054 Use char because int might match the return type of a GCC
11055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011056#ifdef __cplusplus
11057extern "C"
11058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011059char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011060int
11061main ()
11062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ;
11065 return 0;
11066}
11067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011069 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011070else
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011073rm -f core conftest.err conftest.$ac_objext \
11074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011075LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11078$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011079if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011080 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011081 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011082else
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11084$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011085if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011087else
11088 ac_check_lib_save_LIBS=$LIBS
11089LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011091/* end confdefs.h. */
11092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093/* Override any GCC internal prototype to avoid an error.
11094 Use char because int might match the return type of a GCC
11095 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011096#ifdef __cplusplus
11097extern "C"
11098#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011099char openpty ();
11100int
11101main ()
11102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011104 ;
11105 return 0;
11106}
11107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011109 ac_cv_lib_bsd_openpty=yes
11110else
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011113rm -f core conftest.err conftest.$ac_objext \
11114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011115LIBS=$ac_check_lib_save_LIBS
11116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11118$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011119if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011120 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011121 LIBS="$LIBS -lbsd"
11122fi
11123
11124
11125fi
11126
Fred Drake8cef4cf2000-06-28 16:40:38 +000011127
11128fi
11129done
11130
11131for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011132do :
11133 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011134if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011136#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011137_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011138
Fred Drake8cef4cf2000-06-28 16:40:38 +000011139else
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11141$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011142if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011144else
Martin v. Löwis11437992002-04-12 09:54:03 +000011145 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011146LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150/* Override any GCC internal prototype to avoid an error.
11151 Use char because int might match the return type of a GCC
11152 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011153#ifdef __cplusplus
11154extern "C"
11155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011156char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011157int
11158main ()
11159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011161 ;
11162 return 0;
11163}
11164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011165if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011166 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011167else
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011170rm -f core conftest.err conftest.$ac_objext \
11171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011172LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11175$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011176if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011177 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011178 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011179else
Matthias Kloseb9621712010-04-24 17:59:49 +000011180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11181$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011182if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011183 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011184else
11185 ac_check_lib_save_LIBS=$LIBS
11186LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011188/* end confdefs.h. */
11189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190/* Override any GCC internal prototype to avoid an error.
11191 Use char because int might match the return type of a GCC
11192 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011193#ifdef __cplusplus
11194extern "C"
11195#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011196char forkpty ();
11197int
11198main ()
11199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011201 ;
11202 return 0;
11203}
11204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011206 ac_cv_lib_bsd_forkpty=yes
11207else
Matthias Kloseb9621712010-04-24 17:59:49 +000011208 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011210rm -f core conftest.err conftest.$ac_objext \
11211 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011212LIBS=$ac_check_lib_save_LIBS
11213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11215$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011216if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011218 LIBS="$LIBS -lbsd"
11219fi
11220
11221
11222fi
11223
Fred Drake8cef4cf2000-06-28 16:40:38 +000011224
11225fi
11226done
11227
Jack Jansendd19cf82001-12-06 22:36:17 +000011228
Christian Heimesb186d002008-03-18 15:15:01 +000011229# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011230for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011231do :
11232 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011233if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011234 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011235#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011236_ACEOF
11237
11238fi
11239done
11240
11241
Michael W. Hudson54241132001-12-07 15:38:26 +000011242# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011243for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011244do :
11245 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11246ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011247if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011250_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011251
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011252fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011253done
11254
Michael W. Hudson54241132001-12-07 15:38:26 +000011255
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011256ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011257if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011258 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011259
Martin v. Löwis1142de32002-03-29 16:28:31 +000011260else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011261 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011262 *" dup2.$ac_objext "* ) ;;
11263 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011265esac
11266
Martin v. Löwis1142de32002-03-29 16:28:31 +000011267fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011268
11269ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011270if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011271 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11272
11273else
11274 case " $LIBOBJS " in
11275 *" getcwd.$ac_objext "* ) ;;
11276 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11277 ;;
11278esac
11279
11280fi
11281
11282ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011283if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011284 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11285
11286else
11287 case " $LIBOBJS " in
11288 *" strdup.$ac_objext "* ) ;;
11289 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11290 ;;
11291esac
11292
11293fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011294
11295
11296for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011297do :
11298 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011299if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011301#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011304/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011305#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011306int
11307main ()
11308{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011309getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 ;
11311 return 0;
11312}
11313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Matthias Kloseb9621712010-04-24 17:59:49 +000011316$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011317
Guido van Rossum627b2d71993-12-24 10:39:16 +000011318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011320
Guido van Rossum627b2d71993-12-24 10:39:16 +000011321fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011322done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011323
Jack Jansen150753c2003-03-29 22:07:47 +000011324for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011325do :
11326 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011327if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011328 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011329#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011333#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011334int
11335main ()
11336{
11337setpgrp(0,0);
11338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011345
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011348
11349fi
11350done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011351
Thomas Wouters3a584202000-08-05 23:28:51 +000011352for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011353do :
11354 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011355if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011357#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011360/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011361#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011362int
11363main ()
11364{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011365gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 ;
11367 return 0;
11368}
11369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370if ac_fn_c_try_compile "$LINENO"; then :
11371
Guido van Rossum627b2d71993-12-24 10:39:16 +000011372else
Skip Montanaro6dead952003-09-25 14:50:04 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Guido van Rossum627b2d71993-12-24 10:39:16 +000011377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011379
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011381done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382
Michael W. Hudson54241132001-12-07 15:38:26 +000011383
Victor Stinnere0be4232011-10-25 13:06:09 +020011384for ac_func in clock_gettime
11385do :
11386 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11387if test "x$ac_cv_func_clock_gettime" = xyes; then :
11388 cat >>confdefs.h <<_ACEOF
11389#define HAVE_CLOCK_GETTIME 1
11390_ACEOF
11391
11392else
11393
11394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11395$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11396if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11397 $as_echo_n "(cached) " >&6
11398else
11399 ac_check_lib_save_LIBS=$LIBS
11400LIBS="-lrt $LIBS"
11401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11402/* end confdefs.h. */
11403
11404/* Override any GCC internal prototype to avoid an error.
11405 Use char because int might match the return type of a GCC
11406 builtin and then its argument prototype would still apply. */
11407#ifdef __cplusplus
11408extern "C"
11409#endif
11410char clock_gettime ();
11411int
11412main ()
11413{
11414return clock_gettime ();
11415 ;
11416 return 0;
11417}
11418_ACEOF
11419if ac_fn_c_try_link "$LINENO"; then :
11420 ac_cv_lib_rt_clock_gettime=yes
11421else
11422 ac_cv_lib_rt_clock_gettime=no
11423fi
11424rm -f core conftest.err conftest.$ac_objext \
11425 conftest$ac_exeext conftest.$ac_ext
11426LIBS=$ac_check_lib_save_LIBS
11427fi
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11429$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11430if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11431
11432 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11433
11434
11435$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11436
11437
11438fi
11439
11440
11441fi
11442done
11443
11444
11445for ac_func in clock_getres
11446do :
11447 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11448if test "x$ac_cv_func_clock_getres" = xyes; then :
11449 cat >>confdefs.h <<_ACEOF
11450#define HAVE_CLOCK_GETRES 1
11451_ACEOF
11452
11453else
11454
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11456$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11457if ${ac_cv_lib_rt_clock_getres+:} false; then :
11458 $as_echo_n "(cached) " >&6
11459else
11460 ac_check_lib_save_LIBS=$LIBS
11461LIBS="-lrt $LIBS"
11462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h. */
11464
11465/* Override any GCC internal prototype to avoid an error.
11466 Use char because int might match the return type of a GCC
11467 builtin and then its argument prototype would still apply. */
11468#ifdef __cplusplus
11469extern "C"
11470#endif
11471char clock_getres ();
11472int
11473main ()
11474{
11475return clock_getres ();
11476 ;
11477 return 0;
11478}
11479_ACEOF
11480if ac_fn_c_try_link "$LINENO"; then :
11481 ac_cv_lib_rt_clock_getres=yes
11482else
11483 ac_cv_lib_rt_clock_getres=no
11484fi
11485rm -f core conftest.err conftest.$ac_objext \
11486 conftest$ac_exeext conftest.$ac_ext
11487LIBS=$ac_check_lib_save_LIBS
11488fi
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11490$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11491if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11492
11493 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11494
11495
11496fi
11497
11498
11499fi
11500done
11501
11502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11504$as_echo_n "checking for major... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011507
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011508#if defined(MAJOR_IN_MKDEV)
11509#include <sys/mkdev.h>
11510#elif defined(MAJOR_IN_SYSMACROS)
11511#include <sys/sysmacros.h>
11512#else
11513#include <sys/types.h>
11514#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011515
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011516int
11517main ()
11518{
11519
11520 makedev(major(0),minor(0));
11521
11522 ;
11523 return 0;
11524}
11525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011526if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011527
11528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011530
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11532$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011533
11534else
Skip Montanaro6dead952003-09-25 14:50:04 +000011535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11537$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011538
11539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011540rm -f core conftest.err conftest.$ac_objext \
11541 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011542
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011543# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011544# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11546$as_echo_n "checking for getaddrinfo... " >&6; }
11547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011548/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011549
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011550#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011551#include <sys/socket.h>
11552#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011553#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011554
Martin v. Löwis11437992002-04-12 09:54:03 +000011555int
11556main ()
11557{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011558getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 ;
11560 return 0;
11561}
11562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011563if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011564 have_getaddrinfo=yes
11565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011568rm -f core conftest.err conftest.$ac_objext \
11569 conftest$ac_exeext conftest.$ac_ext
11570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11571$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011572if test $have_getaddrinfo = yes
11573then
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11575$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011576 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011578else
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011580
11581if test "${enable_ipv6+set}" = set; then
11582 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11583else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011584 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011585fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011588/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011589
11590#include <sys/types.h>
11591#include <netdb.h>
11592#include <string.h>
11593#include <sys/socket.h>
11594#include <netinet/in.h>
11595
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011596int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011597{
11598 int passive, gaierr, inet4 = 0, inet6 = 0;
11599 struct addrinfo hints, *ai, *aitop;
11600 char straddr[INET6_ADDRSTRLEN], strport[16];
11601
11602 for (passive = 0; passive <= 1; passive++) {
11603 memset(&hints, 0, sizeof(hints));
11604 hints.ai_family = AF_UNSPEC;
11605 hints.ai_flags = passive ? AI_PASSIVE : 0;
11606 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011607 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011608 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11609 (void)gai_strerror(gaierr);
11610 goto bad;
11611 }
11612 for (ai = aitop; ai; ai = ai->ai_next) {
11613 if (ai->ai_addr == NULL ||
11614 ai->ai_addrlen == 0 ||
11615 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11616 straddr, sizeof(straddr), strport, sizeof(strport),
11617 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11618 goto bad;
11619 }
11620 switch (ai->ai_family) {
11621 case AF_INET:
11622 if (strcmp(strport, "54321") != 0) {
11623 goto bad;
11624 }
11625 if (passive) {
11626 if (strcmp(straddr, "0.0.0.0") != 0) {
11627 goto bad;
11628 }
11629 } else {
11630 if (strcmp(straddr, "127.0.0.1") != 0) {
11631 goto bad;
11632 }
11633 }
11634 inet4++;
11635 break;
11636 case AF_INET6:
11637 if (strcmp(strport, "54321") != 0) {
11638 goto bad;
11639 }
11640 if (passive) {
11641 if (strcmp(straddr, "::") != 0) {
11642 goto bad;
11643 }
11644 } else {
11645 if (strcmp(straddr, "::1") != 0) {
11646 goto bad;
11647 }
11648 }
11649 inet6++;
11650 break;
11651 case AF_UNSPEC:
11652 goto bad;
11653 break;
11654 default:
11655 /* another family support? */
11656 break;
11657 }
11658 }
11659 }
11660
11661 if (!(inet4 == 0 || inet4 == 2))
11662 goto bad;
11663 if (!(inet6 == 0 || inet6 == 2))
11664 goto bad;
11665
11666 if (aitop)
11667 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011668 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011669
11670 bad:
11671 if (aitop)
11672 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011673 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011674}
11675
Martin v. Löwis11437992002-04-12 09:54:03 +000011676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011677if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011678 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011685
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011686fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011687
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11691$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11692
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011693if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011694then
11695 if test $ipv6 = yes
11696 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011697 echo 'Fatal: You must get working getaddrinfo() function.'
11698 echo ' or you can specify "--disable-ipv6"'.
11699 exit 1
11700 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011701else
Martin v. Löwis11437992002-04-12 09:54:03 +000011702
Matthias Kloseb9621712010-04-24 17:59:49 +000011703$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011704
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011705fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011706
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011707for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011708do :
11709 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011710if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011712#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011713_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011714
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011715fi
11716done
11717
Michael W. Hudson54241132001-12-07 15:38:26 +000011718
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011719# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11721$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011726/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011727#include <sys/types.h>
11728#include <sys/time.h>
11729#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011730
Martin v. Löwis11437992002-04-12 09:54:03 +000011731int
11732main ()
11733{
11734if ((struct tm *) 0)
11735return 0;
11736 ;
11737 return 0;
11738}
11739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011741 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11748$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011749if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011750
Matthias Kloseb9621712010-04-24 17:59:49 +000011751$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752
11753fi
11754
Matthias Kloseb9621712010-04-24 17:59:49 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11756$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011757if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011761/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762#include <sys/types.h>
11763#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011764
Martin v. Löwis11437992002-04-12 09:54:03 +000011765int
11766main ()
11767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011768struct tm tm;
11769 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011771 ;
11772 return 0;
11773}
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011776 ac_cv_struct_tm=time.h
11777else
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11783$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011784if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787
11788fi
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790ac_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 +000011791#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793"
Victor Stinnere0be4232011-10-25 13:06:09 +020011794if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
11796cat >>confdefs.h <<_ACEOF
11797#define HAVE_STRUCT_TM_TM_ZONE 1
11798_ACEOF
11799
11800
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011802
Martin v. Löwis11437992002-04-12 09:54:03 +000011803if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011806
11807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11809"
Victor Stinnere0be4232011-10-25 13:06:09 +020011810if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814fi
11815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818_ACEOF
11819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11821$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011827#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828#if !HAVE_DECL_TZNAME
11829extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Martin v. Löwis11437992002-04-12 09:54:03 +000011832int
11833main ()
11834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011841 ac_cv_var_tzname=yes
11842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11849$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011850 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011853
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011854 fi
11855fi
11856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857ac_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 +020011858if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
11860cat >>confdefs.h <<_ACEOF
11861#define HAVE_STRUCT_STAT_ST_RDEV 1
11862_ACEOF
11863
11864
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011865fi
11866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867ac_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 +020011868if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011869
Martin v. Löwis11437992002-04-12 09:54:03 +000011870cat >>confdefs.h <<_ACEOF
11871#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11872_ACEOF
11873
11874
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011875fi
11876
Matthias Kloseb9621712010-04-24 17:59:49 +000011877ac_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 +020011878if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011879
11880cat >>confdefs.h <<_ACEOF
11881#define HAVE_STRUCT_STAT_ST_FLAGS 1
11882_ACEOF
11883
11884
11885fi
11886
Matthias Kloseb9621712010-04-24 17:59:49 +000011887ac_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 +020011888if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011889
11890cat >>confdefs.h <<_ACEOF
11891#define HAVE_STRUCT_STAT_ST_GEN 1
11892_ACEOF
11893
11894
11895fi
11896
Matthias Kloseb9621712010-04-24 17:59:49 +000011897ac_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 +020011898if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011899
11900cat >>confdefs.h <<_ACEOF
11901#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11902_ACEOF
11903
11904
11905fi
11906
Matthias Kloseb9621712010-04-24 17:59:49 +000011907ac_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 +020011908if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011909
Martin v. Löwis11437992002-04-12 09:54:03 +000011910cat >>confdefs.h <<_ACEOF
11911#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11912_ACEOF
11913
11914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011916
11917else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011919 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011920 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11921 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011922esac
11923
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011924fi
11925
Michael W. Hudson54241132001-12-07 15:38:26 +000011926
Martin v. Löwis11437992002-04-12 09:54:03 +000011927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11929$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011930if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011932else
Matthias Kloseb159a552010-04-25 21:00:44 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011935/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011936#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011937int
11938main ()
11939{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011940return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 ;
11942 return 0;
11943}
11944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011945if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011946 ac_cv_header_time_altzone=yes
11947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011952fi
11953
Matthias Kloseb9621712010-04-24 17:59:49 +000011954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11955$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011956if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011959
11960fi
11961
Guido van Rossumda88dad1995-01-26 00:46:29 +000011962was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11964$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011966/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011967
11968#include <sys/types.h>
11969#include <sys/select.h>
11970#include <sys/time.h>
11971
Martin v. Löwis11437992002-04-12 09:54:03 +000011972int
11973main ()
11974{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011975;
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 ;
11977 return 0;
11978}
11979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011980if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011981
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011984
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011985 was_it_defined=yes
11986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11990$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991
Matthias Kloseb9621712010-04-24 17:59:49 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11993$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011994if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011996else
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011998/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011999#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012000int
12001main ()
12002{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012003struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 ;
12005 return 0;
12006}
12007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012009 ac_cv_struct_addrinfo=yes
12010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12014fi
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12017$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012018if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012021
12022fi
12023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12025$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012026if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012030/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012031
12032# include <sys/types.h>
12033# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012034int
12035main ()
12036{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012037struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 ;
12039 return 0;
12040}
12041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012043 ac_cv_struct_sockaddr_storage=yes
12044else
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048fi
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12051$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012052if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012055
12056fi
12057
Guido van Rossum627b2d71993-12-24 10:39:16 +000012058# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12061$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012062if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012067$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
12071static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012072test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000012073
12074 ;
12075 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012076}
Martin v. Löwis11437992002-04-12 09:54:03 +000012077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012079 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012080else
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12086$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089
12090fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12093$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012099
Martin v. Löwis11437992002-04-12 09:54:03 +000012100int
12101main ()
12102{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012103/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012104#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012105 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012107 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109 char const *const *pcpcc;
12110 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 /* NEC SVR4.0.2 mips cc rejects this. */
12112 struct point {int x, y;};
12113 static struct point const zero = {0,0};
12114 /* AIX XL C 1.02.0.0 rejects this.
12115 It does not let you subtract one const X* pointer from another in
12116 an arm of an if-expression whose if-part is not a constant
12117 expression */
12118 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121 ++pcpcc;
12122 ppc = (char**) pcpcc;
12123 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012124 { /* SCO 3.2v4 cc rejects this. */
12125 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 }
12131 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12132 int x[] = {25, 17};
12133 const int *foo = &x[0];
12134 ++foo;
12135 }
12136 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12137 typedef const int *iptr;
12138 iptr p = 0;
12139 ++p;
12140 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012141 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012143 struct s { int j; const int *ap[3]; };
12144 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 }
12146 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12147 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012150 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012151#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012152
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ;
12154 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012155}
Martin v. Löwis11437992002-04-12 09:54:03 +000012156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012157if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158 ac_cv_c_const=yes
12159else
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12165$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012169
12170fi
12171
Michael W. Hudson54241132001-12-07 15:38:26 +000012172
Guido van Rossumda88dad1995-01-26 00:46:29 +000012173works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12175$as_echo_n "checking for working volatile... " >&6; }
12176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012177/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179int
12180main ()
12181{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 ;
12184 return 0;
12185}
12186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012188 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012189else
Skip Montanaro6dead952003-09-25 14:50:04 +000012190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012192
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012193
Guido van Rossum627b2d71993-12-24 10:39:16 +000012194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12197$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012198
Guido van Rossumda88dad1995-01-26 00:46:29 +000012199works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12201$as_echo_n "checking for working signed char... " >&6; }
12202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012203/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012204
Martin v. Löwis11437992002-04-12 09:54:03 +000012205int
12206main ()
12207{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012208signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 ;
12210 return 0;
12211}
12212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012214 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012215else
Skip Montanaro6dead952003-09-25 14:50:04 +000012216
Matthias Kloseb9621712010-04-24 17:59:49 +000012217$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012218
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012219
Guido van Rossum7f43da71994-08-01 12:15:30 +000012220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12223$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012224
Guido van Rossumda88dad1995-01-26 00:46:29 +000012225have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12227$as_echo_n "checking for prototypes... " >&6; }
12228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012229/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012230int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012231int
12232main ()
12233{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 ;
12236 return 0;
12237}
12238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Matthias Kloseb9621712010-04-24 17:59:49 +000012241$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012242
Matthias Kloseb159a552010-04-25 21:00:44 +000012243 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12247$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248
Guido van Rossumda88dad1995-01-26 00:46:29 +000012249works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12251$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012253/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012254
12255#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012256int foo(int x, ...) {
12257 va_list va;
12258 va_start(va, x);
12259 va_arg(va, int);
12260 va_arg(va, char *);
12261 va_arg(va, double);
12262 return 0;
12263}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012264
Martin v. Löwis11437992002-04-12 09:54:03 +000012265int
12266main ()
12267{
Guido van Rossum90eea071996-08-30 20:58:57 +000012268return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012269 ;
12270 return 0;
12271}
12272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012274
12275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012278 works=yes
12279
Guido van Rossum627b2d71993-12-24 10:39:16 +000012280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12283$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284
Martin v. Löwisd6320502004-08-12 13:45:08 +000012285# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12287$as_echo_n "checking for socketpair... " >&6; }
12288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012289/* end confdefs.h. */
12290
12291#include <sys/types.h>
12292#include <sys/socket.h>
12293
12294int
12295main ()
12296{
12297void *x=socketpair
12298 ;
12299 return 0;
12300}
12301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012305
Matthias Kloseb159a552010-04-25 21:00:44 +000012306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012307$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12310$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012311
12312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012314
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012315# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12317$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012320#include <sys/types.h>
12321#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012322int
12323main ()
12324{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325struct sockaddr x;
12326x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 ;
12328 return 0;
12329}
12330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331if ac_fn_c_try_compile "$LINENO"; then :
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12333$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012336
12337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012340
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012343
Guido van Rossumda88dad1995-01-26 00:46:29 +000012344va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12346$as_echo_n "checking whether va_list is an array... " >&6; }
12347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349
12350#ifdef HAVE_STDARG_PROTOTYPES
12351#include <stdarg.h>
12352#else
12353#include <varargs.h>
12354#endif
12355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356int
12357main ()
12358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012359va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ;
12361 return 0;
12362}
12363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364if ac_fn_c_try_compile "$LINENO"; then :
12365
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012366else
Skip Montanaro6dead952003-09-25 14:50:04 +000012367
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Guido van Rossumda88dad1995-01-26 00:46:29 +000012371 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012372
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12376$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012377
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012378# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
12380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012382if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12387$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012388 OLD_CFLAGS=$CFLAGS
12389 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012391/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012392
12393# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012394
Martin v. Löwis11437992002-04-12 09:54:03 +000012395int
12396main ()
12397{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012398
12399 char *name;
12400 struct hostent *he, *res;
12401 char buffer[2048];
12402 int buflen = 2048;
12403 int h_errnop;
12404
12405 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
12407 ;
12408 return 0;
12409}
12410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012414
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12419$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012421else
Skip Montanaro6dead952003-09-25 14:50:04 +000012422
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12424$as_echo "no" >&6; }
12425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12426$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012430# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012435
12436 char *name;
12437 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012438 char buffer[2048];
12439 int buflen = 2048;
12440 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012441
Matthias Kloseb159a552010-04-25 21:00:44 +000012442 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012443
12444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012451
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
Matthias Kloseb159a552010-04-25 21:00:44 +000012453$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12456$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012458else
Skip Montanaro6dead952003-09-25 14:50:04 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12461$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12463$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12465/* end confdefs.h. */
12466
12467# include <netdb.h>
12468
12469int
12470main ()
12471{
12472
12473 char *name;
12474 struct hostent *he;
12475 struct hostent_data data;
12476
12477 (void) gethostbyname_r(name, he, &data);
12478
12479 ;
12480 return 0;
12481}
12482_ACEOF
12483if ac_fn_c_try_compile "$LINENO"; then :
12484
12485 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12486
12487
12488$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12489
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12491$as_echo "yes" >&6; }
12492
12493else
12494
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12496$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012506 CFLAGS=$OLD_CFLAGS
12507
12508else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510 for ac_func in gethostbyname
12511do :
12512 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012513if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012516_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012517
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012518fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012519done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520
Michael W. Hudson54241132001-12-07 15:38:26 +000012521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012522fi
12523
Michael W. Hudson54241132001-12-07 15:38:26 +000012524
12525
12526
12527
12528
12529
Guido van Rossum627b2d71993-12-24 10:39:16 +000012530# checks for system services
12531# (none yet)
12532
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012534ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012535if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012536
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012537else
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12539$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012540if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012542else
Martin v. Löwis11437992002-04-12 09:54:03 +000012543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012544LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548/* Override any GCC internal prototype to avoid an error.
12549 Use char because int might match the return type of a GCC
12550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012551#ifdef __cplusplus
12552extern "C"
12553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012554char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012555int
12556main ()
12557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012559 ;
12560 return 0;
12561}
12562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012564 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012565else
Matthias Kloseb9621712010-04-24 17:59:49 +000012566 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012568rm -f core conftest.err conftest.$ac_objext \
12569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12573$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012574if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 cat >>confdefs.h <<_ACEOF
12576#define HAVE_LIBIEEE 1
12577_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012579 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580
Guido van Rossum627b2d71993-12-24 10:39:16 +000012581fi
12582
Michael W. Hudson54241132001-12-07 15:38:26 +000012583
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012584fi
12585
Michael W. Hudson54241132001-12-07 15:38:26 +000012586
Guido van Rossum7f253911997-05-09 02:42:48 +000012587# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12589$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012592if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012594if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012595then
12596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12600$as_echo "yes" >&6; }
12601else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012603fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012604else
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12606$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607fi
12608
Guido van Rossum7f253911997-05-09 02:42:48 +000012609
Guido van Rossum7f43da71994-08-01 12:15:30 +000012610# check for --with-libm=...
12611
Guido van Rossum563e7081996-09-10 18:20:48 +000012612case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012613Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012614*) LIBM=-lm
12615esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12617$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012620if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012622if test "$withval" = no
12623then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12625$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012626elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012627then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12629$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012630else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012631fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12634$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635fi
12636
Guido van Rossum7f43da71994-08-01 12:15:30 +000012637
12638# check for --with-libc=...
12639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12641$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012644if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012646if test "$withval" = no
12647then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12649$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012650elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012651then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12653$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012654else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012655fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012656else
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12658$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659fi
12660
Guido van Rossum7f43da71994-08-01 12:15:30 +000012661
Stefan Krah1919b7e2012-03-21 18:25:23 +010012662# **************************************
12663# * Check for gcc x64 inline assembler *
12664# **************************************
12665
12666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12667$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669/* end confdefs.h. */
12670
12671int
12672main ()
12673{
12674
12675 __asm__ __volatile__ ("movq %rcx, %rax");
12676
12677 ;
12678 return 0;
12679}
12680_ACEOF
12681if ac_fn_c_try_compile "$LINENO"; then :
12682 have_gcc_asm_for_x64=yes
12683else
12684 have_gcc_asm_for_x64=no
12685fi
12686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12688$as_echo "$have_gcc_asm_for_x64" >&6; }
12689if test "$have_gcc_asm_for_x64" = yes
12690then
12691
12692$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12693
12694fi
12695
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012696# **************************************************
12697# * Check for various properties of floating point *
12698# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12701$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012702if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012704else
12705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012707 ac_cv_little_endian_double=no
12708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012710/* end confdefs.h. */
12711
12712#include <string.h>
12713int main() {
12714 double x = 9006104071832581.0;
12715 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12716 return 0;
12717 else
12718 return 1;
12719}
12720
12721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012723 ac_cv_little_endian_double=yes
12724else
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12728 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012729fi
12730
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012731fi
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12734$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012735if test "$ac_cv_little_endian_double" = yes
12736then
12737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012739
12740fi
12741
Matthias Kloseb9621712010-04-24 17:59:49 +000012742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12743$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012744if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012746else
12747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012749 ac_cv_big_endian_double=no
12750else
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012752/* end confdefs.h. */
12753
12754#include <string.h>
12755int main() {
12756 double x = 9006104071832581.0;
12757 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12758 return 0;
12759 else
12760 return 1;
12761}
12762
12763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012764if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012765 ac_cv_big_endian_double=yes
12766else
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012771fi
12772
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012773fi
12774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12776$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012777if test "$ac_cv_big_endian_double" = yes
12778then
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012781
12782fi
12783
12784# Some ARM platforms use a mixed-endian representation for doubles.
12785# While Python doesn't currently have full support for these platforms
12786# (see e.g., issue 1762561), we can at least make sure that float <-> string
12787# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12789$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012790if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012792else
12793
Matthias Kloseb9621712010-04-24 17:59:49 +000012794if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012795 ac_cv_mixed_endian_double=no
12796else
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798/* end confdefs.h. */
12799
12800#include <string.h>
12801int main() {
12802 double x = 9006104071832581.0;
12803 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12804 return 0;
12805 else
12806 return 1;
12807}
12808
12809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012810if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012811 ac_cv_mixed_endian_double=yes
12812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817fi
12818
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012819fi
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12822$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012823if test "$ac_cv_mixed_endian_double" = yes
12824then
12825
Matthias Kloseb9621712010-04-24 17:59:49 +000012826$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012827
12828fi
12829
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012830# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012831# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012832# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012833# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012834# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012835# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012836
12837# This inline assembler syntax may also work for suncc and icc,
12838# so we try it on all platforms.
12839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12841$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843/* end confdefs.h. */
12844
12845int
12846main ()
12847{
12848
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012849 unsigned short cw;
12850 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12851 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012852
12853 ;
12854 return 0;
12855}
12856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012857if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012858 have_gcc_asm_for_x87=yes
12859else
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012861fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12864$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012865if test "$have_gcc_asm_for_x87" = yes
12866then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012867
Matthias Kloseb9621712010-04-24 17:59:49 +000012868$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012869
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012870fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012872# Detect whether system arithmetic is subject to x87-style double
12873# rounding issues. The result of this test has little meaning on non
12874# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12875# mode is round-to-nearest and double rounding issues are present, and
12876# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12878$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012879# $BASECFLAGS may affect the result
12880ac_save_cc="$CC"
12881CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012883 ac_cv_x87_double_rounding=no
12884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012886/* end confdefs.h. */
12887
12888#include <stdlib.h>
12889#include <math.h>
12890int main() {
12891 volatile double x, y, z;
12892 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12893 x = 0.99999999999999989; /* 1-2**-53 */
12894 y = 1./x;
12895 if (y != 1.)
12896 exit(0);
12897 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12898 x = 1e16;
12899 y = 2.99999;
12900 z = x + y;
12901 if (z != 1e16+4.)
12902 exit(0);
12903 /* both tests show evidence of double rounding */
12904 exit(1);
12905}
12906
12907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012908if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012909 ac_cv_x87_double_rounding=no
12910else
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012915fi
12916
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012917CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12919$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012920if test "$ac_cv_x87_double_rounding" = yes
12921then
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012924
12925fi
12926
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012927# ************************************
12928# * Check for mathematical functions *
12929# ************************************
12930
12931LIBS_SAVE=$LIBS
12932LIBS="$LIBS $LIBM"
12933
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012934for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12935do :
12936 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12937ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012938if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012939 cat >>confdefs.h <<_ACEOF
12940#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12941_ACEOF
12942
12943fi
12944done
12945
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012946for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012947do :
12948 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12949ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012950if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012951 cat >>confdefs.h <<_ACEOF
12952#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12953_ACEOF
12954
12955fi
12956done
12957
12958ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12959"
Victor Stinnere0be4232011-10-25 13:06:09 +020012960if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012961 ac_have_decl=1
12962else
12963 ac_have_decl=0
12964fi
12965
12966cat >>confdefs.h <<_ACEOF
12967#define HAVE_DECL_ISINF $ac_have_decl
12968_ACEOF
12969ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12970"
Victor Stinnere0be4232011-10-25 13:06:09 +020012971if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012972 ac_have_decl=1
12973else
12974 ac_have_decl=0
12975fi
12976
12977cat >>confdefs.h <<_ACEOF
12978#define HAVE_DECL_ISNAN $ac_have_decl
12979_ACEOF
12980ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12981"
Victor Stinnere0be4232011-10-25 13:06:09 +020012982if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012983 ac_have_decl=1
12984else
12985 ac_have_decl=0
12986fi
12987
12988cat >>confdefs.h <<_ACEOF
12989#define HAVE_DECL_ISFINITE $ac_have_decl
12990_ACEOF
12991
12992
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012993# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12994# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12996$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012997if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012999else
13000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013002 ac_cv_tanh_preserves_zero_sign=no
13003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013005/* end confdefs.h. */
13006
13007#include <math.h>
13008#include <stdlib.h>
13009int main() {
13010 /* return 0 if either negative zeros don't exist
13011 on this platform or if negative zeros exist
13012 and tanh(-0.) == -0. */
13013 if (atan2(0., -1.) == atan2(-0., -1.) ||
13014 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13015 else exit(1);
13016}
13017
13018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013020 ac_cv_tanh_preserves_zero_sign=yes
13021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013026fi
13027
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013028fi
13029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13031$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013032if test "$ac_cv_tanh_preserves_zero_sign" = yes
13033then
13034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013036
13037fi
13038
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013039if test "$ac_cv_func_log1p" = yes
13040then
13041 # On some versions of AIX, log1p(-0.) returns 0. instead of
13042 # -0. See issue #9920.
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13044$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013045 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013046 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013047else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013048
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013049 if test "$cross_compiling" = yes; then :
13050 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013051else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13053/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013054
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013055 #include <math.h>
13056 #include <stdlib.h>
13057 int main() {
13058 /* Fail if the signs of log1p(-0.) and -0. can be
13059 distinguished. */
13060 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13061 return 0;
13062 else
13063 return 1;
13064 }
13065
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013066_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013067if ac_fn_c_try_run "$LINENO"; then :
13068 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013069else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013070 ac_cv_log1p_drops_zero_sign=yes
13071fi
13072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013074fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013075
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013076fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013077
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13079$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13080fi
13081if test "$ac_cv_log1p_drops_zero_sign" = yes
13082then
13083
13084$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13085
13086fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013087
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013088LIBS=$LIBS_SAVE
13089
Mark Dickinsona614f042009-11-28 12:48:43 +000013090# For multiprocessing module, check that sem_open
13091# actually works. For FreeBSD versions <= 7.2,
13092# the kernel module that provides POSIX semaphores
13093# isn't loaded by default, so an attempt to call
13094# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13096$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013097if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013101 ac_cv_posix_semaphores_enabled=yes
13102else
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013104/* end confdefs.h. */
13105
13106#include <unistd.h>
13107#include <fcntl.h>
13108#include <stdio.h>
13109#include <semaphore.h>
13110#include <sys/stat.h>
13111
13112int main(void) {
13113 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13114 if (a == SEM_FAILED) {
13115 perror("sem_open");
13116 return 1;
13117 }
13118 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013119 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013120 return 0;
13121}
13122
13123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013124if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013125 ac_cv_posix_semaphores_enabled=yes
13126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013131fi
13132
13133
Mark Dickinsona614f042009-11-28 12:48:43 +000013134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13137$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013138if test $ac_cv_posix_semaphores_enabled = no
13139then
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013142
13143fi
13144
Mark Dickinson10683072009-04-18 21:18:19 +000013145# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13147$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013148if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013152 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013153else
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013155/* end confdefs.h. */
13156
13157#include <unistd.h>
13158#include <fcntl.h>
13159#include <stdio.h>
13160#include <semaphore.h>
13161#include <sys/stat.h>
13162
13163int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013164 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013165 int count;
13166 int res;
13167 if(a==SEM_FAILED){
13168 perror("sem_open");
13169 return 1;
13170
13171 }
13172 res = sem_getvalue(a, &count);
13173 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013174 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013175 return res==-1 ? 1 : 0;
13176}
13177
Mark Dickinson10683072009-04-18 21:18:19 +000013178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013180 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13185 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013186fi
13187
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013188
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013189fi
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13192$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013193if test $ac_cv_broken_sem_getvalue = yes
13194then
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197
13198fi
13199
Mark Dickinsonbd792642009-03-18 20:06:12 +000013200# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13202$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013203# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013205 enableval=$enable_big_digits; case $enable_big_digits in
13206yes)
13207 enable_big_digits=30 ;;
13208no)
13209 enable_big_digits=15 ;;
1321015|30)
13211 ;;
13212*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013213 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 +000013214esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13216$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013217
13218cat >>confdefs.h <<_ACEOF
13219#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13220_ACEOF
13221
13222
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13225$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013226fi
13227
13228
Guido van Rossumef2255b2000-03-10 22:30:29 +000013229# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013230ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013231if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
13233
Matthias Kloseb9621712010-04-24 17:59:49 +000013234$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013235
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013236 wchar_h="yes"
13237
Guido van Rossumef2255b2000-03-10 22:30:29 +000013238else
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013240
13241fi
13242
Michael W. Hudson54241132001-12-07 15:38:26 +000013243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013245# determine wchar_t size
13246if test "$wchar_h" = yes
13247then
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13251# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13253$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013254if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013256else
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13258"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260else
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 if test "$ac_cv_type_wchar_t" = yes; then
13262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013264as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013265See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013266 else
13267 ac_cv_sizeof_wchar_t=0
13268 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13273$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274
13275
13276
Martin v. Löwis11437992002-04-12 09:54:03 +000013277cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013278#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013279_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013280
Michael W. Hudson54241132001-12-07 15:38:26 +000013281
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013282fi
13283
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13285$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013286have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013288/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013289
13290#include <tcl.h>
13291#if TCL_UTF_MAX != 6
13292# error "NOT UCS4_TCL"
13293#endif
13294int
13295main ()
13296{
13297
13298 ;
13299 return 0;
13300}
13301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013303
13304
Matthias Kloseb9621712010-04-24 17:59:49 +000013305$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013306
13307 have_ucs4_tcl=yes
13308
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13312$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013313
Skip Montanaro6dead952003-09-25 14:50:04 +000013314# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013315if test "$wchar_h" = yes
13316then
13317 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13319$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013320 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013322else
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013325 ac_cv_wchar_t_signed=yes
13326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013329
13330 #include <wchar.h>
13331 int main()
13332 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013333 /* Success: exit code 0 */
13334 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013335 }
13336
13337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013338if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013339 ac_cv_wchar_t_signed=yes
13340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13344 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013345fi
13346
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013347fi
13348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13350$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013351fi
13352
Georg Brandl52d168a2008-01-07 18:10:24 +000013353# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013354if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013355 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013356then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013357 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Georg Brandl52d168a2008-01-07 18:10:24 +000013361else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013362 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013363fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13365$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013366
13367# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13369$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013370if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 ac_cv_c_bigendian=unknown
13374 # See if we're dealing with a universal compiler.
13375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13376/* end confdefs.h. */
13377#ifndef __APPLE_CC__
13378 not a universal capable compiler
13379 #endif
13380 typedef int dummy;
13381
Skip Montanaro6dead952003-09-25 14:50:04 +000013382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013383if ac_fn_c_try_compile "$LINENO"; then :
13384
13385 # Check for potential -arch flags. It is not universal unless
13386 # there are at least two -arch flags with different values.
13387 ac_arch=
13388 ac_prev=
13389 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13390 if test -n "$ac_prev"; then
13391 case $ac_word in
13392 i?86 | x86_64 | ppc | ppc64)
13393 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13394 ac_arch=$ac_word
13395 else
13396 ac_cv_c_bigendian=universal
13397 break
13398 fi
13399 ;;
13400 esac
13401 ac_prev=
13402 elif test "x$ac_word" = "x-arch"; then
13403 ac_prev=arch
13404 fi
13405 done
13406fi
13407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13408 if test $ac_cv_c_bigendian = unknown; then
13409 # See if sys/param.h defines the BYTE_ORDER macro.
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013411/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013412#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013414
Martin v. Löwis11437992002-04-12 09:54:03 +000013415int
13416main ()
13417{
Matthias Kloseb9621712010-04-24 17:59:49 +000013418#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13419 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13420 && LITTLE_ENDIAN)
13421 bogus endian macros
13422 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013423
13424 ;
13425 return 0;
13426}
13427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013428if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013429 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013431/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013432#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435int
13436main ()
13437{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013438#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 not big endian
13440 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013441
13442 ;
13443 return 0;
13444}
13445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013446if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013447 ac_cv_c_bigendian=yes
13448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013452fi
13453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13454 fi
13455 if test $ac_cv_c_bigendian = unknown; then
13456 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013459#include <limits.h>
13460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Matthias Kloseb9621712010-04-24 17:59:49 +000013464#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13465 bogus endian macros
13466 #endif
13467
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 ;
13469 return 0;
13470}
13471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013472if ac_fn_c_try_compile "$LINENO"; then :
13473 # It does; now see whether it defined to _BIG_ENDIAN or not.
13474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13475/* end confdefs.h. */
13476#include <limits.h>
13477
13478int
13479main ()
13480{
13481#ifndef _BIG_ENDIAN
13482 not big endian
13483 #endif
13484
13485 ;
13486 return 0;
13487}
13488_ACEOF
13489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495fi
13496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13497 fi
13498 if test $ac_cv_c_bigendian = unknown; then
13499 # Compile a test program.
13500 if test "$cross_compiling" = yes; then :
13501 # Try to guess by grepping values from an object file.
13502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13503/* end confdefs.h. */
13504short int ascii_mm[] =
13505 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13506 short int ascii_ii[] =
13507 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13508 int use_ascii (int i) {
13509 return ascii_mm[i] + ascii_ii[i];
13510 }
13511 short int ebcdic_ii[] =
13512 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13513 short int ebcdic_mm[] =
13514 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13515 int use_ebcdic (int i) {
13516 return ebcdic_mm[i] + ebcdic_ii[i];
13517 }
13518 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520int
13521main ()
13522{
13523return use_ascii (foo) == use_ebcdic (foo);
13524 ;
13525 return 0;
13526}
13527_ACEOF
13528if ac_fn_c_try_compile "$LINENO"; then :
13529 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13530 ac_cv_c_bigendian=yes
13531 fi
13532 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13533 if test "$ac_cv_c_bigendian" = unknown; then
13534 ac_cv_c_bigendian=no
13535 else
13536 # finding both strings is unlikely to happen, but who knows?
13537 ac_cv_c_bigendian=unknown
13538 fi
13539 fi
13540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013544/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013546int
13547main ()
13548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 /* Are we little or big endian? From Harbison&Steele. */
13551 union
13552 {
13553 long int l;
13554 char c[sizeof (long int)];
13555 } u;
13556 u.l = 1;
13557 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558
13559 ;
13560 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013561}
Martin v. Löwis11437992002-04-12 09:54:03 +000013562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013563if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013564 ac_cv_c_bigendian=no
13565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013567fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13569 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013571
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013573fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13575$as_echo "$ac_cv_c_bigendian" >&6; }
13576 case $ac_cv_c_bigendian in #(
13577 yes)
13578 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13579;; #(
13580 no)
13581 ;; #(
13582 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 ;; #(
13587 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013588 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013589 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013591
Michael W. Hudson54241132001-12-07 15:38:26 +000013592
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013593# ABI version string for Python extension modules. This appears between the
13594# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13595# from the following attributes which affect the ABI of this Python build (in
13596# this order):
13597#
13598# * The Python implementation (always 'cpython-' for us)
13599# * The major and minor version numbers
13600# * --with-pydebug (adds a 'd')
13601# * --with-pymalloc (adds a 'm')
13602# * --with-wide-unicode (adds a 'u')
13603#
13604# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013605# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13606# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013607
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13609$as_echo_n "checking ABIFLAGS... " >&6; }
13610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13611$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13613$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013614SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13616$as_echo "$SOABI" >&6; }
13617
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13619$as_echo_n "checking LDVERSION... " >&6; }
13620LDVERSION='$(VERSION)$(ABIFLAGS)'
13621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13622$as_echo "$LDVERSION" >&6; }
13623
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013624# SO is the extension of shared libraries `(including the dot!)
13625# -- usually .so, .sl on HP-UX, .dll on Cygwin
13626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13627$as_echo_n "checking SO... " >&6; }
13628if test -z "$SO"
13629then
13630 case $ac_sys_system in
13631 hp*|HP*)
13632 case `uname -m` in
13633 ia64) SO=.so;;
13634 *) SO=.sl;;
13635 esac
13636 ;;
13637 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013638 Linux*|GNU*)
13639 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013640 *) SO=.so;;
13641 esac
13642else
13643 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013644 echo
13645 echo '====================================================================='
13646 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013647 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013648 echo '+ Do you really mean to change the extension for shared libraries? +'
13649 echo '+ Continuing in 10 seconds to let you to ponder. +'
13650 echo '+ +'
13651 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013652 sleep 10
13653fi
13654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13655$as_echo "$SO" >&6; }
13656
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013657# Check whether right shifting a negative integer extends the sign bit
13658# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13660$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013661if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013663else
Martin v. Löwis11437992002-04-12 09:54:03 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013666 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013667else
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013669/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013670
13671int main()
13672{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013673 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013674}
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013677if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013678 ac_cv_rshift_extends_sign=yes
13679else
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013684fi
13685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013686fi
13687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13689$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013690if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013691then
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013694
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013695fi
13696
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013697# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13699$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013700if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013702else
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
Matthias Kloseb9621712010-04-24 17:59:49 +000013704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013706#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013707int
13708main ()
13709{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013710
13711 FILE *f = fopen("/dev/null", "r");
13712 flockfile(f);
13713 getc_unlocked(f);
13714 funlockfile(f);
13715
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 ;
13717 return 0;
13718}
13719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013720if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013721 ac_cv_have_getc_unlocked=yes
13722else
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 ac_cv_have_getc_unlocked=no
13724fi
13725rm -f core conftest.err conftest.$ac_objext \
13726 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13730$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013731if test "$ac_cv_have_getc_unlocked" = yes
13732then
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013735
13736fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013737
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013738# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013739# save the value of LIBS so we don't actually link Python with readline
13740LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013741
Gregory P. Smith18820942008-09-07 06:24:49 +000013742# On some systems we need to link readline to a termcap compatible
13743# library. NOTE: Keep the precedence of listed libraries synchronised
13744# with setup.py.
13745py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13747$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013748for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013749 if test -z "$py_libtermcap"; then
13750 READLINE_LIBS="-lreadline"
13751 else
13752 READLINE_LIBS="-lreadline -l$py_libtermcap"
13753 fi
13754 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013756/* end confdefs.h. */
13757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758/* Override any GCC internal prototype to avoid an error.
13759 Use char because int might match the return type of a GCC
13760 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013761#ifdef __cplusplus
13762extern "C"
13763#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013764char readline ();
13765int
13766main ()
13767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013769 ;
13770 return 0;
13771}
13772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013774 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013776rm -f core conftest.err conftest.$ac_objext \
13777 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013778 if test $py_cv_lib_readline = yes; then
13779 break
13780 fi
13781done
13782# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13783#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013784if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13786$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13789$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013790
Matthias Kloseb9621712010-04-24 17:59:49 +000013791$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013792
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013793fi
13794
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13797$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013798if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013800else
13801 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013802LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013804/* end confdefs.h. */
13805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806/* Override any GCC internal prototype to avoid an error.
13807 Use char because int might match the return type of a GCC
13808 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013809#ifdef __cplusplus
13810extern "C"
13811#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013812char rl_callback_handler_install ();
13813int
13814main ()
13815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013817 ;
13818 return 0;
13819}
13820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013822 ac_cv_lib_readline_rl_callback_handler_install=yes
13823else
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013826rm -f core conftest.err conftest.$ac_objext \
13827 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013828LIBS=$ac_check_lib_save_LIBS
13829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13831$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013832if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013835
13836fi
13837
13838
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013839# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013841/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013842#include <readline/readline.h>
13843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013845 have_readline=yes
13846else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013847 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013848
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013849fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013850rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013851if test $have_readline = yes
13852then
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013854/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013855#include <readline/readline.h>
13856
13857_ACEOF
13858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013860
Matthias Kloseb9621712010-04-24 17:59:49 +000013861$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013862
13863fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013864rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013867/* end confdefs.h. */
13868#include <readline/readline.h>
13869
13870_ACEOF
13871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013872 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013873
Matthias Kloseb9621712010-04-24 17:59:49 +000013874$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013875
13876fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013877rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013878
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013879fi
13880
Martin v. Löwis0daad592001-09-30 21:09:59 +000013881# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13883$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013884if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013886else
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013888LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892/* Override any GCC internal prototype to avoid an error.
13893 Use char because int might match the return type of a GCC
13894 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013895#ifdef __cplusplus
13896extern "C"
13897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013898char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013899int
13900main ()
13901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ;
13904 return 0;
13905}
13906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013908 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013909else
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013912rm -f core conftest.err conftest.$ac_objext \
13913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013914LIBS=$ac_check_lib_save_LIBS
13915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13917$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013918if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013921
Martin v. Löwis0daad592001-09-30 21:09:59 +000013922fi
13923
Michael W. Hudson54241132001-12-07 15:38:26 +000013924
Thomas Wouters89d996e2007-09-08 17:39:28 +000013925# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13927$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013928if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013930else
13931 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013932LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013934/* end confdefs.h. */
13935
13936/* Override any GCC internal prototype to avoid an error.
13937 Use char because int might match the return type of a GCC
13938 builtin and then its argument prototype would still apply. */
13939#ifdef __cplusplus
13940extern "C"
13941#endif
13942char rl_completion_display_matches_hook ();
13943int
13944main ()
13945{
13946return rl_completion_display_matches_hook ();
13947 ;
13948 return 0;
13949}
13950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013952 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013956rm -f core conftest.err conftest.$ac_objext \
13957 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013958LIBS=$ac_check_lib_save_LIBS
13959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13961$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013962if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013965
13966fi
13967
13968
Martin v. Löwis0daad592001-09-30 21:09:59 +000013969# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13971$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013972if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013973 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013974else
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013976LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980/* Override any GCC internal prototype to avoid an error.
13981 Use char because int might match the return type of a GCC
13982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013983#ifdef __cplusplus
13984extern "C"
13985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013986char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013987int
13988main ()
13989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013990return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 ;
13992 return 0;
13993}
13994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013996 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013997else
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014000rm -f core conftest.err conftest.$ac_objext \
14001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014002LIBS=$ac_check_lib_save_LIBS
14003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14005$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014006if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014009
Guido van Rossum353ae582001-07-10 16:45:32 +000014010fi
14011
Jack Jansendd19cf82001-12-06 22:36:17 +000014012
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014013# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014015/* end confdefs.h. */
14016#include <readline/readline.h>
14017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014018if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014019 have_readline=yes
14020else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014021 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014022
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014023fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014024rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014025if test $have_readline = yes
14026then
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014028/* end confdefs.h. */
14029#include <readline/readline.h>
14030
14031_ACEOF
14032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014036
14037fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014038rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014039
14040fi
14041
Martin v. Löwis82bca632006-02-10 20:49:30 +000014042# End of readline checks: restore LIBS
14043LIBS=$LIBS_no_readline
14044
Matthias Kloseb9621712010-04-24 17:59:49 +000014045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14046$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014047if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014048 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014049else
Martin v. Löwis11437992002-04-12 09:54:03 +000014050
Matthias Kloseb9621712010-04-24 17:59:49 +000014051if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014052 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014053else
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014055/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014056
14057int main()
14058{
14059 int val1 = nice(1);
14060 if (val1 != -1 && val1 == nice(2))
14061 exit(0);
14062 exit(1);
14063}
14064
Martin v. Löwis11437992002-04-12 09:54:03 +000014065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014066if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014067 ac_cv_broken_nice=yes
14068else
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014073fi
14074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014075fi
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14078$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014079if test "$ac_cv_broken_nice" = yes
14080then
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014083
14084fi
14085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14087$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014090else
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014092 ac_cv_broken_poll=no
14093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014095/* end confdefs.h. */
14096
14097#include <poll.h>
14098
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014099int main()
14100{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014101 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014103
14104 close (42);
14105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014106 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014107 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014108 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014109 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014110 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014111 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014112 return 1;
14113}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014114
14115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014117 ac_cv_broken_poll=yes
14118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014125fi
14126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14128$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014129if test "$ac_cv_broken_poll" = yes
14130then
14131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014133
14134fi
14135
Brett Cannon43802422005-02-10 20:48:03 +000014136# 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 +000014137# (which is not required by ISO C or UNIX spec) and/or if we support
14138# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014139ac_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 +000014140#include <$ac_cv_struct_tm>
14141
Matthias Kloseb9621712010-04-24 17:59:49 +000014142"
Victor Stinnere0be4232011-10-25 13:06:09 +020014143if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014144
14145cat >>confdefs.h <<_ACEOF
14146#define HAVE_STRUCT_TM_TM_ZONE 1
14147_ACEOF
14148
14149
14150fi
14151
14152if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014155
14156else
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14158"
Victor Stinnere0be4232011-10-25 13:06:09 +020014159if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161else
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163fi
14164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014166#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014167_ACEOF
14168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14170$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014171if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014173else
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014175/* end confdefs.h. */
14176#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014177#if !HAVE_DECL_TZNAME
14178extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014179#endif
14180
14181int
14182main ()
14183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014185 ;
14186 return 0;
14187}
14188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014189if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014190 ac_cv_var_tzname=yes
14191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014194rm -f core conftest.err conftest.$ac_objext \
14195 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14198$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014199 if test $ac_cv_var_tzname = yes; then
14200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014202
14203 fi
14204fi
14205
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014206
Martin v. Löwis1d459062005-03-14 21:23:33 +000014207# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14209$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014210if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014212else
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014215 ac_cv_working_tzset=no
14216else
Matthias Kloseb9621712010-04-24 17:59:49 +000014217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014218/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014219
14220#include <stdlib.h>
14221#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014222#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014223
14224#if HAVE_TZNAME
14225extern char *tzname[];
14226#endif
14227
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014228int main()
14229{
Brett Cannon18367812003-09-19 00:59:16 +000014230 /* Note that we need to ensure that not only does tzset(3)
14231 do 'something' with localtime, but it works as documented
14232 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014233 This includes making sure that tzname is set properly if
14234 tm->tm_zone does not exist since it is the alternative way
14235 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014236
14237 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014238 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014239 */
14240
Martin v. Löwis1d459062005-03-14 21:23:33 +000014241 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014242 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14243
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014244 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014245 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014246 if (localtime(&groundhogday)->tm_hour != 0)
14247 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014248#if HAVE_TZNAME
14249 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14250 if (strcmp(tzname[0], "UTC") ||
14251 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14252 exit(1);
14253#endif
Brett Cannon18367812003-09-19 00:59:16 +000014254
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014255 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014256 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014257 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014258 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014259#if HAVE_TZNAME
14260 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14261 exit(1);
14262#endif
Brett Cannon18367812003-09-19 00:59:16 +000014263
14264 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14265 tzset();
14266 if (localtime(&groundhogday)->tm_hour != 11)
14267 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014268#if HAVE_TZNAME
14269 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14270 exit(1);
14271#endif
14272
14273#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014274 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14275 exit(1);
14276 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14277 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014278#endif
Brett Cannon18367812003-09-19 00:59:16 +000014279
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280 exit(0);
14281}
14282
14283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014285 ac_cv_working_tzset=yes
14286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014291fi
14292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293fi
14294
Matthias Kloseb9621712010-04-24 17:59:49 +000014295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14296$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014297if test "$ac_cv_working_tzset" = yes
14298then
14299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014301
14302fi
14303
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014304# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14306$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014307if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014309else
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014311/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014312#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014313int
14314main ()
14315{
14316
14317struct stat st;
14318st.st_mtim.tv_nsec = 1;
14319
14320 ;
14321 return 0;
14322}
14323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014325 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014326else
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14330fi
14331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14333$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014334if test "$ac_cv_stat_tv_nsec" = yes
14335then
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014338
14339fi
14340
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014341# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14343$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014344if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014348/* end confdefs.h. */
14349#include <sys/stat.h>
14350int
14351main ()
14352{
14353
14354struct stat st;
14355st.st_mtimespec.tv_nsec = 1;
14356
14357 ;
14358 return 0;
14359}
14360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014362 ac_cv_stat_tv_nsec2=yes
14363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14367fi
14368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14370$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014371if test "$ac_cv_stat_tv_nsec2" = yes
14372then
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014375
14376fi
14377
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014378ac_save_cppflags="$CPPFLAGS"
14379CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014380# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14382$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014383if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014387/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014388#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014389int
14390main ()
14391{
Jack Jansen666b1e72001-10-31 12:11:48 +000014392
14393 int rtn;
14394 rtn = mvwdelch(0,0,0);
14395
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 ;
14397 return 0;
14398}
14399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014401 ac_cv_mvwdelch_is_expression=yes
14402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14409$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014410
14411if test "$ac_cv_mvwdelch_is_expression" = yes
14412then
Martin v. Löwis11437992002-04-12 09:54:03 +000014413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014415
14416fi
14417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14419$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014420if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014424/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014425#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014426int
14427main ()
14428{
Jack Jansen666b1e72001-10-31 12:11:48 +000014429
14430 WINDOW *w;
14431 w->_flags = 0;
14432
Martin v. Löwis11437992002-04-12 09:54:03 +000014433 ;
14434 return 0;
14435}
14436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014438 ac_cv_window_has_flags=yes
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14443fi
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14446$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014447
Jack Jansen666b1e72001-10-31 12:11:48 +000014448
14449if test "$ac_cv_window_has_flags" = yes
14450then
Martin v. Löwis11437992002-04-12 09:54:03 +000014451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014453
14454fi
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14457$as_echo_n "checking for is_term_resized... " >&6; }
14458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014459/* end confdefs.h. */
14460#include <curses.h>
14461int
14462main ()
14463{
14464void *x=is_term_resized
14465 ;
14466 return 0;
14467}
14468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014470
Matthias Kloseb9621712010-04-24 17:59:49 +000014471$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014472
Matthias Kloseb159a552010-04-25 21:00:44 +000014473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014474$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014475else
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14477$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014478
14479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14483$as_echo_n "checking for resize_term... " >&6; }
14484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014485/* end confdefs.h. */
14486#include <curses.h>
14487int
14488main ()
14489{
14490void *x=resize_term
14491 ;
14492 return 0;
14493}
14494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014495if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014498
Matthias Kloseb159a552010-04-25 21:00:44 +000014499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014500$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014501else
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14503$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014504
14505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14509$as_echo_n "checking for resizeterm... " >&6; }
14510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014511/* end confdefs.h. */
14512#include <curses.h>
14513int
14514main ()
14515{
14516void *x=resizeterm
14517 ;
14518 return 0;
14519}
14520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014521if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014524
Matthias Kloseb159a552010-04-25 21:00:44 +000014525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014526$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014527else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14529$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014530
14531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014533# last curses configure check
14534CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14537$as_echo "$as_me: checking for device files" >&6;}
14538
14539if test "x$cross_compiling" = xyes; then
14540 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14542$as_echo_n "checking for /dev/ptmx... " >&6; }
14543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14544$as_echo "not set" >&6; }
14545 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14546 fi
14547 if test "${ac_cv_file__dev_ptc+set}" != set; then
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14549$as_echo_n "checking for /dev/ptc... " >&6; }
14550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14551$as_echo "not set" >&6; }
14552 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14553 fi
14554fi
14555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14557$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014558if ${ac_cv_file__dev_ptmx+:} false; then :
14559 $as_echo_n "(cached) " >&6
14560else
14561 test "$cross_compiling" = yes &&
14562 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14563if test -r "/dev/ptmx"; then
14564 ac_cv_file__dev_ptmx=yes
14565else
14566 ac_cv_file__dev_ptmx=no
14567fi
14568fi
14569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14570$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14571if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014572
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014573fi
14574
14575if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014578
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14581$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014582if ${ac_cv_file__dev_ptc+:} false; then :
14583 $as_echo_n "(cached) " >&6
14584else
14585 test "$cross_compiling" = yes &&
14586 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14587if test -r "/dev/ptc"; then
14588 ac_cv_file__dev_ptc=yes
14589else
14590 ac_cv_file__dev_ptc=no
14591fi
14592fi
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14594$as_echo "$ac_cv_file__dev_ptc" >&6; }
14595if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014596
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014597fi
14598
14599if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014602
Neal Norwitz865400f2003-03-21 01:42:58 +000014603fi
14604
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014605if test "$have_long_long" = yes
14606then
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14608$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014609 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014611else
Matthias Kloseb9621712010-04-24 17:59:49 +000014612 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014613 ac_cv_have_long_long_format="cross -- assuming no"
14614 if test x$GCC = xyes; then
14615 save_CFLAGS=$CFLAGS
14616 CFLAGS="$CFLAGS -Werror -Wformat"
14617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14618/* end confdefs.h. */
14619
14620 #include <stdio.h>
14621 #include <stddef.h>
14622
14623int
14624main ()
14625{
14626
14627 char *buffer;
14628 sprintf(buffer, "%lld", (long long)123);
14629 sprintf(buffer, "%lld", (long long)-123);
14630 sprintf(buffer, "%llu", (unsigned long long)123);
14631
14632 ;
14633 return 0;
14634}
14635_ACEOF
14636if ac_fn_c_try_compile "$LINENO"; then :
14637 ac_cv_have_long_long_format=yes
14638
14639fi
14640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14641 CFLAGS=$save_CFLAGS
14642 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014645/* end confdefs.h. */
14646
14647 #include <stdio.h>
14648 #include <stddef.h>
14649 #include <string.h>
14650
14651 #ifdef HAVE_SYS_TYPES_H
14652 #include <sys/types.h>
14653 #endif
14654
14655 int main()
14656 {
14657 char buffer[256];
14658
14659 if (sprintf(buffer, "%lld", (long long)123) < 0)
14660 return 1;
14661 if (strcmp(buffer, "123"))
14662 return 1;
14663
14664 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14665 return 1;
14666 if (strcmp(buffer, "-123"))
14667 return 1;
14668
14669 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14670 return 1;
14671 if (strcmp(buffer, "123"))
14672 return 1;
14673
14674 return 0;
14675 }
14676
14677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014678if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014679 ac_cv_have_long_long_format=yes
14680else
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14684 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014685fi
14686
14687
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014688fi
14689
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14691$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014692fi
14693
Mark Dickinson89d7d412009-12-31 20:50:59 +000014694if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014695then
14696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014698
14699fi
14700
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014701if test $ac_sys_system = Darwin
14702then
14703 LIBS="$LIBS -framework CoreFoundation"
14704fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014705
Matthias Kloseb9621712010-04-24 17:59:49 +000014706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14707$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014708if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014710else
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014712 ac_cv_have_size_t_format="cross -- assuming yes"
14713
Thomas Wouters477c8d52006-05-27 19:21:47 +000014714else
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014716/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014717
Thomas Wouters477c8d52006-05-27 19:21:47 +000014718#include <stdio.h>
14719#include <stddef.h>
14720#include <string.h>
14721
Christian Heimes2c181612007-12-17 20:04:13 +000014722#ifdef HAVE_SYS_TYPES_H
14723#include <sys/types.h>
14724#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014725
14726#ifdef HAVE_SSIZE_T
14727typedef ssize_t Py_ssize_t;
14728#elif SIZEOF_VOID_P == SIZEOF_LONG
14729typedef long Py_ssize_t;
14730#else
14731typedef int Py_ssize_t;
14732#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014733
Christian Heimes2c181612007-12-17 20:04:13 +000014734int main()
14735{
14736 char buffer[256];
14737
Thomas Wouters477c8d52006-05-27 19:21:47 +000014738 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14739 return 1;
14740
Thomas Wouters89f507f2006-12-13 04:49:30 +000014741 if (strcmp(buffer, "123"))
14742 return 1;
14743
14744 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14745 return 1;
14746
14747 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014748 return 1;
14749
14750 return 0;
14751}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014752
Thomas Wouters477c8d52006-05-27 19:21:47 +000014753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014755 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014756else
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014761fi
14762
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14765$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014766if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014769
14770fi
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014773#ifdef HAVE_SYS_TYPES_H
14774#include <sys/types.h>
14775#endif
14776#ifdef HAVE_SYS_SOCKET_H
14777#include <sys/socket.h>
14778#endif
14779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780"
Victor Stinnere0be4232011-10-25 13:06:09 +020014781if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014782
Martin v. Löwis11437992002-04-12 09:54:03 +000014783else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014786
14787fi
14788
Michael W. Hudson54241132001-12-07 15:38:26 +000014789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14791$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014792if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014794else
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014796 ac_cv_broken_mbstowcs=no
14797else
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014799/* end confdefs.h. */
14800
14801#include<stdlib.h>
14802int main() {
14803 size_t len = -1;
14804 const char *str = "text";
14805 len = mbstowcs(NULL, str, 0);
14806 return (len != 4);
14807}
14808
14809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014811 ac_cv_broken_mbstowcs=no
14812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014817fi
14818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014819fi
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14822$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014823if test "$ac_cv_broken_mbstowcs" = yes
14824then
14825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014827
14828fi
14829
Antoine Pitroub52ec782009-01-25 16:34:23 +000014830# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14832$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014833
14834# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014836 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014837if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014838then
14839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14843$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014844fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014845if test "$withval" = no
14846then
14847
14848$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14851$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014852fi
14853
Antoine Pitrou042b1282010-08-13 21:15:58 +000014854else
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14856$as_echo "no value specified" >&6; }
14857fi
14858
Antoine Pitroub52ec782009-01-25 16:34:23 +000014859
Matthias Kloseb17289e2012-03-15 19:51:34 +010014860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14861$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14862if ${ac_cv_computed_gotos+:} false; then :
14863 $as_echo_n "(cached) " >&6
14864else
14865 if test "$cross_compiling" = yes; then :
14866 if test "${with_computed_gotos+set}" = set; then
14867 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14868 else
14869 ac_cv_computed_gotos=no
14870 fi
14871else
14872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873/* end confdefs.h. */
14874
14875int main(int argc, char **argv)
14876{
14877 static void *targets[1] = { &&LABEL1 };
14878 goto LABEL2;
14879LABEL1:
14880 return 0;
14881LABEL2:
14882 goto *targets[0];
14883 return 1;
14884}
14885
14886_ACEOF
14887if ac_fn_c_try_run "$LINENO"; then :
14888 ac_cv_computed_gotos=yes
14889else
14890 ac_cv_computed_gotos=no
14891fi
14892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14893 conftest.$ac_objext conftest.beam conftest.$ac_ext
14894fi
14895
14896fi
14897
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14899$as_echo "$ac_cv_computed_gotos" >&6; }
14900case "$ac_cv_computed_gotos" in yes*)
14901
14902$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14903
14904esac
14905
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014906case $ac_sys_system in
14907AIX*)
14908
14909$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14910 ;;
14911esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014912
Michael W. Hudson54241132001-12-07 15:38:26 +000014913
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014914
14915
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014916for h in `(cd $srcdir;echo Python/thread_*.h)`
14917do
14918 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14919done
14920
Michael W. Hudson54241132001-12-07 15:38:26 +000014921
Neal Norwitzd24499d2005-12-18 21:36:39 +000014922SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14924$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014925for dir in $SRCDIRS; do
14926 if test ! -d $dir; then
14927 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014928 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014929done
Matthias Kloseb9621712010-04-24 17:59:49 +000014930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14931$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014932
Stefan Krah1919b7e2012-03-21 18:25:23 +010014933# Availability of -O2:
14934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14935$as_echo_n "checking for -O2... " >&6; }
14936saved_cflags="$CFLAGS"
14937CFLAGS="-O2"
14938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14939/* end confdefs.h. */
14940
14941int
14942main ()
14943{
14944
14945
14946 ;
14947 return 0;
14948}
14949_ACEOF
14950if ac_fn_c_try_compile "$LINENO"; then :
14951 have_O2=yes
14952else
14953 have_O2=no
14954fi
14955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14957$as_echo "$have_O2" >&6; }
14958CFLAGS="$saved_cflags"
14959
14960# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14961# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14963$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14964saved_cflags="$CFLAGS"
14965CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14966if test "$have_O2" = no; then
14967 CFLAGS=""
14968fi
14969if test "$cross_compiling" = yes; then :
14970 have_glibc_memmove_bug=undefined
14971else
14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14973/* end confdefs.h. */
14974
14975#include <stdio.h>
14976#include <stdlib.h>
14977#include <string.h>
14978void foo(void *p, void *q) { memmove(p, q, 19); }
14979int main() {
14980 char a[32] = "123456789000000000";
14981 foo(&a[9], a);
14982 if (strcmp(a, "123456789123456789000000000") != 0)
14983 return 1;
14984 foo(a, &a[9]);
14985 if (strcmp(a, "123456789000000000") != 0)
14986 return 1;
14987 return 0;
14988}
14989
14990_ACEOF
14991if ac_fn_c_try_run "$LINENO"; then :
14992 have_glibc_memmove_bug=no
14993else
14994 have_glibc_memmove_bug=yes
14995fi
14996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14997 conftest.$ac_objext conftest.beam conftest.$ac_ext
14998fi
14999
15000CFLAGS="$saved_cflags"
15001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15002$as_echo "$have_glibc_memmove_bug" >&6; }
15003if test "$have_glibc_memmove_bug" = yes; then
15004
15005$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15006
15007fi
15008
15009if test "$have_gcc_asm_for_x87" = yes; then
15010 # Some versions of gcc miscompile inline asm:
15011 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15012 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15013 case $CC in
15014 *gcc*)
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15016$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15017 saved_cflags="$CFLAGS"
15018 CFLAGS="-O2"
15019 if test "$cross_compiling" = yes; then :
15020 have_ipa_pure_const_bug=undefined
15021else
15022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15023/* end confdefs.h. */
15024
15025 __attribute__((noinline)) int
15026 foo(int *p) {
15027 int r;
15028 asm ( "movl \$6, (%1)\n\t"
15029 "xorl %0, %0\n\t"
15030 : "=r" (r) : "r" (p) : "memory"
15031 );
15032 return r;
15033 }
15034 int main() {
15035 int p = 8;
15036 if ((foo(&p) ? : p) != 6)
15037 return 1;
15038 return 0;
15039 }
15040
15041_ACEOF
15042if ac_fn_c_try_run "$LINENO"; then :
15043 have_ipa_pure_const_bug=no
15044else
15045 have_ipa_pure_const_bug=yes
15046fi
15047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15048 conftest.$ac_objext conftest.beam conftest.$ac_ext
15049fi
15050
15051 CFLAGS="$saved_cflags"
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15053$as_echo "$have_ipa_pure_const_bug" >&6; }
15054 if test "$have_ipa_pure_const_bug" = yes; then
15055
15056$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15057
15058 fi
15059 ;;
15060 esac
15061fi
15062
Guido van Rossum627b2d71993-12-24 10:39:16 +000015063# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015064ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015065
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015066ac_config_files="$ac_config_files Modules/ld_so_aix"
15067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015069# This file is a shell script that caches the results of configure
15070# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015071# scripts and configure runs, see configure's option --config-cache.
15072# It is not useful on other systems. If it contains results you don't
15073# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074#
Martin v. Löwis11437992002-04-12 09:54:03 +000015075# config.status only pays attention to the cache file if you give it
15076# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015077#
Skip Montanaro6dead952003-09-25 14:50:04 +000015078# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015079# loading this file, other *unset* `ac_cv_foo' will be assigned the
15080# following values.
15081
15082_ACEOF
15083
Guido van Rossumf78abae1997-01-21 22:02:36 +000015084# The following way of writing the cache mishandles newlines in values,
15085# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015087# Ultrix sh set writes to stderr and can't be redirected directly,
15088# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015089(
15090 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15091 eval ac_val=\$$ac_var
15092 case $ac_val in #(
15093 *${as_nl}*)
15094 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15096$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097 esac
15098 case $ac_var in #(
15099 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15101 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015102 esac ;;
15103 esac
15104 done
15105
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15108 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 # `set' does not quote correctly, so add quotes: double-quote
15110 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015112 "s/'/'\\\\''/g;
15113 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 *)
15116 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 esac |
15120 sort
15121) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015126 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15127 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15129 :end' >>confcache
15130if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15131 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015132 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15134$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015135 if test ! -f "$cache_file" || test -h "$cache_file"; then
15136 cat confcache >"$cache_file"
15137 else
15138 case $cache_file in #(
15139 */* | ?:*)
15140 mv -f confcache "$cache_file"$$ &&
15141 mv -f "$cache_file"$$ "$cache_file" ;; #(
15142 *)
15143 mv -f confcache "$cache_file" ;;
15144 esac
15145 fi
15146 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015147 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015148 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15149$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015150 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015152rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015153
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154test "x$prefix" = xNONE && prefix=$ac_default_prefix
15155# Let make expand exec_prefix.
15156test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015157
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015158DEFS=-DHAVE_CONFIG_H
15159
Skip Montanaro6dead952003-09-25 14:50:04 +000015160ac_libobjs=
15161ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015162U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015163for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15164 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15168 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15170 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015171done
15172LIBOBJS=$ac_libobjs
15173
15174LTLIBOBJS=$ac_ltlibobjs
15175
15176
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178
Victor Stinnere0be4232011-10-25 13:06:09 +020015179: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015180ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015181ac_clean_files_save=$ac_clean_files
15182ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015183{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15184$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15185as_write_fail=0
15186cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015187#! $SHELL
15188# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015189# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015190# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015191# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015194ac_cs_recheck=false
15195ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015196
Matthias Kloseb9621712010-04-24 17:59:49 +000015197SHELL=\${CONFIG_SHELL-$SHELL}
15198export SHELL
15199_ASEOF
15200cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15201## -------------------- ##
15202## M4sh Initialization. ##
15203## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205# Be more Bourne compatible
15206DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015207if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 emulate sh
15209 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015211 # is contrary to our usage. Disable this feature.
15212 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015214else
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 case `(set -o) 2>/dev/null` in #(
15216 *posix*) :
15217 set -o posix ;; #(
15218 *) :
15219 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015221fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015222
15223
Matthias Kloseb9621712010-04-24 17:59:49 +000015224as_nl='
15225'
15226export as_nl
15227# Printing a long string crashes Solaris 7 /usr/bin/printf.
15228as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15229as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15230as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15231# Prefer a ksh shell builtin over an external printf program on Solaris,
15232# but without wasting forks for bash or zsh.
15233if test -z "$BASH_VERSION$ZSH_VERSION" \
15234 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15235 as_echo='print -r --'
15236 as_echo_n='print -rn --'
15237elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15238 as_echo='printf %s\n'
15239 as_echo_n='printf %s'
15240else
15241 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15242 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15243 as_echo_n='/usr/ucb/echo -n'
15244 else
15245 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15246 as_echo_n_body='eval
15247 arg=$1;
15248 case $arg in #(
15249 *"$as_nl"*)
15250 expr "X$arg" : "X\\(.*\\)$as_nl";
15251 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15252 esac;
15253 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15254 '
15255 export as_echo_n_body
15256 as_echo_n='sh -c $as_echo_n_body as_echo'
15257 fi
15258 export as_echo_body
15259 as_echo='sh -c $as_echo_body as_echo'
15260fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
15262# The user is always right.
15263if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 PATH_SEPARATOR=:
15265 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15266 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15267 PATH_SEPARATOR=';'
15268 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271
15272# IFS
15273# We need space, tab and new line, in precisely that order. Quoting is
15274# there to prevent editors from complaining about space-tab.
15275# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15276# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277IFS=" "" $as_nl"
15278
15279# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015280as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015281case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282 *[\\/]* ) as_myself=$0 ;;
15283 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015284for as_dir in $PATH
15285do
15286 IFS=$as_save_IFS
15287 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15289 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 ;;
15293esac
15294# We did not find ourselves, most probably we were run as `sh COMMAND'
15295# in which case we are not to be found in the path.
15296if test "x$as_myself" = x; then
15297 as_myself=$0
15298fi
15299if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15301 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302fi
15303
Matthias Kloseb9621712010-04-24 17:59:49 +000015304# Unset variables that we do not need and which cause bugs (e.g. in
15305# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15306# suppresses any "Segmentation fault" message there. '((' could
15307# trigger a bug in pdksh 5.2.14.
15308for as_var in BASH_ENV ENV MAIL MAILPATH
15309do eval test x\${$as_var+set} = xset \
15310 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015311done
15312PS1='$ '
15313PS2='> '
15314PS4='+ '
15315
15316# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015317LC_ALL=C
15318export LC_ALL
15319LANGUAGE=C
15320export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322# CDPATH.
15323(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15324
15325
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015326# as_fn_error STATUS ERROR [LINENO LOG_FD]
15327# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015328# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15329# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015330# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015331as_fn_error ()
15332{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015333 as_status=$1; test $as_status -eq 0 && as_status=1
15334 if test "$4"; then
15335 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15336 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015338 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 as_fn_exit $as_status
15340} # as_fn_error
15341
15342
15343# as_fn_set_status STATUS
15344# -----------------------
15345# Set $? to STATUS, without forking.
15346as_fn_set_status ()
15347{
15348 return $1
15349} # as_fn_set_status
15350
15351# as_fn_exit STATUS
15352# -----------------
15353# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15354as_fn_exit ()
15355{
15356 set +e
15357 as_fn_set_status $1
15358 exit $1
15359} # as_fn_exit
15360
15361# as_fn_unset VAR
15362# ---------------
15363# Portably unset VAR.
15364as_fn_unset ()
15365{
15366 { eval $1=; unset $1;}
15367}
15368as_unset=as_fn_unset
15369# as_fn_append VAR VALUE
15370# ----------------------
15371# Append the text in VALUE to the end of the definition contained in VAR. Take
15372# advantage of any shell optimizations that allow amortized linear growth over
15373# repeated appends, instead of the typical quadratic growth present in naive
15374# implementations.
15375if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15376 eval 'as_fn_append ()
15377 {
15378 eval $1+=\$2
15379 }'
15380else
15381 as_fn_append ()
15382 {
15383 eval $1=\$$1\$2
15384 }
15385fi # as_fn_append
15386
15387# as_fn_arith ARG...
15388# ------------------
15389# Perform arithmetic evaluation on the ARGs, and store the result in the
15390# global $as_val. Take advantage of shells that can avoid forks. The arguments
15391# must be portable across $(()) and expr.
15392if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15393 eval 'as_fn_arith ()
15394 {
15395 as_val=$(( $* ))
15396 }'
15397else
15398 as_fn_arith ()
15399 {
15400 as_val=`expr "$@" || test $? -eq 1`
15401 }
15402fi # as_fn_arith
15403
15404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015405if expr a : '\(a\)' >/dev/null 2>&1 &&
15406 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15407 as_expr=expr
15408else
15409 as_expr=false
15410fi
15411
15412if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15413 as_basename=basename
15414else
15415 as_basename=false
15416fi
15417
Matthias Kloseb9621712010-04-24 17:59:49 +000015418if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15419 as_dirname=dirname
15420else
15421 as_dirname=false
15422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424as_me=`$as_basename -- "$0" ||
15425$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15426 X"$0" : 'X\(//\)$' \| \
15427 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015428$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429 sed '/^.*\/\([^/][^/]*\)\/*$/{
15430 s//\1/
15431 q
15432 }
15433 /^X\/\(\/\/\)$/{
15434 s//\1/
15435 q
15436 }
15437 /^X\/\(\/\).*/{
15438 s//\1/
15439 q
15440 }
15441 s/.*/./; q'`
15442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443# Avoid depending upon Character Ranges.
15444as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15445as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15446as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15447as_cr_digits='0123456789'
15448as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449
15450ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015451case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015454 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 xy) ECHO_C='\c';;
15456 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15457 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458 esac;;
15459*)
15460 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015461esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015462
Martin v. Löwis11437992002-04-12 09:54:03 +000015463rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464if test -d conf$$.dir; then
15465 rm -f conf$$.dir/conf$$.file
15466else
15467 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015470if (echo >conf$$.file) 2>/dev/null; then
15471 if ln -s conf$$.file conf$$ 2>/dev/null; then
15472 as_ln_s='ln -s'
15473 # ... but there are two gotchas:
15474 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15475 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015476 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015478 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015479 elif ln conf$$.file conf$$ 2>/dev/null; then
15480 as_ln_s=ln
15481 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015482 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015484else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015485 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15488rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490
15491# as_fn_mkdir_p
15492# -------------
15493# Create "$as_dir" as a directory, including parents if necessary.
15494as_fn_mkdir_p ()
15495{
15496
15497 case $as_dir in #(
15498 -*) as_dir=./$as_dir;;
15499 esac
15500 test -d "$as_dir" || eval $as_mkdir_p || {
15501 as_dirs=
15502 while :; do
15503 case $as_dir in #(
15504 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15505 *) as_qdir=$as_dir;;
15506 esac
15507 as_dirs="'$as_qdir' $as_dirs"
15508 as_dir=`$as_dirname -- "$as_dir" ||
15509$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15510 X"$as_dir" : 'X\(//\)[^/]' \| \
15511 X"$as_dir" : 'X\(//\)$' \| \
15512 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15513$as_echo X"$as_dir" |
15514 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15515 s//\1/
15516 q
15517 }
15518 /^X\(\/\/\)[^/].*/{
15519 s//\1/
15520 q
15521 }
15522 /^X\(\/\/\)$/{
15523 s//\1/
15524 q
15525 }
15526 /^X\(\/\).*/{
15527 s//\1/
15528 q
15529 }
15530 s/.*/./; q'`
15531 test -d "$as_dir" && break
15532 done
15533 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015534 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015535
15536
15537} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015538if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015540else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015541 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015542 as_mkdir_p=false
15543fi
15544
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015545if test -x / >/dev/null 2>&1; then
15546 as_test_x='test -x'
15547else
15548 if ls -dL / >/dev/null 2>&1; then
15549 as_ls_L_option=L
15550 else
15551 as_ls_L_option=
15552 fi
15553 as_test_x='
15554 eval sh -c '\''
15555 if test -d "$1"; then
15556 test -d "$1/.";
15557 else
15558 case $1 in #(
15559 -*)set "./$1";;
15560 esac;
15561 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15562 ???[sx]*):;;*)false;;esac;fi
15563 '\'' sh
15564 '
15565fi
15566as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015567
15568# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015569as_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 +000015570
15571# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015572as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015573
15574
Martin v. Löwis11437992002-04-12 09:54:03 +000015575exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015576## ----------------------------------- ##
15577## Main body of $CONFIG_STATUS script. ##
15578## ----------------------------------- ##
15579_ASEOF
15580test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015581
Matthias Kloseb9621712010-04-24 17:59:49 +000015582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15583# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015584# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585# values after options handling.
15586ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015587This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015588generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015589
15590 CONFIG_FILES = $CONFIG_FILES
15591 CONFIG_HEADERS = $CONFIG_HEADERS
15592 CONFIG_LINKS = $CONFIG_LINKS
15593 CONFIG_COMMANDS = $CONFIG_COMMANDS
15594 $ $0 $@
15595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596on `(hostname || uname -n) 2>/dev/null | sed 1q`
15597"
15598
Martin v. Löwis11437992002-04-12 09:54:03 +000015599_ACEOF
15600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601case $ac_config_files in *"
15602"*) set x $ac_config_files; shift; ac_config_files=$*;;
15603esac
15604
15605case $ac_config_headers in *"
15606"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15607esac
15608
15609
15610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015611# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015612config_files="$ac_config_files"
15613config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015615_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
Matthias Kloseb9621712010-04-24 17:59:49 +000015617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015618ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015619\`$as_me' instantiates files and other configuration actions
15620from templates according to the current configuration. Unless the files
15621and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015622
Matthias Kloseb9621712010-04-24 17:59:49 +000015623Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015624
15625 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 --config print configuration, then exit
15628 -q, --quiet, --silent
15629 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015630 -d, --debug don't remove temporary files
15631 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015632 --file=FILE[:TEMPLATE]
15633 instantiate the configuration file FILE
15634 --header=FILE[:TEMPLATE]
15635 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015636
15637Configuration files:
15638$config_files
15639
15640Configuration headers:
15641$config_headers
15642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015646cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15647ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015648ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015649python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015650configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015653Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015654This config.status script is free software; the Free Software Foundation
15655gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015656
15657ac_pwd='$ac_pwd'
15658srcdir='$srcdir'
15659INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015660MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015661test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015662_ACEOF
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15665# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015666ac_need_defaults=:
15667while test $# != 0
15668do
15669 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015670 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15672 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015673 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015675 --*=)
15676 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15677 ac_optarg=
15678 ac_shift=:
15679 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015681 ac_option=$1
15682 ac_optarg=$2
15683 ac_shift=shift
15684 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 esac
15686
Skip Montanaro6dead952003-09-25 14:50:04 +000015687 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015689 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15690 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 $as_echo "$ac_cs_version"; exit ;;
15693 --config | --confi | --conf | --con | --co | --c )
15694 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 debug=: ;;
15697 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015698 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 case $ac_optarg in
15700 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015701 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015702 esac
15703 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ac_need_defaults=false;;
15705 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015706 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 case $ac_optarg in
15708 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15709 esac
15710 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712 --he | --h)
15713 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015714 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015715Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015718 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15719 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15720 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
15722 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015723 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015724Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015725
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015728
15729 esac
15730 shift
15731done
15732
Skip Montanaro6dead952003-09-25 14:50:04 +000015733ac_configure_extra_args=
15734
15735if $ac_cs_silent; then
15736 exec 6>/dev/null
15737 ac_configure_extra_args="$ac_configure_extra_args --silent"
15738fi
15739
15740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015741cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015742if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015743 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 shift
15745 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15746 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015749fi
15750
Martin v. Löwis11437992002-04-12 09:54:03 +000015751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015752cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753exec 5>>config.log
15754{
15755 echo
15756 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15757## Running $as_me. ##
15758_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015763cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015767
15768# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015769for ac_config_target in $ac_config_targets
15770do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771 case $ac_config_target in
15772 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15773 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15774 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015775 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15776 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15778 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015779 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015780 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781
Victor Stinnere0be4232011-10-25 13:06:09 +020015782 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 esac
15784done
15785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786
Martin v. Löwis11437992002-04-12 09:54:03 +000015787# If the user did not use the arguments to specify the items to instantiate,
15788# then the envvar interface is used. Set only those that are not.
15789# We use the long form for the default assignment because of an extremely
15790# bizarre bug on SunOS 4.1.3.
15791if $ac_need_defaults; then
15792 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15793 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15794fi
15795
Skip Montanaro6dead952003-09-25 14:50:04 +000015796# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015798# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799# Hook for its removal unless debugging.
15800# Note that there is a small window in which the directory will not be cleaned:
15801# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015802$debug ||
15803{
Victor Stinnere0be4232011-10-25 13:06:09 +020015804 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015806 : "${ac_tmp:=$tmp}"
15807 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015808' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015810}
Martin v. Löwis11437992002-04-12 09:54:03 +000015811# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015812
Martin v. Löwis11437992002-04-12 09:54:03 +000015813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015815 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015816} ||
15817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818 tmp=./conf$$-$RANDOM
15819 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015820} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015821ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823# Set up the scripts for CONFIG_FILES section.
15824# No need to generate them if there are no CONFIG_FILES.
15825# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828
15829ac_cr=`echo X | tr X '\015'`
15830# On cygwin, bash can eat \r inside `` if the user requested igncr.
15831# But we know of no other shell where ac_cr would be empty at this
15832# point, so we can use a bashism as a fallback.
15833if test "x$ac_cr" = x; then
15834 eval ac_cr=\$\'\\r\'
15835fi
15836ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15837if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015838 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015839else
15840 ac_cs_awk_cr=$ac_cr
15841fi
15842
Victor Stinnere0be4232011-10-25 13:06:09 +020015843echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015844_ACEOF
15845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846
Matthias Kloseb9621712010-04-24 17:59:49 +000015847{
15848 echo "cat >conf$$subs.awk <<_ACEOF" &&
15849 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15850 echo "_ACEOF"
15851} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015852 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15853ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854ac_delim='%!_!# '
15855for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015857 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15860 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015861 break
15862 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015863 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864 else
15865 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015866 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867done
Matthias Kloseb9621712010-04-24 17:59:49 +000015868rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015871cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015873sed -n '
15874h
15875s/^/S["/; s/!.*/"]=/
15876p
15877g
15878s/^[^!]*!//
15879:repl
15880t repl
15881s/'"$ac_delim"'$//
15882t delim
15883:nl
15884h
15885s/\(.\{148\}\)..*/\1/
15886t more1
15887s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15888p
15889n
15890b repl
15891:more1
15892s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15893p
15894g
15895s/.\{148\}//
15896t nl
15897:delim
15898h
15899s/\(.\{148\}\)..*/\1/
15900t more2
15901s/["\\]/\\&/g; s/^/"/; s/$/"/
15902p
15903b
15904:more2
15905s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15906p
15907g
15908s/.\{148\}//
15909t delim
15910' <conf$$subs.awk | sed '
15911/^[^""]/{
15912 N
15913 s/\n//
15914}
15915' >>$CONFIG_STATUS || ac_write_fail=1
15916rm -f conf$$subs.awk
15917cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15918_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015919cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015920 for (key in S) S_is_set[key] = 1
15921 FS = ""
15922
15923}
15924{
15925 line = $ 0
15926 nfields = split(line, field, "@")
15927 substed = 0
15928 len = length(field[1])
15929 for (i = 2; i < nfields; i++) {
15930 key = field[i]
15931 keylen = length(key)
15932 if (S_is_set[key]) {
15933 value = S[key]
15934 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15935 len += length(value) + length(field[++i])
15936 substed = 1
15937 } else
15938 len += 1 + keylen
15939 }
15940
15941 print line
15942}
15943
15944_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015946cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15947if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15948 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15949else
15950 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015951fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015952 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015953_ACEOF
15954
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015955# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15956# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015957# trailing colons and then remove the whole line if VPATH becomes empty
15958# (actually we leave an empty line to preserve line numbers).
15959if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015960 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15961h
15962s///
15963s/^/:/
15964s/[ ]*$/:/
15965s/:\$(srcdir):/:/g
15966s/:\${srcdir}:/:/g
15967s/:@srcdir@:/:/g
15968s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015970x
15971s/\(=[ ]*\).*/\1/
15972G
15973s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974s/^[^=]*=[ ]*$//
15975}'
15976fi
15977
Matthias Kloseb9621712010-04-24 17:59:49 +000015978cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015979fi # test -n "$CONFIG_FILES"
15980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981# Set up the scripts for CONFIG_HEADERS section.
15982# No need to generate them if there are no CONFIG_HEADERS.
15983# This happens for instance with `./config.status Makefile'.
15984if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015985cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015986BEGIN {
15987_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989# Transform confdefs.h into an awk script `defines.awk', embedded as
15990# here-document in config.status, that substitutes the proper values into
15991# config.h.in to produce config.h.
15992
15993# Create a delimiter string that does not exist in confdefs.h, to ease
15994# handling of long lines.
15995ac_delim='%!_!# '
15996for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015997 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15998 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015999 break
16000 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016001 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 else
16003 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16004 fi
16005done
16006
16007# For the awk script, D is an array of macro values keyed by name,
16008# likewise P contains macro parameters if any. Preserve backslash
16009# newline sequences.
16010
16011ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16012sed -n '
16013s/.\{148\}/&'"$ac_delim"'/g
16014t rset
16015:rset
16016s/^[ ]*#[ ]*define[ ][ ]*/ /
16017t def
16018d
16019:def
16020s/\\$//
16021t bsnl
16022s/["\\]/\\&/g
16023s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16024D["\1"]=" \3"/p
16025s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16026d
16027:bsnl
16028s/["\\]/\\&/g
16029s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16030D["\1"]=" \3\\\\\\n"\\/p
16031t cont
16032s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16033t cont
16034d
16035:cont
16036n
16037s/.\{148\}/&'"$ac_delim"'/g
16038t clear
16039:clear
16040s/\\$//
16041t bsnlc
16042s/["\\]/\\&/g; s/^/"/; s/$/"/p
16043d
16044:bsnlc
16045s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16046b cont
16047' <confdefs.h | sed '
16048s/'"$ac_delim"'/"\\\
16049"/g' >>$CONFIG_STATUS || ac_write_fail=1
16050
16051cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16052 for (key in D) D_is_set[key] = 1
16053 FS = ""
16054}
16055/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16056 line = \$ 0
16057 split(line, arg, " ")
16058 if (arg[1] == "#") {
16059 defundef = arg[2]
16060 mac1 = arg[3]
16061 } else {
16062 defundef = substr(arg[1], 2)
16063 mac1 = arg[2]
16064 }
16065 split(mac1, mac2, "(") #)
16066 macro = mac2[1]
16067 prefix = substr(line, 1, index(line, defundef) - 1)
16068 if (D_is_set[macro]) {
16069 # Preserve the white space surrounding the "#".
16070 print prefix "define", macro P[macro] D[macro]
16071 next
16072 } else {
16073 # Replace #undef with comments. This is necessary, for example,
16074 # in the case of _POSIX_SOURCE, which is predefined and required
16075 # on some systems where configure will not decide to define it.
16076 if (defundef == "undef") {
16077 print "/*", prefix defundef, macro, "*/"
16078 next
16079 }
16080 }
16081}
16082{ print }
16083_ACAWK
16084_ACEOF
16085cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016086 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016087fi # test -n "$CONFIG_HEADERS"
16088
16089
16090eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16091shift
16092for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016093do
16094 case $ac_tag in
16095 :[FHLC]) ac_mode=$ac_tag; continue;;
16096 esac
16097 case $ac_mode$ac_tag in
16098 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016099 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100 :[FH]-) ac_tag=-:-;;
16101 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16102 esac
16103 ac_save_IFS=$IFS
16104 IFS=:
16105 set x $ac_tag
16106 IFS=$ac_save_IFS
16107 shift
16108 ac_file=$1
16109 shift
16110
16111 case $ac_mode in
16112 :L) ac_source=$1;;
16113 :[FH])
16114 ac_file_inputs=
16115 for ac_f
16116 do
16117 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016118 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 *) # Look for the file first in the build tree, then in the source tree
16120 # (if the path is not absolute). The absolute path cannot be DOS-style,
16121 # because $ac_f cannot contain `:'.
16122 test -f "$ac_f" ||
16123 case $ac_f in
16124 [\\/$]*) false;;
16125 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16126 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016127 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016129 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16130 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016131 done
16132
16133 # Let's still pretend it is `configure' which instantiates (i.e., don't
16134 # use $as_me), people would be surprised to read:
16135 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 configure_input='Generated from '`
16137 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16138 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139 if test x"$ac_file" != x-; then
16140 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016141 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16142$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 # Neutralize special characters interpreted by sed in replacement strings.
16145 case $configure_input in #(
16146 *\&* | *\|* | *\\* )
16147 ac_sed_conf_input=`$as_echo "$configure_input" |
16148 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16149 *) ac_sed_conf_input=$configure_input;;
16150 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016151
16152 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016153 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16154 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155 esac
16156 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016157 esac
16158
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016160$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016161 X"$ac_file" : 'X\(//\)[^/]' \| \
16162 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016164$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16166 s//\1/
16167 q
16168 }
16169 /^X\(\/\/\)[^/].*/{
16170 s//\1/
16171 q
16172 }
16173 /^X\(\/\/\)$/{
16174 s//\1/
16175 q
16176 }
16177 /^X\(\/\).*/{
16178 s//\1/
16179 q
16180 }
16181 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016182 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 ac_builddir=.
16184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185case "$ac_dir" in
16186.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16187*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016190 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191 case $ac_top_builddir_sub in
16192 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16193 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16194 esac ;;
16195esac
16196ac_abs_top_builddir=$ac_pwd
16197ac_abs_builddir=$ac_pwd$ac_dir_suffix
16198# for backward compatibility:
16199ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016200
16201case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 ac_top_srcdir=$ac_top_builddir_sub
16205 ac_abs_top_srcdir=$ac_pwd ;;
16206 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016207 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 ac_top_srcdir=$srcdir
16209 ac_abs_top_srcdir=$srcdir ;;
16210 *) # Relative name.
16211 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16212 ac_top_srcdir=$ac_top_build_prefix$srcdir
16213 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016214esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016216
Martin v. Löwis11437992002-04-12 09:54:03 +000016217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 case $ac_mode in
16219 :F)
16220 #
16221 # CONFIG_FILE
16222 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016223
16224 case $INSTALL in
16225 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016227 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016228 ac_MKDIR_P=$MKDIR_P
16229 case $MKDIR_P in
16230 [\\/$]* | ?:[\\/]* ) ;;
16231 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16232 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016233_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234
Matthias Kloseb9621712010-04-24 17:59:49 +000016235cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236# If the template does not know about datarootdir, expand it.
16237# FIXME: This hack should be removed a few years after 2.60.
16238ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016239ac_sed_dataroot='
16240/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241 p
16242 q
16243}
16244/@datadir@/p
16245/@docdir@/p
16246/@infodir@/p
16247/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016248/@mandir@/p'
16249case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250*datarootdir*) ac_datarootdir_seen=yes;;
16251*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16253$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 ac_datarootdir_hack='
16257 s&@datadir@&$datadir&g
16258 s&@docdir@&$docdir&g
16259 s&@infodir@&$infodir&g
16260 s&@localedir@&$localedir&g
16261 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263esac
16264_ACEOF
16265
16266# Neutralize VPATH when `$srcdir' = `.'.
16267# Shell code in configure.ac might set extrasub.
16268# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16270ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016271$extrasub
16272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016273cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016274:t
16275/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016276s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016278s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279s&@srcdir@&$ac_srcdir&;t t
16280s&@abs_srcdir@&$ac_abs_srcdir&;t t
16281s&@top_srcdir@&$ac_top_srcdir&;t t
16282s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16283s&@builddir@&$ac_builddir&;t t
16284s&@abs_builddir@&$ac_abs_builddir&;t t
16285s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16286s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016287s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016289"
Victor Stinnere0be4232011-10-25 13:06:09 +020016290eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16291 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016294 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16295 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16296 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016298which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016299$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016300which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016301
Victor Stinnere0be4232011-10-25 13:06:09 +020016302 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016304 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16305 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016307 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308 ;;
16309 :H)
16310 #
16311 # CONFIG_HEADER
16312 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016313 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016314 {
16315 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016316 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16317 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016318 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016319 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016320 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16321$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016324 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016325 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 fi
16327 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016328 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016329 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016330 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016331 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016332 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016334
16335 esac
16336
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016337
16338 case $ac_file$ac_mode in
16339 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16340
16341 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342done # for ac_tag
16343
Guido van Rossum627b2d71993-12-24 10:39:16 +000016344
Matthias Kloseb9621712010-04-24 17:59:49 +000016345as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016346_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016347ac_clean_files=$ac_clean_files_save
16348
Matthias Kloseb9621712010-04-24 17:59:49 +000016349test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016350 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016351
Martin v. Löwis11437992002-04-12 09:54:03 +000016352
16353# configure is writing to config.log, and then calls config.status.
16354# config.status does its own redirection, appending to config.log.
16355# Unfortunately, on DOS this fails, as config.log is still kept open
16356# by configure, so config.status won't be able to write to it; its
16357# output is simply discarded. So we exec the FD to /dev/null,
16358# effectively closing config.log, so it can be properly (re)opened and
16359# appended to by config.status. When coming back to configure, we
16360# need to make the FD available again.
16361if test "$no_create" != yes; then
16362 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016363 ac_config_status_args=
16364 test "$silent" = yes &&
16365 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016367 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 exec 5>>config.log
16369 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16370 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016371 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016372fi
16373if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16375$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016376fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016377
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016378
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016379echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016380if test ! -f Modules/Setup
16381then
16382 cp $srcdir/Modules/Setup.dist Modules/Setup
16383fi
16384
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016385echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016386if test ! -f Modules/Setup.local
16387then
16388 echo "# Edit this file for local setup changes" >Modules/Setup.local
16389fi
16390
16391echo "creating Makefile"
16392$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16393 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016394 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016395mv config.c Modules