blob: 843b141212b380613898e4af35a040f1f42956d5 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200172test x\$exitcode = x0 || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200489 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200491 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200498 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200649ac_ct_READELF
650READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200652ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000653AR
654RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000655USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000656GNULD
657LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000658LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000662PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000663BLDLIBRARY
664DLLLIBRARY
665LDLIBRARY
666LIBRARY
667BUILDEXEEXT
668EGREP
669GREP
670CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200671NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673MAINCC
674CXX
675OBJEXT
676EXEEXT
677ac_ct_CC
678CPPFLAGS
679LDFLAGS
680CFLAGS
681CC
682EXPORT_MACOSX_DEPLOYMENT_TARGET
683CONFIGURE_MACOSX_DEPLOYMENT_TARGET
684SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200685_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000686MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000687FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000688FRAMEWORKUNIXTOOLSPREFIX
689FRAMEWORKALTINSTALLLAST
690FRAMEWORKALTINSTALLFIRST
691FRAMEWORKINSTALLLAST
692FRAMEWORKINSTALLFIRST
693PYTHONFRAMEWORKINSTALLDIR
694PYTHONFRAMEWORKPREFIX
695PYTHONFRAMEWORKDIR
696PYTHONFRAMEWORKIDENTIFIER
697PYTHONFRAMEWORK
698LIPO_32BIT_FLAGS
699ARCH_RUN_32BIT
700UNIVERSALSDK
701CONFIG_ARGS
702SOVERSION
703VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200704PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100705host_os
706host_vendor
707host_cpu
708host
709build_os
710build_vendor
711build_cpu
712build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500713HAS_HG
714HGBRANCH
715HGTAG
716HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400717BASECPPFLAGS
718BUILDDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000719target_alias
720host_alias
721build_alias
722LIBS
723ECHO_T
724ECHO_N
725ECHO_C
726DEFS
727mandir
728localedir
729libdir
730psdir
731pdfdir
732dvidir
733htmldir
734infodir
735docdir
736oldincludedir
737includedir
738localstatedir
739sharedstatedir
740sysconfdir
741datadir
742datarootdir
743libexecdir
744sbindir
745bindir
746program_transform_name
747prefix
748exec_prefix
749PACKAGE_URL
750PACKAGE_BUGREPORT
751PACKAGE_STRING
752PACKAGE_VERSION
753PACKAGE_TARNAME
754PACKAGE_NAME
755PATH_SEPARATOR
756SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000757ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000758ac_user_opts='
759enable_option_checking
760enable_universalsdk
761with_universal_archs
762with_framework_name
763enable_framework
764with_gcc
765with_cxx_main
766with_suffix
767enable_shared
768enable_profiling
769with_pydebug
770with_libs
771with_system_expat
772with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100773with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000774enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000775with_dbmliborder
776with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000777with_threads
778with_thread
779enable_ipv6
780with_doc_strings
781with_tsc
782with_pymalloc
783with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000784with_fpectl
785with_libm
786with_libc
787enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000788with_computed_gotos
789'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000790 ac_precious_vars='build_alias
791host_alias
792target_alias
793CC
794CFLAGS
795LDFLAGS
796LIBS
797CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200798CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000799
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000802ac_init_help=
803ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_unrecognized_opts=
805ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806# The variables have the same names as the options, with
807# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000808cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811no_recursion=
812prefix=NONE
813program_prefix=NONE
814program_suffix=NONE
815program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000820x_includes=NONE
821x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000822
823# Installation directory options.
824# These are left unexpanded so users can "make install exec_prefix=/foo"
825# and all the variables that are supposed to be based on exec_prefix
826# by default will actually change.
827# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829bindir='${exec_prefix}/bin'
830sbindir='${exec_prefix}/sbin'
831libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832datarootdir='${prefix}/share'
833datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000834sysconfdir='${prefix}/etc'
835sharedstatedir='${prefix}/com'
836localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837includedir='${prefix}/include'
838oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000839docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
840infodir='${datarootdir}/info'
841htmldir='${docdir}'
842dvidir='${docdir}'
843pdfdir='${docdir}'
844psdir='${docdir}'
845libdir='${exec_prefix}/lib'
846localedir='${datarootdir}/locale'
847mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 # If the previous option needs an argument, assign it.
854 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 ac_prev=
857 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000858 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200861 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
862 *=) ac_optarg= ;;
863 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 # Accept the important Cygnus configure options, so we can diagnose typos.
867
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000868 case $ac_dashdash$ac_option in
869 --)
870 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872 -bindir | --bindir | --bindi | --bind | --bin | --bi)
873 ac_prev=bindir ;;
874 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000875 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876
877 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882 -cache-file | --cache-file | --cache-fil | --cache-fi \
883 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
884 ac_prev=cache_file ;;
885 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
886 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 cache_file=$ac_optarg ;;
888
889 --config-cache | -C)
890 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
898 | --dataroo | --dataro | --datar)
899 ac_prev=datarootdir ;;
900 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
901 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
902 datarootdir=$ac_optarg ;;
903
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200908 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000909 ac_useropt_orig=$ac_useropt
910 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
911 case $ac_user_opts in
912 *"
913"enable_$ac_useropt"
914"*) ;;
915 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
916 ac_unrecognized_sep=', ';;
917 esac
918 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919
920 -docdir | --docdir | --docdi | --doc | --do)
921 ac_prev=docdir ;;
922 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
923 docdir=$ac_optarg ;;
924
925 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
926 ac_prev=dvidir ;;
927 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
928 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
930 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200934 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000935 ac_useropt_orig=$ac_useropt
936 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
937 case $ac_user_opts in
938 *"
939"enable_$ac_useropt"
940"*) ;;
941 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
942 ac_unrecognized_sep=', ';;
943 esac
944 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
947 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
948 | --exec | --exe | --ex)
949 ac_prev=exec_prefix ;;
950 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
951 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
952 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
955 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 # Obsolete; use --with-gas.
957 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Martin v. Löwis11437992002-04-12 09:54:03 +0000959 -help | --help | --hel | --he | -h)
960 ac_init_help=long ;;
961 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
962 ac_init_help=recursive ;;
963 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
964 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965
966 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
972 ac_prev=htmldir ;;
973 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
974 | --ht=*)
975 htmldir=$ac_optarg ;;
976
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000977 -includedir | --includedir | --includedi | --included | --include \
978 | --includ | --inclu | --incl | --inc)
979 ac_prev=includedir ;;
980 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
981 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000982 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000983
984 -infodir | --infodir | --infodi | --infod | --info | --inf)
985 ac_prev=infodir ;;
986 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988
989 -libdir | --libdir | --libdi | --libd)
990 ac_prev=libdir ;;
991 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993
994 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
995 | --libexe | --libex | --libe)
996 ac_prev=libexecdir ;;
997 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
998 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001001 -localedir | --localedir | --localedi | --localed | --locale)
1002 ac_prev=localedir ;;
1003 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1004 localedir=$ac_optarg ;;
1005
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001007 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008 ac_prev=localstatedir ;;
1009 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1014 ac_prev=mandir ;;
1015 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --without-fp.
1020 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 no_create=yes ;;
1025
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001026 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1027 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1028 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1031 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1032 | --oldin | --oldi | --old | --ol | --o)
1033 ac_prev=oldincludedir ;;
1034 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1035 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1036 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1040 ac_prev=prefix ;;
1041 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1045 | --program-pre | --program-pr | --program-p)
1046 ac_prev=program_prefix ;;
1047 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1048 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
1051 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1052 | --program-suf | --program-su | --program-s)
1053 ac_prev=program_suffix ;;
1054 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1055 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
1058 -program-transform-name | --program-transform-name \
1059 | --program-transform-nam | --program-transform-na \
1060 | --program-transform-n | --program-transform- \
1061 | --program-transform | --program-transfor \
1062 | --program-transfo | --program-transf \
1063 | --program-trans | --program-tran \
1064 | --progr-tra | --program-tr | --program-t)
1065 ac_prev=program_transform_name ;;
1066 -program-transform-name=* | --program-transform-name=* \
1067 | --program-transform-nam=* | --program-transform-na=* \
1068 | --program-transform-n=* | --program-transform-=* \
1069 | --program-transform=* | --program-transfor=* \
1070 | --program-transfo=* | --program-transf=* \
1071 | --program-trans=* | --program-tran=* \
1072 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001075 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1076 ac_prev=pdfdir ;;
1077 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1078 pdfdir=$ac_optarg ;;
1079
1080 -psdir | --psdir | --psdi | --psd | --ps)
1081 ac_prev=psdir ;;
1082 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1083 psdir=$ac_optarg ;;
1084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1086 | -silent | --silent | --silen | --sile | --sil)
1087 silent=yes ;;
1088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1090 ac_prev=sbindir ;;
1091 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1092 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
1095 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1096 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1097 | --sharedst | --shareds | --shared | --share | --shar \
1098 | --sha | --sh)
1099 ac_prev=sharedstatedir ;;
1100 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1101 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1102 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1103 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001105
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 -site | --site | --sit)
1107 ac_prev=site ;;
1108 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1112 ac_prev=srcdir ;;
1113 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1117 | --syscon | --sysco | --sysc | --sys | --sy)
1118 ac_prev=sysconfdir ;;
1119 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1120 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
1128 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1129 verbose=yes ;;
1130
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 -version | --version | --versio | --versi | --vers | -V)
1132 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
1134 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001138 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143"with_$ac_useropt"
1144"*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
1147 esac
1148 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001151 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001153 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001154 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001155 ac_useropt_orig=$ac_useropt
1156 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1157 case $ac_user_opts in
1158 *"
1159"with_$ac_useropt"
1160"*) ;;
1161 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1162 ac_unrecognized_sep=', ';;
1163 esac
1164 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 --x)
1167 # Obsolete; use --with-x.
1168 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1171 | --x-incl | --x-inc | --x-in | --x-i)
1172 ac_prev=x_includes ;;
1173 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1174 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
1177 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1178 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1179 ac_prev=x_libraries ;;
1180 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1181 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001184 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1185Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ;;
1187
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 *=*)
1189 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1190 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 case $ac_envvar in #(
1192 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001193 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001195 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 export $ac_envvar ;;
1197
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001198 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001203 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204 ;;
1205
1206 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207done
1208
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001211 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212fi
1213
Matthias Kloseb9621712010-04-24 17:59:49 +00001214if test -n "$ac_unrecognized_opts"; then
1215 case $enable_option_checking in
1216 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1219 esac
1220fi
1221
1222# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1224 datadir sysconfdir sharedstatedir localstatedir includedir \
1225 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1226 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001229 # Remove trailing slashes.
1230 case $ac_val in
1231 */ )
1232 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1233 eval $ac_var=\$ac_val;;
1234 esac
1235 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 [\\/$]* | ?:[\\/]* ) continue;;
1238 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001240 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001241done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243# There might be people who depend on the old broken behavior: `$host'
1244# used to hold the argument of --host etc.
1245# FIXME: To remove some day.
1246build=$build_alias
1247host=$host_alias
1248target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250# FIXME: To remove some day.
1251if test "x$host_alias" != x; then
1252 if test "x$build_alias" = x; then
1253 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001254 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1255 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 elif test "x$build_alias" != "x$host_alias"; then
1257 cross_compiling=yes
1258 fi
1259fi
1260
1261ac_tool_prefix=
1262test -n "$host_alias" && ac_tool_prefix=$host_alias-
1263
1264test "$silent" = yes && exec 6>/dev/null
1265
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267ac_pwd=`pwd` && test -n "$ac_pwd" &&
1268ac_ls_di=`ls -di .` &&
1269ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273
1274
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275# Find the source files, if location was not specified.
1276if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 ac_confdir=`$as_dirname -- "$as_myself" ||
1280$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1281 X"$as_myself" : 'X\(//\)[^/]' \| \
1282 X"$as_myself" : 'X\(//\)$' \| \
1283 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1284$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\/\)[^/].*/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\/\)$/{
1294 s//\1/
1295 q
1296 }
1297 /^X\(\/\).*/{
1298 s//\1/
1299 q
1300 }
1301 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304 srcdir=..
1305 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306else
1307 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309if test ! -r "$srcdir/$ac_unique_file"; then
1310 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1314ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001315 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 pwd)`
1317# When building in place, set srcdir=.
1318if test "$ac_abs_confdir" = "$ac_pwd"; then
1319 srcdir=.
1320fi
1321# Remove unnecessary trailing slashes from srcdir.
1322# Double slashes in file names in object file debugging info
1323# mess up M-x gdb in Emacs.
1324case $srcdir in
1325*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1326esac
1327for ac_var in $ac_precious_vars; do
1328 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1329 eval ac_env_${ac_var}_value=\$${ac_var}
1330 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1332done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333
Martin v. Löwis11437992002-04-12 09:54:03 +00001334#
1335# Report the --help message.
1336#
1337if test "$ac_init_help" = "long"; then
1338 # Omit some internal or obsolete options to make the list less imposing.
1339 # This message is too long to be a string in the A/UX 3.1 sh.
1340 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001341\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001342
1343Usage: $0 [OPTION]... [VAR=VALUE]...
1344
1345To assign environment variables (e.g., CC, CFLAGS...), specify them as
1346VAR=VALUE. See below for descriptions of some of the useful variables.
1347
1348Defaults for the options are specified in brackets.
1349
1350Configuration:
1351 -h, --help display this help and exit
1352 --help=short display options specific to this package
1353 --help=recursive display the short help of all the included packages
1354 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001355 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001356 --cache-file=FILE cache test results in FILE [disabled]
1357 -C, --config-cache alias for \`--cache-file=config.cache'
1358 -n, --no-create do not create output files
1359 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1360
Martin v. Löwis11437992002-04-12 09:54:03 +00001361Installation directories:
1362 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001363 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001365 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367By default, \`make install' will install all the files in
1368\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1369an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1370for instance \`--prefix=\$HOME'.
1371
1372For better control, use the options below.
1373
1374Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001375 --bindir=DIR user executables [EPREFIX/bin]
1376 --sbindir=DIR system admin executables [EPREFIX/sbin]
1377 --libexecdir=DIR program executables [EPREFIX/libexec]
1378 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1379 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1380 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1381 --libdir=DIR object code libraries [EPREFIX/lib]
1382 --includedir=DIR C header files [PREFIX/include]
1383 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1384 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1385 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1386 --infodir=DIR info documentation [DATAROOTDIR/info]
1387 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1388 --mandir=DIR man documentation [DATAROOTDIR/man]
1389 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1390 --htmldir=DIR html documentation [DOCDIR]
1391 --dvidir=DIR dvi documentation [DOCDIR]
1392 --pdfdir=DIR pdf documentation [DOCDIR]
1393 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001394_ACEOF
1395
1396 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001397
1398System types:
1399 --build=BUILD configure for building on BUILD [guessed]
1400 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001401_ACEOF
1402fi
1403
1404if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001405 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001406 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001407 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 cat <<\_ACEOF
1409
1410Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001411 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1413 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001414 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001415 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001416 --enable-framework[=INSTALLDIR]
1417 Build (MacOSX|Darwin) framework
1418 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001419 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001420 --enable-loadable-sqlite-extensions
1421 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001422 --enable-ipv6 Enable ipv6 (with ipv4) support
1423 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001424 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Optional Packages:
1428 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1429 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001430 --with-universal-archs=ARCH
1431 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001432 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001433 --with-framework-name=FRAMEWORK
1434 specify an alternate name of the framework built
1435 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001437 --with-cxx-main=<compiler>
1438 compile main() and link python executable with C++
1439 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with-suffix=.exe set executable suffix
1441 --with-pydebug build with Py_DEBUG defined
1442 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001443 --with-system-expat build pyexpat module using an installed expat
1444 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001445 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001446 --with-system-libmpdec build _decimal module using an installed libmpdec
1447 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001448 --with-dbmliborder=db1:db2:...
1449 order to check db backends for dbm. Valid value is a
1450 colon separated string with the backend names
1451 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with(out)-threads[=DIRECTORY]
1454 disable/enable thread support
1455 --with(out)-thread[=DIRECTORY]
1456 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001458 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001460 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with-fpectl enable SIGFPE catching
1462 --with-libm=STRING math library
1463 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001464 --with(out)-computed-gotos
1465 Use computed gotos in evaluation loop (enabled by
1466 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001467
1468Some influential environment variables:
1469 CC C compiler command
1470 CFLAGS C compiler flags
1471 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1472 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001475 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 CPP C preprocessor
1477
1478Use these variables to override the choices made by `configure' or to help
1479it to find libraries and programs with nonstandard names/locations.
1480
Georg Brandle2e15612009-05-20 18:25:10 +00001481Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001484fi
1485
1486if test "$ac_init_help" = "recursive"; then
1487 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 test -d "$ac_dir" ||
1490 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1491 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 ac_builddir=.
1493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494case "$ac_dir" in
1495.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1496*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500 case $ac_top_builddir_sub in
1501 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1502 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1503 esac ;;
1504esac
1505ac_abs_top_builddir=$ac_pwd
1506ac_abs_builddir=$ac_pwd$ac_dir_suffix
1507# for backward compatibility:
1508ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 ac_top_srcdir=$ac_top_builddir_sub
1514 ac_abs_top_srcdir=$ac_pwd ;;
1515 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 ac_top_srcdir=$srcdir
1518 ac_abs_top_srcdir=$srcdir ;;
1519 *) # Relative name.
1520 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1521 ac_top_srcdir=$ac_top_build_prefix$srcdir
1522 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001523esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 cd "$ac_dir" || { ac_status=$?; continue; }
1527 # Check for guested configure.
1528 if test -f "$ac_srcdir/configure.gnu"; then
1529 echo &&
1530 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1531 elif test -f "$ac_srcdir/configure"; then
1532 echo &&
1533 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001535 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 fi || ac_status=$?
1537 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 done
1539fi
1540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001542if $ac_init_version; then
1543 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001544python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001545generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001547Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001548This configure script is free software; the Free Software Foundation
1549gives unlimited permission to copy, distribute and modify it.
1550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001553
1554## ------------------------ ##
1555## Autoconf initialization. ##
1556## ------------------------ ##
1557
1558# ac_fn_c_try_compile LINENO
1559# --------------------------
1560# Try to compile conftest.$ac_ext, and return whether this succeeded.
1561ac_fn_c_try_compile ()
1562{
1563 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1564 rm -f conftest.$ac_objext
1565 if { { ac_try="$ac_compile"
1566case "(($ac_try" in
1567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1568 *) ac_try_echo=$ac_try;;
1569esac
1570eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1571$as_echo "$ac_try_echo"; } >&5
1572 (eval "$ac_compile") 2>conftest.err
1573 ac_status=$?
1574 if test -s conftest.err; then
1575 grep -v '^ *+' conftest.err >conftest.er1
1576 cat conftest.er1 >&5
1577 mv -f conftest.er1 conftest.err
1578 fi
1579 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1580 test $ac_status = 0; } && {
1581 test -z "$ac_c_werror_flag" ||
1582 test ! -s conftest.err
1583 } && test -s conftest.$ac_objext; then :
1584 ac_retval=0
1585else
1586 $as_echo "$as_me: failed program was:" >&5
1587sed 's/^/| /' conftest.$ac_ext >&5
1588
1589 ac_retval=1
1590fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001591 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001592 as_fn_set_status $ac_retval
1593
1594} # ac_fn_c_try_compile
1595
Matthias Kloseb9621712010-04-24 17:59:49 +00001596# ac_fn_c_try_link LINENO
1597# -----------------------
1598# Try to link conftest.$ac_ext, and return whether this succeeded.
1599ac_fn_c_try_link ()
1600{
1601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1602 rm -f conftest.$ac_objext conftest$ac_exeext
1603 if { { ac_try="$ac_link"
1604case "(($ac_try" in
1605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1606 *) ac_try_echo=$ac_try;;
1607esac
1608eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1609$as_echo "$ac_try_echo"; } >&5
1610 (eval "$ac_link") 2>conftest.err
1611 ac_status=$?
1612 if test -s conftest.err; then
1613 grep -v '^ *+' conftest.err >conftest.er1
1614 cat conftest.er1 >&5
1615 mv -f conftest.er1 conftest.err
1616 fi
1617 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1618 test $ac_status = 0; } && {
1619 test -z "$ac_c_werror_flag" ||
1620 test ! -s conftest.err
1621 } && test -s conftest$ac_exeext && {
1622 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001623 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 }; then :
1625 ac_retval=0
1626else
1627 $as_echo "$as_me: failed program was:" >&5
1628sed 's/^/| /' conftest.$ac_ext >&5
1629
1630 ac_retval=1
1631fi
1632 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1633 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1634 # interfere with the next link command; also delete a directory that is
1635 # left behind by Apple's compiler. We do this before executing the actions.
1636 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001637 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001638 as_fn_set_status $ac_retval
1639
1640} # ac_fn_c_try_link
1641
Matthias Kloseb9621712010-04-24 17:59:49 +00001642# ac_fn_c_try_cpp LINENO
1643# ----------------------
1644# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1645ac_fn_c_try_cpp ()
1646{
1647 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1648 if { { ac_try="$ac_cpp conftest.$ac_ext"
1649case "(($ac_try" in
1650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1651 *) ac_try_echo=$ac_try;;
1652esac
1653eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1654$as_echo "$ac_try_echo"; } >&5
1655 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1656 ac_status=$?
1657 if test -s conftest.err; then
1658 grep -v '^ *+' conftest.err >conftest.er1
1659 cat conftest.er1 >&5
1660 mv -f conftest.er1 conftest.err
1661 fi
1662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001663 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1665 test ! -s conftest.err
1666 }; then :
1667 ac_retval=0
1668else
1669 $as_echo "$as_me: failed program was:" >&5
1670sed 's/^/| /' conftest.$ac_ext >&5
1671
1672 ac_retval=1
1673fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001674 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 as_fn_set_status $ac_retval
1676
1677} # ac_fn_c_try_cpp
1678
1679# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1680# -------------------------------------------------------
1681# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1682# the include files in INCLUDES and setting the cache variable VAR
1683# accordingly.
1684ac_fn_c_check_header_mongrel ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001687 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1689$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001690if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001691 $as_echo_n "(cached) " >&6
1692fi
1693eval ac_res=\$$3
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1695$as_echo "$ac_res" >&6; }
1696else
1697 # Is the header compilable?
1698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1699$as_echo_n "checking $2 usability... " >&6; }
1700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1701/* end confdefs.h. */
1702$4
1703#include <$2>
1704_ACEOF
1705if ac_fn_c_try_compile "$LINENO"; then :
1706 ac_header_compiler=yes
1707else
1708 ac_header_compiler=no
1709fi
1710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1712$as_echo "$ac_header_compiler" >&6; }
1713
1714# Is the header present?
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1716$as_echo_n "checking $2 presence... " >&6; }
1717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1718/* end confdefs.h. */
1719#include <$2>
1720_ACEOF
1721if ac_fn_c_try_cpp "$LINENO"; then :
1722 ac_header_preproc=yes
1723else
1724 ac_header_preproc=no
1725fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001726rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1728$as_echo "$ac_header_preproc" >&6; }
1729
1730# So? What about this header?
1731case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1732 yes:no: )
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1734$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1736$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1737 ;;
1738 no:yes:* )
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1740$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1742$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1744$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1746$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1748$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001749( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001750## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001751## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 ) | sed "s/^/$as_me: WARNING: /" >&2
1753 ;;
1754esac
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1756$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001757if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001758 $as_echo_n "(cached) " >&6
1759else
1760 eval "$3=\$ac_header_compiler"
1761fi
1762eval ac_res=\$$3
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1764$as_echo "$ac_res" >&6; }
1765fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001767
1768} # ac_fn_c_check_header_mongrel
1769
1770# ac_fn_c_try_run LINENO
1771# ----------------------
1772# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1773# that executables *can* be run.
1774ac_fn_c_try_run ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 if { { ac_try="$ac_link"
1778case "(($ac_try" in
1779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1780 *) ac_try_echo=$ac_try;;
1781esac
1782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1783$as_echo "$ac_try_echo"; } >&5
1784 (eval "$ac_link") 2>&5
1785 ac_status=$?
1786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1787 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1788 { { case "(($ac_try" in
1789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1790 *) ac_try_echo=$ac_try;;
1791esac
1792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1793$as_echo "$ac_try_echo"; } >&5
1794 (eval "$ac_try") 2>&5
1795 ac_status=$?
1796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1797 test $ac_status = 0; }; }; then :
1798 ac_retval=0
1799else
1800 $as_echo "$as_me: program exited with status $ac_status" >&5
1801 $as_echo "$as_me: failed program was:" >&5
1802sed 's/^/| /' conftest.$ac_ext >&5
1803
1804 ac_retval=$ac_status
1805fi
1806 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 as_fn_set_status $ac_retval
1809
1810} # ac_fn_c_try_run
1811
1812# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1813# -------------------------------------------------------
1814# Tests whether HEADER exists and can be compiled using the include files in
1815# INCLUDES, setting the cache variable VAR accordingly.
1816ac_fn_c_check_header_compile ()
1817{
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001821if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001822 $as_echo_n "(cached) " >&6
1823else
1824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1825/* end confdefs.h. */
1826$4
1827#include <$2>
1828_ACEOF
1829if ac_fn_c_try_compile "$LINENO"; then :
1830 eval "$3=yes"
1831else
1832 eval "$3=no"
1833fi
1834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1835fi
1836eval ac_res=\$$3
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1838$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001840
1841} # ac_fn_c_check_header_compile
1842
Matthias Kloseb9621712010-04-24 17:59:49 +00001843# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1844# -------------------------------------------
1845# Tests whether TYPE exists after having included INCLUDES, setting cache
1846# variable VAR accordingly.
1847ac_fn_c_check_type ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001852if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 eval "$3=no"
1856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1857/* end confdefs.h. */
1858$4
1859int
1860main ()
1861{
1862if (sizeof ($2))
1863 return 0;
1864 ;
1865 return 0;
1866}
1867_ACEOF
1868if ac_fn_c_try_compile "$LINENO"; then :
1869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870/* end confdefs.h. */
1871$4
1872int
1873main ()
1874{
1875if (sizeof (($2)))
1876 return 0;
1877 ;
1878 return 0;
1879}
1880_ACEOF
1881if ac_fn_c_try_compile "$LINENO"; then :
1882
1883else
1884 eval "$3=yes"
1885fi
1886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889fi
1890eval ac_res=\$$3
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1892$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894
1895} # ac_fn_c_check_type
1896
1897# ac_fn_c_find_uintX_t LINENO BITS VAR
1898# ------------------------------------
1899# Finds an unsigned integer type with width BITS, setting cache variable VAR
1900# accordingly.
1901ac_fn_c_find_uintX_t ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1905$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 eval "$3=no"
1910 # Order is important - never check a type that is potentially smaller
1911 # than half of the expected target width.
1912 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1913 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$ac_includes_default
1917int
1918main ()
1919{
1920static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001921test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001922
1923 ;
1924 return 0;
1925}
1926_ACEOF
1927if ac_fn_c_try_compile "$LINENO"; then :
1928 case $ac_type in #(
1929 uint$2_t) :
1930 eval "$3=yes" ;; #(
1931 *) :
1932 eval "$3=\$ac_type" ;;
1933esac
1934fi
1935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001936 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001937
1938else
1939 break
1940fi
1941 done
1942fi
1943eval ac_res=\$$3
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1945$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001946 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001947
1948} # ac_fn_c_find_uintX_t
1949
1950# ac_fn_c_find_intX_t LINENO BITS VAR
1951# -----------------------------------
1952# Finds a signed integer type with width BITS, setting cache variable VAR
1953# accordingly.
1954ac_fn_c_find_intX_t ()
1955{
1956 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1958$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001959if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001960 $as_echo_n "(cached) " >&6
1961else
1962 eval "$3=no"
1963 # Order is important - never check a type that is potentially smaller
1964 # than half of the expected target width.
1965 for ac_type in int$2_t 'int' 'long int' \
1966 'long long int' 'short int' 'signed char'; do
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001970 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001971int
1972main ()
1973{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001974static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001975test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001976
1977 ;
1978 return 0;
1979}
1980_ACEOF
1981if ac_fn_c_try_compile "$LINENO"; then :
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001985 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001986int
1987main ()
1988{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001990 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001991test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998
1999else
2000 case $ac_type in #(
2001 int$2_t) :
2002 eval "$3=yes" ;; #(
2003 *) :
2004 eval "$3=\$ac_type" ;;
2005esac
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002010 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002011
2012else
2013 break
2014fi
2015 done
2016fi
2017eval ac_res=\$$3
2018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2019$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002020 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022} # ac_fn_c_find_intX_t
2023
2024# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2025# --------------------------------------------
2026# Tries to find the compile-time value of EXPR in a program that includes
2027# INCLUDES, setting VAR accordingly. Returns whether the value could be
2028# computed
2029ac_fn_c_compute_int ()
2030{
2031 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032 if test "$cross_compiling" = yes; then
2033 # Depending upon the size, compute the lo and hi bounds.
2034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002041test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 ac_lo=0 ac_mid=0
2049 while :; do
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002057test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_hi=$ac_mid; break
2065else
2066 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2067 if test $ac_lo -le $ac_mid; then
2068 ac_lo= ac_hi=
2069 break
2070 fi
2071 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2072fi
2073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2074 done
2075else
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002083test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090 ac_hi=-1 ac_mid=-1
2091 while :; do
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002099test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=$ac_mid; break
2107else
2108 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2109 if test $ac_mid -le $ac_hi; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 ac_lo= ac_hi=
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123# Binary search between lo and hi bounds.
2124while test "x$ac_lo" != "x$ac_hi"; do
2125 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002133test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002134
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 ac_hi=$ac_mid
2141else
2142 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145done
2146case $ac_lo in #((
2147?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2148'') ac_retval=1 ;;
2149esac
2150 else
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
2154static long int longval () { return $2; }
2155static unsigned long int ulongval () { return $2; }
2156#include <stdio.h>
2157#include <stdlib.h>
2158int
2159main ()
2160{
2161
2162 FILE *f = fopen ("conftest.val", "w");
2163 if (! f)
2164 return 1;
2165 if (($2) < 0)
2166 {
2167 long int i = longval ();
2168 if (i != ($2))
2169 return 1;
2170 fprintf (f, "%ld", i);
2171 }
2172 else
2173 {
2174 unsigned long int i = ulongval ();
2175 if (i != ($2))
2176 return 1;
2177 fprintf (f, "%lu", i);
2178 }
2179 /* Do not output a trailing newline, as this causes \r\n confusion
2180 on some platforms. */
2181 return ferror (f) || fclose (f) != 0;
2182
2183 ;
2184 return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_run "$LINENO"; then :
2188 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2189else
2190 ac_retval=1
2191fi
2192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2193 conftest.$ac_objext conftest.beam conftest.$ac_ext
2194rm -f conftest.val
2195
2196 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002197 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002198 as_fn_set_status $ac_retval
2199
2200} # ac_fn_c_compute_int
2201
2202# ac_fn_c_check_func LINENO FUNC VAR
2203# ----------------------------------
2204# Tests whether FUNC exists, setting the cache variable VAR accordingly
2205ac_fn_c_check_func ()
2206{
2207 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2209$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002210if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002211 $as_echo_n "(cached) " >&6
2212else
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2216 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2217#define $2 innocuous_$2
2218
2219/* System header to define __stub macros and hopefully few prototypes,
2220 which can conflict with char $2 (); below.
2221 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2222 <limits.h> exists even on freestanding compilers. */
2223
2224#ifdef __STDC__
2225# include <limits.h>
2226#else
2227# include <assert.h>
2228#endif
2229
2230#undef $2
2231
2232/* Override any GCC internal prototype to avoid an error.
2233 Use char because int might match the return type of a GCC
2234 builtin and then its argument prototype would still apply. */
2235#ifdef __cplusplus
2236extern "C"
2237#endif
2238char $2 ();
2239/* The GNU C library defines this for functions which it implements
2240 to always fail with ENOSYS. Some functions are actually named
2241 something starting with __ and the normal name is an alias. */
2242#if defined __stub_$2 || defined __stub___$2
2243choke me
2244#endif
2245
2246int
2247main ()
2248{
2249return $2 ();
2250 ;
2251 return 0;
2252}
2253_ACEOF
2254if ac_fn_c_try_link "$LINENO"; then :
2255 eval "$3=yes"
2256else
2257 eval "$3=no"
2258fi
2259rm -f core conftest.err conftest.$ac_objext \
2260 conftest$ac_exeext conftest.$ac_ext
2261fi
2262eval ac_res=\$$3
2263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2264$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002265 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002266
2267} # ac_fn_c_check_func
2268
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002269# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2270# ---------------------------------------------
2271# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2272# accordingly.
2273ac_fn_c_check_decl ()
2274{
2275 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2276 as_decl_name=`echo $2|sed 's/ *(.*//'`
2277 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2279$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2280if eval \${$3+:} false; then :
2281 $as_echo_n "(cached) " >&6
2282else
2283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2284/* end confdefs.h. */
2285$4
2286int
2287main ()
2288{
2289#ifndef $as_decl_name
2290#ifdef __cplusplus
2291 (void) $as_decl_use;
2292#else
2293 (void) $as_decl_name;
2294#endif
2295#endif
2296
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_compile "$LINENO"; then :
2302 eval "$3=yes"
2303else
2304 eval "$3=no"
2305fi
2306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307fi
2308eval ac_res=\$$3
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2310$as_echo "$ac_res" >&6; }
2311 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2312
2313} # ac_fn_c_check_decl
2314
Matthias Kloseb9621712010-04-24 17:59:49 +00002315# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2316# ----------------------------------------------------
2317# Tries to find if the field MEMBER exists in type AGGR, after including
2318# INCLUDES, setting cache variable VAR accordingly.
2319ac_fn_c_check_member ()
2320{
2321 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2323$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002324if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002325 $as_echo_n "(cached) " >&6
2326else
2327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2328/* end confdefs.h. */
2329$5
2330int
2331main ()
2332{
2333static $2 ac_aggr;
2334if (ac_aggr.$3)
2335return 0;
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$4=yes"
2342else
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h. */
2345$5
2346int
2347main ()
2348{
2349static $2 ac_aggr;
2350if (sizeof ac_aggr.$3)
2351return 0;
2352 ;
2353 return 0;
2354}
2355_ACEOF
2356if ac_fn_c_try_compile "$LINENO"; then :
2357 eval "$4=yes"
2358else
2359 eval "$4=no"
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2364fi
2365eval ac_res=\$$4
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2367$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002368 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002369
2370} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002371cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002372This file contains any messages produced by compilers while
2373running configure, to aid debugging if configure makes a mistake.
2374
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002375It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002376generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
2378 $ $0 $@
2379
2380_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002382{
2383cat <<_ASUNAME
2384## --------- ##
2385## Platform. ##
2386## --------- ##
2387
2388hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2389uname -m = `(uname -m) 2>/dev/null || echo unknown`
2390uname -r = `(uname -r) 2>/dev/null || echo unknown`
2391uname -s = `(uname -s) 2>/dev/null || echo unknown`
2392uname -v = `(uname -v) 2>/dev/null || echo unknown`
2393
2394/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2395/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2396
2397/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2398/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2399/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002401/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2402/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2403/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2404
2405_ASUNAME
2406
2407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2408for as_dir in $PATH
2409do
2410 IFS=$as_save_IFS
2411 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 $as_echo "PATH: $as_dir"
2413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002415
2416} >&5
2417
2418cat >&5 <<_ACEOF
2419
2420
2421## ----------- ##
2422## Core tests. ##
2423## ----------- ##
2424
2425_ACEOF
2426
2427
2428# Keep a trace of the command line.
2429# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002430# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002431# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002432# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002433ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002434ac_configure_args0=
2435ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002436ac_must_keep_next=false
2437for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002438do
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 for ac_arg
2440 do
2441 case $ac_arg in
2442 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2443 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2444 | -silent | --silent | --silen | --sile | --sil)
2445 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002447 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 esac
2449 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002452 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002454 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002455 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002456 case $ac_arg in
2457 *=* | --config-cache | -C | -disable-* | --disable-* \
2458 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2459 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2460 | -with-* | --with-* | -without-* | --without-* | --x)
2461 case "$ac_configure_args0 " in
2462 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2463 esac
2464 ;;
2465 -* ) ac_must_keep_next=true ;;
2466 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 ;;
2470 esac
2471 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002472done
Matthias Kloseb9621712010-04-24 17:59:49 +00002473{ ac_configure_args0=; unset ac_configure_args0;}
2474{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002475
2476# When interrupted or exit'd, cleanup temporary files, and complete
2477# config.log. We remove comments because anyway the quotes in there
2478# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479# WARNING: Use '\'' to represent an apostrophe within the trap.
2480# 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 +00002481trap 'exit_status=$?
2482 # Save into config.log some information that might help in debugging.
2483 {
2484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002487## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
2490 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491(
2492 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2493 eval ac_val=\$$ac_var
2494 case $ac_val in #(
2495 *${as_nl}*)
2496 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2498$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
2500 case $ac_var in #(
2501 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2503 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 esac ;;
2505 esac
2506 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2509 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002510 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 "s/'\''/'\''\\\\'\'''\''/g;
2512 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2513 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002514 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002516 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 esac |
2518 sort
2519)
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002521
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002523## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 echo
2526 for ac_var in $ac_subst_vars
2527 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 eval ac_val=\$$ac_var
2529 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 done | sort
2534 echo
2535
2536 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002539## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 echo
2541 for ac_var in $ac_subst_files
2542 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 eval ac_val=\$$ac_var
2544 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002547 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002548 done | sort
2549 echo
2550 fi
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002554## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002555## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 echo
2559 fi
2560 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 $as_echo "$as_me: caught signal $ac_signal"
2562 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002563 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 rm -f core *.core core.conftest.* &&
2565 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002568for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002570done
2571ac_signal=0
2572
2573# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002575
Matthias Kloseb9621712010-04-24 17:59:49 +00002576$as_echo "/* confdefs.h */" > confdefs.h
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578# Predefined preprocessor variables.
2579
2580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_NAME "$PACKAGE_NAME"
2582_ACEOF
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2586_ACEOF
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588cat >>confdefs.h <<_ACEOF
2589#define PACKAGE_VERSION "$PACKAGE_VERSION"
2590_ACEOF
2591
Martin v. Löwis11437992002-04-12 09:54:03 +00002592cat >>confdefs.h <<_ACEOF
2593#define PACKAGE_STRING "$PACKAGE_STRING"
2594_ACEOF
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596cat >>confdefs.h <<_ACEOF
2597#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2598_ACEOF
2599
Matthias Kloseb9621712010-04-24 17:59:49 +00002600cat >>confdefs.h <<_ACEOF
2601#define PACKAGE_URL "$PACKAGE_URL"
2602_ACEOF
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604
2605# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002606# Prefer an explicitly selected file to automatically selected ones.
2607ac_site_file1=NONE
2608ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002610 # We do not want a PATH search for config.site.
2611 case $CONFIG_SITE in #((
2612 -*) ac_site_file1=./$CONFIG_SITE;;
2613 */*) ac_site_file1=$CONFIG_SITE;;
2614 *) ac_site_file1=./$CONFIG_SITE;;
2615 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 ac_site_file1=$prefix/share/config.site
2618 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619else
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 ac_site_file1=$ac_default_prefix/share/config.site
2621 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002623for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624do
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 test "x$ac_site_file" = xNONE && continue
2626 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2628$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002630 . "$ac_site_file" \
2631 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2633as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002634See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002635 fi
2636done
2637
2638if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 # Some versions of bash will fail to source /dev/null (special files
2640 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2641 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2643$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2646 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 esac
2648 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002649else
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2651$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 >$cache_file
2653fi
2654
2655# Check that the precious variables saved in the cache have kept the same
2656# value.
2657ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2660 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2662 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 case $ac_old_set,$ac_new_set in
2664 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2666$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 +00002667 ac_cache_corrupted=: ;;
2668 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2670$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_cache_corrupted=: ;;
2672 ,);;
2673 *)
2674 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 # differences in whitespace do not lead to failure.
2676 ac_old_val_w=`echo x $ac_old_val`
2677 ac_new_val_w=`echo x $ac_new_val`
2678 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2680$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2681 ac_cache_corrupted=:
2682 else
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2684$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2685 eval $ac_var=\$ac_old_val
2686 fi
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2688$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2690$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 fi;;
2692 esac
2693 # Pass precious variables to config.status.
2694 if test "$ac_new_set" = set; then
2695 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002696 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 *) ac_arg=$ac_var=$ac_new_val ;;
2698 esac
2699 case " $ac_configure_args " in
2700 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 esac
2703 fi
2704done
2705if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2709$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002710 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002712## -------------------- ##
2713## Main body of script. ##
2714## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715
Guido van Rossum7f43da71994-08-01 12:15:30 +00002716ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002717ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002718ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2719ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2720ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721
Guido van Rossum627b2d71993-12-24 10:39:16 +00002722
Michael W. Hudson54241132001-12-07 15:38:26 +00002723
Trent Nelson4d4ec652012-10-16 08:51:24 -04002724BUILDDIR="`pwd`"
2725
2726
2727if test "$srcdir" != "$BUILDDIR"; then
2728 # If we're building out-of-tree, we need to make sure the following
2729 # resources get picked up before their $srcdir counterparts.
2730 # Objects/ -> typeslots.inc
2731 # Include/ -> Python-ast.h, graminit.h
2732 # Python/ -> importlib.h
2733 # (A side effect of this is that these resources will automatically be
2734 # regenerated when building out-of-tree, regardless of whether or not
2735 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2736 # off.)
2737 BASECPPFLAGS="-IObjects -IInclude -IPython"
2738else
2739 BASECPPFLAGS=""
2740fi
2741
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742
2743
2744
2745
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002746if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747then
2748# Extract the first word of "hg", so it can be a program name with args.
2749set dummy hg; ac_word=$2
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002752if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753 $as_echo_n "(cached) " >&6
2754else
2755 if test -n "$HAS_HG"; then
2756 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2757else
2758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2759for as_dir in $PATH
2760do
2761 IFS=$as_save_IFS
2762 test -z "$as_dir" && as_dir=.
2763 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002764 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 -05002765 ac_cv_prog_HAS_HG="found"
2766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2767 break 2
2768 fi
2769done
2770 done
2771IFS=$as_save_IFS
2772
2773 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2774fi
2775fi
2776HAS_HG=$ac_cv_prog_HAS_HG
2777if test -n "$HAS_HG"; then
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2779$as_echo "$HAS_HG" >&6; }
2780else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2782$as_echo "no" >&6; }
2783fi
2784
2785
2786else
2787HAS_HG=no-repository
2788fi
2789if test $HAS_HG = found
2790then
2791 HGVERSION="hg id -i \$(srcdir)"
2792 HGTAG="hg id -t \$(srcdir)"
2793 HGBRANCH="hg id -b \$(srcdir)"
2794else
2795 HGVERSION=""
2796 HGTAG=""
2797 HGBRANCH=""
2798fi
2799
2800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002802
2803
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002804ac_aux_dir=
2805for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2806 if test -f "$ac_dir/install-sh"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/install-sh -c"
2809 break
2810 elif test -f "$ac_dir/install.sh"; then
2811 ac_aux_dir=$ac_dir
2812 ac_install_sh="$ac_aux_dir/install.sh -c"
2813 break
2814 elif test -f "$ac_dir/shtool"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/shtool install -c"
2817 break
2818 fi
2819done
2820if test -z "$ac_aux_dir"; then
2821 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2822fi
2823
2824# These three variables are undocumented and unsupported,
2825# and are intended to be withdrawn in a future Autoconf release.
2826# They can cause serious problems if a builder's source tree is in a directory
2827# whose full name contains unusual characters.
2828ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2829ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2830ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2831
2832
2833# Make sure we can run config.sub.
2834$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2835 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2838$as_echo_n "checking build system type... " >&6; }
2839if ${ac_cv_build+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 ac_build_alias=$build_alias
2843test "x$ac_build_alias" = x &&
2844 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2845test "x$ac_build_alias" = x &&
2846 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2847ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2852$as_echo "$ac_cv_build" >&6; }
2853case $ac_cv_build in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2856esac
2857build=$ac_cv_build
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_build
2860shift
2861build_cpu=$1
2862build_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866build_os=$*
2867IFS=$ac_save_IFS
2868case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2869
2870
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2872$as_echo_n "checking host system type... " >&6; }
2873if ${ac_cv_host+:} false; then :
2874 $as_echo_n "(cached) " >&6
2875else
2876 if test "x$host_alias" = x; then
2877 ac_cv_host=$ac_cv_build
2878else
2879 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2880 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2881fi
2882
2883fi
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2885$as_echo "$ac_cv_host" >&6; }
2886case $ac_cv_host in
2887*-*-*) ;;
2888*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2889esac
2890host=$ac_cv_host
2891ac_save_IFS=$IFS; IFS='-'
2892set x $ac_cv_host
2893shift
2894host_cpu=$1
2895host_vendor=$2
2896shift; shift
2897# Remember, the first character of IFS is used to create $*,
2898# except with old shells:
2899host_os=$*
2900IFS=$ac_save_IFS
2901case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2902
2903
2904
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002905if test "$cross_compiling" = yes; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2907$as_echo_n "checking for python interpreter for cross build... " >&6; }
2908 if test -z "$PYTHON_FOR_BUILD"; then
2909 for interp in python$PACKAGE_VERSION python3 python; do
2910 which $interp >/dev/null 2>&1 || continue
2911 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2912 break
2913 fi
2914 interp=
2915 done
2916 if test x$interp = x; then
2917 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2918 fi
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2920$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002921 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 +02002922 fi
2923else
2924 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2925fi
2926
2927
Martin v. Löwis11437992002-04-12 09:54:03 +00002928
Benjamin Petersond23f8222009-04-05 19:13:16 +00002929if test "$prefix" != "/"; then
2930 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2931fi
2932
2933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934
2935
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002936# We don't use PACKAGE_ variables, and they cause conflicts
2937# with other autoconf-based packages that include Python.h
2938grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2939rm confdefs.h
2940mv confdefs.h.new confdefs.h
2941
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002942
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002943VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002944
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002945# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002946
2947SOVERSION=1.0
2948
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002949# The later defininition of _XOPEN_SOURCE disables certain features
2950# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2951
Matthias Kloseb9621712010-04-24 17:59:49 +00002952$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002953
2954
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002955# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2956# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2957# them.
2958
Matthias Kloseb9621712010-04-24 17:59:49 +00002959$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002960
2961
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002962# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2963# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2964# them.
2965
Matthias Kloseb9621712010-04-24 17:59:49 +00002966$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002967
2968
Martin v. Löwisd6320502004-08-12 13:45:08 +00002969# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2970# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002973
2974
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002980
2981
2982
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002983define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002985# Arguments passed to configure.
2986
2987CONFIG_ARGS="$ac_configure_args"
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2990$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002991# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002992if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002993 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002994 case $enableval in
2995 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002996 # Locate the best usable SDK, see Mac/README.txt for more
2997 # information
2998 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2999 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003000 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003001 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3002 if test ! -d "${enableval}"
3003 then
3004 enableval=/
3005 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003006 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007 ;;
3008 esac
3009 case $enableval in
3010 no)
3011 UNIVERSALSDK=
3012 enable_universalsdk=
3013 ;;
3014 *)
3015 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 if test ! -d "${UNIVERSALSDK}"
3017 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003018 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003019 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 ;;
3021 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003022
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024else
3025
3026 UNIVERSALSDK=
3027 enable_universalsdk=
3028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003029fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031if test -n "${UNIVERSALSDK}"
3032then
Matthias Kloseb9621712010-04-24 17:59:49 +00003033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3034$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035else
Matthias Kloseb9621712010-04-24 17:59:49 +00003036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3037$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003041
3042
Ned Deilycbfb9a52012-06-23 16:02:19 -07003043# For backward compatibility reasons we prefer to select '32-bit' if available,
3044# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003045UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003046if test "`uname -s`" = "Darwin"
3047then
3048 if test -n "${UNIVERSALSDK}"
3049 then
3050 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3051 then
3052 UNIVERSAL_ARCHS="intel"
3053 fi
3054 fi
3055fi
3056
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3059$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060
3061# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003062if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003063 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3065$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003066 UNIVERSAL_ARCHS="$withval"
3067
3068else
3069
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3071$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003072
3073fi
3074
3075
3076
3077
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003078
3079# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003080if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003081 withval=$with_framework_name;
3082 PYTHONFRAMEWORK=${withval}
3083 PYTHONFRAMEWORKDIR=${withval}.framework
3084 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3085
3086else
3087
3088 PYTHONFRAMEWORK=Python
3089 PYTHONFRAMEWORKDIR=Python.framework
3090 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3091
3092fi
3093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003094# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003095if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003097 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003098 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003099 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 esac
3101 case $enableval in
3102 no)
3103 PYTHONFRAMEWORK=
3104 PYTHONFRAMEWORKDIR=no-framework
3105 PYTHONFRAMEWORKPREFIX=
3106 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107 FRAMEWORKINSTALLFIRST=
3108 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003109 FRAMEWORKALTINSTALLFIRST=
3110 FRAMEWORKALTINSTALLLAST=
3111 if test "x${prefix}" = "xNONE"; then
3112 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3113 else
3114 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3115 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003117 ;;
3118 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003119 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003120 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003122 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003123 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3124 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003125 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 if test "x${prefix}" = "xNONE" ; then
3128 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003129
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003133
3134 case "${enableval}" in
3135 /System*)
3136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3137 if test "${prefix}" = "NONE" ; then
3138 # See below
3139 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3140 fi
3141 ;;
3142
3143 /Library*)
3144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3145 ;;
3146
3147 */Library/Frameworks)
3148 MDIR="`dirname "${enableval}"`"
3149 MDIR="`dirname "${MDIR}"`"
3150 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3151
3152 if test "${prefix}" = "NONE"; then
3153 # User hasn't specified the
3154 # --prefix option, but wants to install
3155 # the framework in a non-default location,
3156 # ensure that the compatibility links get
3157 # installed relative to that prefix as well
3158 # instead of in /usr/local.
3159 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3160 fi
3161 ;;
3162
3163 *)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 ;;
3166 esac
3167
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003169
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003170 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003176 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3177
3178 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3179
Jack Jansene578a632001-08-15 01:27:14 +00003180 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003181
Guido van Rossum563e7081996-09-10 18:20:48 +00003182else
Martin v. Löwis11437992002-04-12 09:54:03 +00003183
Jack Jansene578a632001-08-15 01:27:14 +00003184 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003186 PYTHONFRAMEWORKPREFIX=
3187 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188 FRAMEWORKINSTALLFIRST=
3189 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003190 FRAMEWORKALTINSTALLFIRST=
3191 FRAMEWORKALTINSTALLLAST=
3192 if test "x${prefix}" = "xNONE" ; then
3193 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3194 else
3195 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3196 fi
Jack Jansene578a632001-08-15 01:27:14 +00003197 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003198
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200fi
3201
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202
3203
Michael W. Hudson54241132001-12-07 15:38:26 +00003204
3205
3206
3207
Jack Jansene578a632001-08-15 01:27:14 +00003208
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209
3210
3211
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003212
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003215## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003216## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003217##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218# Set name for machine-dependent library files
3219
Matthias Kloseb9621712010-04-24 17:59:49 +00003220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3221$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003222if test -z "$MACHDEP"
3223then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003224 # avoid using uname for cross builds
3225 if test "$cross_compiling" = yes; then
3226 # ac_sys_system and ac_sys_release are only used for setting
3227 # `define_xopen_source' in the case statement below. For the
3228 # current supported cross builds, this macro is not adjusted.
3229 case "$host" in
3230 *-*-linux*)
3231 ac_sys_system=Linux
3232 ;;
3233 *-*-cygwin*)
3234 ac_sys_system=Cygwin
3235 ;;
3236 *)
3237 # for now, limit cross builds to known configurations
3238 MACHDEP="unknown"
3239 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3240 esac
3241 ac_sys_release=
3242 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003243 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003244 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003245 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003246 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003248 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 fi
3251 ac_md_system=`echo $ac_sys_system |
3252 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3253 ac_md_release=`echo $ac_sys_release |
3254 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3255 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003256
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003258 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003259 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003260 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003261 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003262 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003263 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264fi
Guido van Rossum91922671997-10-09 20:24:13 +00003265
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003266
3267if test "$cross_compiling" = yes; then
3268 case "$host" in
3269 *-*-linux*)
3270 case "$host_cpu" in
3271 arm*)
3272 _host_cpu=arm
3273 ;;
3274 *)
3275 _host_cpu=$host_cpu
3276 esac
3277 ;;
3278 *-*-cygwin*)
3279 _host_cpu=
3280 ;;
3281 *)
3282 # for now, limit cross builds to known configurations
3283 MACHDEP="unknown"
3284 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3285 esac
3286 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3287fi
3288
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003289# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3290# disable features if it is defined, without any means to access these
3291# features as extensions. For these systems, we skip the definition of
3292# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3293# some feature, make sure there is no alternative way to access this
3294# feature. Also, when using wildcards, make sure you have verified the
3295# need for not defining _XOPEN_SOURCE on all systems matching the
3296# wildcard, and that the wildcard does not include future systems
3297# (which may remove their limitations).
3298case $ac_sys_system/$ac_sys_release in
3299 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3300 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003301 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003302 # In addition, Stefan Krah confirms that issue #1244610 exists through
3303 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003304 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003305 define_xopen_source=no
3306 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3307 # also defined. This can be overridden by defining _BSD_SOURCE
3308 # As this has a different meaning on Linux, only define it on OpenBSD
3309
Matthias Kloseb9621712010-04-24 17:59:49 +00003310$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003311
3312 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003313 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003314 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3315 # also defined. This can be overridden by defining _BSD_SOURCE
3316 # As this has a different meaning on Linux, only define it on OpenBSD
3317
Matthias Kloseb9621712010-04-24 17:59:49 +00003318$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003319
3320 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003321 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3322 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3323 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003324 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 +00003325 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003326 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3327 # request to enable features supported by the standard as a request
3328 # to disable features not supported by the standard. The best way
3329 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3330 # entirely and define __EXTENSIONS__ instead.
3331 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003332 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003333 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3334 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003335 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003336 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003337 define_xopen_source=no;;
3338 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003339 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003340 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003341 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003342 # On FreeBSD 4, the math functions C89 does not cover are never defined
3343 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3344 FreeBSD/4.*)
3345 define_xopen_source=no;;
3346 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3347 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3348 # identifies itself as Darwin/7.*
3349 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3350 # disables platform specific features beyond repair.
3351 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3352 # has no effect, don't bother defining them
3353 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003354 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003355 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003356 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003357 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3358 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3359 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003360 AIX/4)
3361 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003362 AIX/5)
3363 if test `uname -r` -eq 1; then
3364 define_xopen_source=no
3365 fi
3366 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003367 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3368 # defining NI_NUMERICHOST.
3369 QNX/6.3.2)
3370 define_xopen_source=no
3371 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003372
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003373esac
3374
3375if test $define_xopen_source = yes
3376then
Victor Stinner14d098d2011-09-07 22:29:43 +02003377 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003378
Victor Stinner14d098d2011-09-07 22:29:43 +02003379$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003380
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003381
3382 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3383 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3384 # several APIs are not declared. Since this is also needed in some
3385 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003386
Matthias Kloseb9621712010-04-24 17:59:49 +00003387$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003388
3389
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003390
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003391$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003392
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393fi
3394
Guido van Rossum91922671997-10-09 20:24:13 +00003395#
3396# SGI compilers allow the specification of the both the ABI and the
3397# ISA on the command line. Depending on the values of these switches,
3398# different and often incompatable code will be generated.
3399#
3400# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3401# thus supply support for various ABI/ISA combinations. The MACHDEP
3402# variable is also adjusted.
3403#
3404
3405if test ! -z "$SGI_ABI"
3406then
3407 CC="cc $SGI_ABI"
3408 LDFLAGS="$SGI_ABI $LDFLAGS"
3409 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3412$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003413
Jack Jansen6b08a402004-06-03 12:41:45 +00003414# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3415# it may influence the way we can build extensions, so distutils
3416# needs to check it
3417
Thomas Wouters477c8d52006-05-27 19:21:47 +00003418
Jack Jansen6b08a402004-06-03 12:41:45 +00003419CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003420EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003421
Guido van Rossum627b2d71993-12-24 10:39:16 +00003422# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003423
3424# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3425# for debug/optimization stuff. BASECFLAGS is for flags that are required
3426# just to get things to compile and link. Users are free to override OPT
3427# when running configure or make. The build should not break if they do.
3428# BASECFLAGS should generally not be messed with, however.
3429
3430# XXX shouldn't some/most/all of this code be merged with the stuff later
3431# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3433$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003434
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003435# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003436if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003438 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003439 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003440 without_gcc=yes;;
3441 yes) CC=gcc
3442 without_gcc=no;;
3443 *) CC=$withval
3444 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003445 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003446else
Martin v. Löwis11437992002-04-12 09:54:03 +00003447
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003448 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003449 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003450 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003451 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003452 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003453fi
3454
Matthias Kloseb9621712010-04-24 17:59:49 +00003455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3456$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003457
Guido van Rossum8b131c51995-03-09 14:10:13 +00003458# If the user switches compilers, we can't believe the cache
3459if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3460then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003461 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003462(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003463fi
3464
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003465# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3466# when the compiler supports them, but we don't always want -O2, and
3467# we set -g later.
3468if test -z "$CFLAGS"; then
3469 CFLAGS=
3470fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003471
3472if test "$ac_sys_system" = "Darwin"
3473then
3474 # Compiler selection on MacOSX is more complicated than
3475 # AC_PROG_CC can handle, see Mac/README.txt for more
3476 # information
3477 if test -z "${CC}"
3478 then
3479 found_gcc=
3480 found_clang=
3481 as_save_IFS=$IFS; IFS=:
3482 for as_dir in $PATH
3483 do
3484 IFS=$as_save_IFS
3485 if test -x $as_dir/gcc; then
3486 if test -z "${found_gcc}"; then
3487 found_gcc=$as_dir/gcc
3488 fi
3489 fi
3490 if test -x $as_dir/clang; then
3491 if test -z "${found_clang}"; then
3492 found_clang=$as_dir/clang
3493 fi
3494 fi
3495 done
3496 IFS=$as_save_IFS
3497
3498 if test -n "$found_gcc" -a -n "$found_clang"
3499 then
3500 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3501 then
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3503$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3504 CC="$found_clang"
3505 CXX="$found_clang++"
3506 fi
3507
3508
3509 elif test -z "$found_gcc" -a -n "$found_clang"
3510 then
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3512$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3513 CC="$found_clang"
3514 CXX="$found_clang++"
3515
3516 elif test -z "$found_gcc" -a -z "$found_clang"
3517 then
3518 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3519 if test -n "${found_clang}"
3520 then
3521 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3522$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3523 CC="${found_clang}"
3524 CXX="`/usr/bin/xcrun -find clang++`"
3525
3526 # else: use default behaviour
3527 fi
3528 fi
3529 fi
3530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003531ac_ext=c
3532ac_cpp='$CPP $CPPFLAGS'
3533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3535ac_compiler_gnu=$ac_cv_c_compiler_gnu
3536if test -n "$ac_tool_prefix"; then
3537 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3538set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3540$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003541if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003543else
3544 if test -n "$CC"; then
3545 ac_cv_prog_CC="$CC" # Let the user override the test.
3546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3548for as_dir in $PATH
3549do
3550 IFS=$as_save_IFS
3551 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003553 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 +00003554 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 $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 +00003556 break 2
3557 fi
3558done
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Jack Jansendd19cf82001-12-06 22:36:17 +00003562fi
3563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003564CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003565if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3567$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003568else
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3570$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573
Martin v. Löwis11437992002-04-12 09:54:03 +00003574fi
3575if test -z "$ac_cv_prog_CC"; then
3576 ac_ct_CC=$CC
3577 # Extract the first word of "gcc", so it can be a program name with args.
3578set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003581if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003583else
3584 if test -n "$ac_ct_CC"; then
3585 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3586else
3587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588for as_dir in $PATH
3589do
3590 IFS=$as_save_IFS
3591 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003593 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 +00003594 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $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 +00003596 break 2
3597 fi
3598done
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
3602fi
3603fi
3604ac_ct_CC=$ac_cv_prog_ac_ct_CC
3605if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3607$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3610$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 if test "x$ac_ct_CC" = x; then
3614 CC=""
3615 else
3616 case $cross_compiling:$ac_tool_warned in
3617yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620ac_tool_warned=yes ;;
3621esac
3622 CC=$ac_ct_CC
3623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
3625 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003626fi
3627
Jack Jansendd19cf82001-12-06 22:36:17 +00003628if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629 if test -n "$ac_tool_prefix"; then
3630 # 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 +00003631set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003634if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003636else
3637 if test -n "$CC"; then
3638 ac_cv_prog_CC="$CC" # Let the user override the test.
3639else
Martin v. Löwis11437992002-04-12 09:54:03 +00003640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003646 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 +00003647 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
3655fi
3656fi
3657CC=$ac_cv_prog_CC
3658if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3660$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668fi
3669if test -z "$CC"; then
3670 # Extract the first word of "cc", so it can be a program name with args.
3671set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003674if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 if test -n "$CC"; then
3678 ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003680 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003687 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 +00003688 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3689 ac_prog_rejected=yes
3690 continue
3691 fi
3692 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $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 +00003694 break 2
3695 fi
3696done
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003699
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700if test $ac_prog_rejected = yes; then
3701 # We found a bogon in the path, so make sure we never use it.
3702 set dummy $ac_cv_prog_CC
3703 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 # We chose a different compiler from the bogus one.
3706 # However, it has the same basename, so the bogon will be chosen
3707 # first if we set CC to just the basename; use the full file name.
3708 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003709 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710 fi
3711fi
3712fi
3713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3717$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718else
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3720$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721fi
3722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723
Martin v. Löwis11437992002-04-12 09:54:03 +00003724fi
3725if test -z "$CC"; then
3726 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 do
3729 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003745 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 +00003746 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $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 +00003748 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003750done
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
3754fi
3755fi
3756CC=$ac_cv_prog_CC
3757if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 test -n "$CC" && break
3767 done
3768fi
3769if test -z "$CC"; then
3770 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003772do
3773 # Extract the first word of "$ac_prog", so it can be a program name with args.
3774set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3776$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003777if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003779else
3780 if test -n "$ac_ct_CC"; then
3781 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3782else
3783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3784for as_dir in $PATH
3785do
3786 IFS=$as_save_IFS
3787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003789 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 +00003790 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 $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 +00003792 break 2
3793 fi
3794done
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003797
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
3799fi
3800ac_ct_CC=$ac_cv_prog_ac_ct_CC
3801if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3803$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 test -n "$ac_ct_CC" && break
3811done
Michael W. Hudson54241132001-12-07 15:38:26 +00003812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 if test "x$ac_ct_CC" = x; then
3814 CC=""
3815 else
3816 case $cross_compiling:$ac_tool_warned in
3817yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820ac_tool_warned=yes ;;
3821esac
3822 CC=$ac_ct_CC
3823 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
3825
3826fi
3827
3828
Matthias Kloseb9621712010-04-24 17:59:49 +00003829test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003831as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003832See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833
3834# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003835$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3836set X $ac_compile
3837ac_compiler=$2
3838for ac_option in --version -v -V -qversion; do
3839 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840case "(($ac_try" in
3841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3842 *) ac_try_echo=$ac_try;;
3843esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3845$as_echo "$ac_try_echo"; } >&5
3846 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 if test -s conftest.err; then
3849 sed '10a\
3850... rest of stderr output deleted ...
3851 10q' conftest.err >conftest.er1
3852 cat conftest.er1 >&5
3853 fi
3854 rm -f conftest.er1 conftest.err
3855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3856 test $ac_status = 0; }
3857done
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
Matthias Kloseb9621712010-04-24 17:59:49 +00003859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003860/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862int
3863main ()
3864{
3865
3866 ;
3867 return 0;
3868}
3869_ACEOF
3870ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003871ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003872# Try to create an executable without -o first, disregard a.out.
3873# It will help us diagnose broken compilers, and finding out an intuition
3874# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3876$as_echo_n "checking whether the C compiler works... " >&6; }
3877ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3878
3879# The possible output files:
3880ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882ac_rmfiles=
3883for ac_file in $ac_files
3884do
3885 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3888 esac
3889done
3890rm -f $ac_rmfiles
3891
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3904# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3905# in a Makefile. We should not override ac_cv_exeext if it was cached,
3906# so that the user can short-circuit this test for compilers unknown to
3907# Autoconf.
3908for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003909do
3910 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003913 ;;
3914 [ab].out )
3915 # We found the default executable, but exeext='' is most
3916 # certainly right.
3917 break;;
3918 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920 then :; else
3921 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3922 fi
3923 # We set ac_cv_exeext here because the later test for it is not
3924 # safe: cross compilers may not add the suffix if given an `-o'
3925 # argument, so we may need to know it at that point already.
3926 # Even if this section looks crufty: it has the advantage of
3927 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928 break;;
3929 * )
3930 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 esac
3932done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933test "$ac_cv_exeext" = no && ac_cv_exeext=
3934
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003935else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 ac_file=''
3937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003938if test -z "$ac_file"; then :
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3940$as_echo "no" >&6; }
3941$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003942sed 's/^/| /' conftest.$ac_ext >&5
3943
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003946as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003947See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003948else
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3950$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3953$as_echo_n "checking for C compiler default output file name... " >&6; }
3954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3955$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957
Matthias Kloseb9621712010-04-24 17:59:49 +00003958rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3961$as_echo_n "checking for suffix of executables... " >&6; }
3962if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963case "(($ac_try" in
3964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3965 *) ac_try_echo=$ac_try;;
3966esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3968$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3972 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003973 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3974# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3975# work properly (i.e., refer to `conftest.exe'), while it won't with
3976# `rm'.
3977for ac_file in conftest.exe conftest conftest.*; do
3978 test -f "$ac_file" || continue
3979 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3982 break;;
3983 * ) break;;
3984 esac
3985done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003986else
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003989as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003990See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003992rm -f conftest conftest$ac_cv_exeext
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3994$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995
3996rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003997EXEEXT=$ac_cv_exeext
3998ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4000/* end confdefs.h. */
4001#include <stdio.h>
4002int
4003main ()
4004{
4005FILE *f = fopen ("conftest.out", "w");
4006 return ferror (f) || fclose (f) != 0;
4007
4008 ;
4009 return 0;
4010}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004012ac_clean_files="$ac_clean_files conftest.out"
4013# Check that the compiler produces executables we can run. If not, either
4014# the compiler is broken, or we cross compile.
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4016$as_echo_n "checking whether we are cross compiling... " >&6; }
4017if test "$cross_compiling" != yes; then
4018 { { ac_try="$ac_link"
4019case "(($ac_try" in
4020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4021 *) ac_try_echo=$ac_try;;
4022esac
4023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4024$as_echo "$ac_try_echo"; } >&5
4025 (eval "$ac_link") 2>&5
4026 ac_status=$?
4027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4028 test $ac_status = 0; }
4029 if { ac_try='./conftest$ac_cv_exeext'
4030 { { case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
4034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035$as_echo "$ac_try_echo"; } >&5
4036 (eval "$ac_try") 2>&5
4037 ac_status=$?
4038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; }; then
4040 cross_compiling=no
4041 else
4042 if test "$cross_compiling" = maybe; then
4043 cross_compiling=yes
4044 else
4045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004047as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004048If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 fi
4051 fi
4052fi
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4054$as_echo "$cross_compiling" >&6; }
4055
4056rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4057ac_clean_files=$ac_clean_files_save
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4059$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004060if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 $as_echo_n "(cached) " >&6
4062else
4063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064/* end confdefs.h. */
4065
4066int
4067main ()
4068{
4069
4070 ;
4071 return 0;
4072}
4073_ACEOF
4074rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004075if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4081$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004083 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4085 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086 for ac_file in conftest.o conftest.obj conftest.*; do
4087 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004090 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4091 break;;
4092 esac
4093done
4094else
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004096sed 's/^/| /' conftest.$ac_ext >&5
4097
Matthias Kloseb9621712010-04-24 17:59:49 +00004098{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004100as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004101See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004103rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4106$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004107OBJEXT=$ac_cv_objext
4108ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4110$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004111if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004113else
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004116
Martin v. Löwis11437992002-04-12 09:54:03 +00004117int
4118main ()
4119{
4120#ifndef __GNUC__
4121 choke me
4122#endif
4123
4124 ;
4125 return 0;
4126}
4127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 ac_compiler_gnu=yes
4130else
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004134ac_cv_c_compiler_gnu=$ac_compiler_gnu
4135
4136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4138$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4139if test $ac_compiler_gnu = yes; then
4140 GCC=yes
4141else
4142 GCC=
4143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004144ac_test_CFLAGS=${CFLAGS+set}
4145ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4147$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004150else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 ac_save_c_werror_flag=$ac_c_werror_flag
4152 ac_c_werror_flag=yes
4153 ac_cv_prog_cc_g=no
4154 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158int
4159main ()
4160{
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004167 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004168else
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 CFLAGS=""
4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004171/* end confdefs.h. */
4172
4173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182
Matthias Kloseb9621712010-04-24 17:59:49 +00004183else
4184 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187/* end confdefs.h. */
4188
4189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205 ac_c_werror_flag=$ac_save_c_werror_flag
4206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4208$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004211elif test $ac_cv_prog_cc_g = yes; then
4212 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004213 CFLAGS="-g -O2"
4214 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216 fi
4217else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004218 if test "$GCC" = yes; then
4219 CFLAGS="-O2"
4220 else
4221 CFLAGS=
4222 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4225$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004226if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004228else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004230ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004232/* end confdefs.h. */
4233#include <stdarg.h>
4234#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004235#include <sys/types.h>
4236#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004237/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4238struct buf { int x; };
4239FILE * (*rcsopen) (struct buf *, struct stat *, int);
4240static char *e (p, i)
4241 char **p;
4242 int i;
4243{
4244 return p[i];
4245}
4246static char *f (char * (*g) (char **, int), char **p, ...)
4247{
4248 char *s;
4249 va_list v;
4250 va_start (v,p);
4251 s = g (p, va_arg (v,int));
4252 va_end (v);
4253 return s;
4254}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004255
4256/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4257 function prototypes and stuff, but not '\xHH' hex character constants.
4258 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4261 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004263int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4266 inside strings and character constants. */
4267#define FOO(x) 'x'
4268int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4269
Skip Montanaro6dead952003-09-25 14:50:04 +00004270int test (int i, double x);
4271struct s1 {int (*f) (int a);};
4272struct s2 {int (*f) (double a);};
4273int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4274int argc;
4275char **argv;
4276int
4277main ()
4278{
4279return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4280 ;
4281 return 0;
4282}
4283_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4285 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004286do
4287 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f core conftest.err conftest.$ac_objext
4292 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004293done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004295CC=$ac_save_CC
4296
4297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298# AC_CACHE_VAL
4299case "x$ac_cv_prog_cc_c89" in
4300 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4302$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4305$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004306 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4309$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004310esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004312
Matthias Kloseb9621712010-04-24 17:59:49 +00004313fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004314
Martin v. Löwis11437992002-04-12 09:54:03 +00004315ac_ext=c
4316ac_cpp='$CPP $CPPFLAGS'
4317ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4318ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4319ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004321
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004322
4323
Matthias Kloseb9621712010-04-24 17:59:49 +00004324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4325$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004328if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004330
4331 case $withval in
4332 no) with_cxx_main=no
4333 MAINCC='$(CC)';;
4334 yes) with_cxx_main=yes
4335 MAINCC='$(CXX)';;
4336 *) with_cxx_main=yes
4337 MAINCC=$withval
4338 if test -z "$CXX"
4339 then
4340 CXX=$withval
4341 fi;;
4342 esac
4343else
4344
4345 with_cxx_main=no
4346 MAINCC='$(CC)'
4347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348fi
4349
Matthias Kloseb9621712010-04-24 17:59:49 +00004350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4351$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004352
4353preset_cxx="$CXX"
4354if test -z "$CXX"
4355then
4356 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004357 gcc) if test -n "$ac_tool_prefix"; then
4358 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4359set dummy ${ac_tool_prefix}g++; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if ${ac_cv_path_CXX+:} false; then :
4363 $as_echo_n "(cached) " >&6
4364else
4365 case $CXX in
4366 [\\/]* | ?:[\\/]*)
4367 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4368 ;;
4369 *)
4370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in notfound
4372do
4373 IFS=$as_save_IFS
4374 test -z "$as_dir" && as_dir=.
4375 for ac_exec_ext in '' $ac_executable_extensions; do
4376 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379 break 2
4380 fi
4381done
4382 done
4383IFS=$as_save_IFS
4384
4385 ;;
4386esac
4387fi
4388CXX=$ac_cv_path_CXX
4389if test -n "$CXX"; then
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4391$as_echo "$CXX" >&6; }
4392else
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398fi
4399if test -z "$ac_cv_path_CXX"; then
4400 ac_pt_CXX=$CXX
4401 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004402set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4404$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004405if ${ac_cv_path_ac_pt_CXX+:} false; then :
4406 $as_echo_n "(cached) " >&6
4407else
4408 case $ac_pt_CXX in
4409 [\\/]* | ?:[\\/]*)
4410 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4411 ;;
4412 *)
4413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4414for as_dir in notfound
4415do
4416 IFS=$as_save_IFS
4417 test -z "$as_dir" && as_dir=.
4418 for ac_exec_ext in '' $ac_executable_extensions; do
4419 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4420 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4421 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4422 break 2
4423 fi
4424done
4425 done
4426IFS=$as_save_IFS
4427
4428 ;;
4429esac
4430fi
4431ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4432if test -n "$ac_pt_CXX"; then
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4434$as_echo "$ac_pt_CXX" >&6; }
4435else
4436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4437$as_echo "no" >&6; }
4438fi
4439
4440 if test "x$ac_pt_CXX" = x; then
4441 CXX="g++"
4442 else
4443 case $cross_compiling:$ac_tool_warned in
4444yes:)
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4447ac_tool_warned=yes ;;
4448esac
4449 CXX=$ac_pt_CXX
4450 fi
4451else
4452 CXX="$ac_cv_path_CXX"
4453fi
4454 ;;
4455 cc) if test -n "$ac_tool_prefix"; then
4456 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4457set dummy ${ac_tool_prefix}c++; ac_word=$2
4458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4459$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004460if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004462else
4463 case $CXX in
4464 [\\/]* | ?:[\\/]*)
4465 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4466 ;;
4467 *)
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in notfound
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004474 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 +00004475 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477 break 2
4478 fi
4479done
Matthias Kloseb9621712010-04-24 17:59:49 +00004480 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004481IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004482
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004483 ;;
4484esac
4485fi
4486CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004487if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4489$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004490else
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004494
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004495
4496fi
4497if test -z "$ac_cv_path_CXX"; then
4498 ac_pt_CXX=$CXX
4499 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004500set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4502$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004503if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004506 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004508 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 +00004509 ;;
4510 *)
4511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4512for as_dir in notfound
4513do
4514 IFS=$as_save_IFS
4515 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4518 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004520 break 2
4521 fi
4522done
Matthias Kloseb9621712010-04-24 17:59:49 +00004523 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004524IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004525
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004526 ;;
4527esac
4528fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004529ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4530if test -n "$ac_pt_CXX"; then
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4532$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533else
Matthias Kloseb9621712010-04-24 17:59:49 +00004534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4535$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004537
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004538 if test "x$ac_pt_CXX" = x; then
4539 CXX="c++"
4540 else
4541 case $cross_compiling:$ac_tool_warned in
4542yes:)
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4545ac_tool_warned=yes ;;
4546esac
4547 CXX=$ac_pt_CXX
4548 fi
4549else
4550 CXX="$ac_cv_path_CXX"
4551fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004552 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004553 clang|*/clang) if test -n "$ac_tool_prefix"; then
4554 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4555set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557$as_echo_n "checking for $ac_word... " >&6; }
4558if ${ac_cv_path_CXX+:} false; then :
4559 $as_echo_n "(cached) " >&6
4560else
4561 case $CXX in
4562 [\\/]* | ?:[\\/]*)
4563 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4564 ;;
4565 *)
4566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in notfound
4568do
4569 IFS=$as_save_IFS
4570 test -z "$as_dir" && as_dir=.
4571 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004572 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 -07004573 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575 break 2
4576 fi
4577done
4578 done
4579IFS=$as_save_IFS
4580
Ned Deilycbfb9a52012-06-23 16:02:19 -07004581 ;;
4582esac
4583fi
4584CXX=$ac_cv_path_CXX
4585if test -n "$CXX"; then
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4587$as_echo "$CXX" >&6; }
4588else
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590$as_echo "no" >&6; }
4591fi
4592
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593
4594fi
4595if test -z "$ac_cv_path_CXX"; then
4596 ac_pt_CXX=$CXX
4597 # Extract the first word of "clang++", so it can be a program name with args.
4598set dummy clang++; ac_word=$2
4599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4600$as_echo_n "checking for $ac_word... " >&6; }
4601if ${ac_cv_path_ac_pt_CXX+:} false; then :
4602 $as_echo_n "(cached) " >&6
4603else
4604 case $ac_pt_CXX in
4605 [\\/]* | ?:[\\/]*)
4606 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4607 ;;
4608 *)
4609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4610for as_dir in notfound
4611do
4612 IFS=$as_save_IFS
4613 test -z "$as_dir" && as_dir=.
4614 for ac_exec_ext in '' $ac_executable_extensions; do
4615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4616 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4618 break 2
4619 fi
4620done
4621 done
4622IFS=$as_save_IFS
4623
4624 ;;
4625esac
4626fi
4627ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4628if test -n "$ac_pt_CXX"; then
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4630$as_echo "$ac_pt_CXX" >&6; }
4631else
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4633$as_echo "no" >&6; }
4634fi
4635
4636 if test "x$ac_pt_CXX" = x; then
4637 CXX="clang++"
4638 else
4639 case $cross_compiling:$ac_tool_warned in
4640yes:)
4641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4643ac_tool_warned=yes ;;
4644esac
4645 CXX=$ac_pt_CXX
4646 fi
4647else
4648 CXX="$ac_cv_path_CXX"
4649fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004650 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004651 esac
4652 if test "$CXX" = "notfound"
4653 then
4654 CXX=""
4655 fi
4656fi
4657if test -z "$CXX"
4658then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004659 if test -n "$ac_tool_prefix"; then
4660 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4661 do
4662 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4663set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4665$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004666if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004667 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668else
4669 if test -n "$CXX"; then
4670 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4671else
4672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in $PATH
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4679 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681 break 2
4682 fi
4683done
Matthias Kloseb9621712010-04-24 17:59:49 +00004684 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004685IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004686
4687fi
4688fi
4689CXX=$ac_cv_prog_CXX
4690if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4692$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693else
Matthias Kloseb9621712010-04-24 17:59:49 +00004694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004696fi
4697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004698
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 test -n "$CXX" && break
4700 done
4701fi
4702if test -z "$CXX"; then
4703 ac_ct_CXX=$CXX
4704 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4705do
4706 # Extract the first word of "$ac_prog", so it can be a program name with args.
4707set dummy $ac_prog; ac_word=$2
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
4710if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4711 $as_echo_n "(cached) " >&6
4712else
4713 if test -n "$ac_ct_CXX"; then
4714 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4715else
4716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719 IFS=$as_save_IFS
4720 test -z "$as_dir" && as_dir=.
4721 for ac_exec_ext in '' $ac_executable_extensions; do
4722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723 ac_cv_prog_ac_ct_CXX="$ac_prog"
4724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725 break 2
4726 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004727done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728 done
4729IFS=$as_save_IFS
4730
4731fi
4732fi
4733ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4734if test -n "$ac_ct_CXX"; then
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4736$as_echo "$ac_ct_CXX" >&6; }
4737else
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743 test -n "$ac_ct_CXX" && break
4744done
4745
4746 if test "x$ac_ct_CXX" = x; then
4747 CXX="notfound"
4748 else
4749 case $cross_compiling:$ac_tool_warned in
4750yes:)
4751{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4752$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4753ac_tool_warned=yes ;;
4754esac
4755 CXX=$ac_ct_CXX
4756 fi
4757fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758
4759 if test "$CXX" = "notfound"
4760 then
4761 CXX=""
4762 fi
4763fi
4764if test "$preset_cxx" != "$CXX"
4765then
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767
4768 By default, distutils will build C++ extension modules with \"$CXX\".
4769 If this is not intended, then set CXX on the configure command line.
4770 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004771$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772
4773 By default, distutils will build C++ extension modules with \"$CXX\".
4774 If this is not intended, then set CXX on the configure command line.
4775 " >&2;}
4776fi
4777
4778
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4780$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4781save_LDFLAGS="$LDFLAGS"
4782LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004783
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785/* end confdefs.h. */
4786
4787int
4788main ()
4789{
4790
4791 ;
4792 return 0;
4793}
4794_ACEOF
4795if ac_fn_c_try_link "$LINENO"; then :
4796 NO_AS_NEEDED="-Wl,--no-as-needed"
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4798$as_echo "yes" >&6; }
4799else
4800 NO_AS_NEEDED=""
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
4803fi
4804rm -f core conftest.err conftest.$ac_objext \
4805 conftest$ac_exeext conftest.$ac_ext
4806LDFLAGS="$save_LDFLAGS"
4807
4808
4809
4810# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004811ac_ext=c
4812ac_cpp='$CPP $CPPFLAGS'
4813ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4814ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4815ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4817$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004818# On Suns, sometimes $CPP names a directory.
4819if test -n "$CPP" && test -d "$CPP"; then
4820 CPP=
4821fi
4822if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004823 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004824 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004825else
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 # Double quotes because CPP needs to be expanded
4827 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4828 do
4829 ac_preproc_ok=false
4830for ac_c_preproc_warn_flag in '' yes
4831do
4832 # Use a header file that comes with gcc, so configuring glibc
4833 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004834 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4835 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004836 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004837 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004839/* end confdefs.h. */
4840#ifdef __STDC__
4841# include <limits.h>
4842#else
4843# include <assert.h>
4844#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004845 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004847if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004848
Matthias Kloseb9621712010-04-24 17:59:49 +00004849else
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 # Broken: fails on valid input.
4851continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004852fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004853rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004855 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004859#include <ac_nonexistent.h>
4860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004861if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004862 # Broken: success on invalid input.
4863continue
4864else
Martin v. Löwis11437992002-04-12 09:54:03 +00004865 # Passes both tests.
4866ac_preproc_ok=:
4867break
4868fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004869rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004870
4871done
4872# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004873rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004874if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 break
4876fi
4877
4878 done
4879 ac_cv_prog_CPP=$CPP
4880
4881fi
4882 CPP=$ac_cv_prog_CPP
4883else
4884 ac_cv_prog_CPP=$CPP
4885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4887$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004888ac_preproc_ok=false
4889for ac_c_preproc_warn_flag in '' yes
4890do
4891 # Use a header file that comes with gcc, so configuring glibc
4892 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004893 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4894 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 # On the NeXT, cc -E runs the code through the compiler's parser,
4896 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004898/* end confdefs.h. */
4899#ifdef __STDC__
4900# include <limits.h>
4901#else
4902# include <assert.h>
4903#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004904 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004906if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004907
Matthias Kloseb9621712010-04-24 17:59:49 +00004908else
Martin v. Löwis11437992002-04-12 09:54:03 +00004909 # Broken: fails on valid input.
4910continue
4911fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004912rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004913
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004914 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004915 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004918#include <ac_nonexistent.h>
4919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004920if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Broken: success on invalid input.
4922continue
4923else
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # Passes both tests.
4925ac_preproc_ok=:
4926break
4927fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004928rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004929
4930done
4931# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004932rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004933if $ac_preproc_ok; then :
4934
Martin v. Löwis11437992002-04-12 09:54:03 +00004935else
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004938as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004939See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004940fi
4941
4942ac_ext=c
4943ac_cpp='$CPP $CPPFLAGS'
4944ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4945ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4946ac_compiler_gnu=$ac_cv_c_compiler_gnu
4947
4948
Matthias Kloseb9621712010-04-24 17:59:49 +00004949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4950$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004951if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004953else
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004955 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004956 # Loop through the user's path and test for each of PROGNAME-LIST
4957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004958for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4959do
4960 IFS=$as_save_IFS
4961 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 for ac_prog in grep ggrep; do
4963 for ac_exec_ext in '' $ac_executable_extensions; do
4964 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004965 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004966# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004967 # Check for GNU $ac_path_GREP
4968case `"$ac_path_GREP" --version 2>&1` in
4969*GNU*)
4970 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4971*)
4972 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004973 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004974 while :
4975 do
4976 cat "conftest.in" "conftest.in" >"conftest.tmp"
4977 mv "conftest.tmp" "conftest.in"
4978 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4981 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004983 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4984 # Best one so far, save it but keep looking for a better one
4985 ac_cv_path_GREP="$ac_path_GREP"
4986 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004987 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004988 # 10*(2^10) chars as input seems more than enough
4989 test $ac_count -gt 10 && break
4990 done
4991 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4992esac
4993
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 $ac_path_GREP_found && break 3
4995 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004999 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005000 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 +00005001 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005002else
5003 ac_cv_path_GREP=$GREP
5004fi
5005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5008$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005009 GREP="$ac_cv_path_GREP"
5010
5011
Matthias Kloseb9621712010-04-24 17:59:49 +00005012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5013$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005014if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005015 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005016else
5017 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5018 then ac_cv_path_EGREP="$GREP -E"
5019 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005021 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 # Loop through the user's path and test for each of PROGNAME-LIST
5023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005024for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5025do
5026 IFS=$as_save_IFS
5027 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 for ac_prog in egrep; do
5029 for ac_exec_ext in '' $ac_executable_extensions; do
5030 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005031 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005032# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033 # Check for GNU $ac_path_EGREP
5034case `"$ac_path_EGREP" --version 2>&1` in
5035*GNU*)
5036 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5037*)
5038 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040 while :
5041 do
5042 cat "conftest.in" "conftest.in" >"conftest.tmp"
5043 mv "conftest.tmp" "conftest.in"
5044 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5047 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5050 # Best one so far, save it but keep looking for a better one
5051 ac_cv_path_EGREP="$ac_path_EGREP"
5052 ac_path_EGREP_max=$ac_count
5053 fi
5054 # 10*(2^10) chars as input seems more than enough
5055 test $ac_count -gt 10 && break
5056 done
5057 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5058esac
5059
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 $ac_path_EGREP_found && break 3
5061 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005066 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 +00005067 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068else
5069 ac_cv_path_EGREP=$EGREP
5070fi
5071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072 fi
5073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5075$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005077
5078
Matthias Kloseb9621712010-04-24 17:59:49 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5080$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005081if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo_n "(cached) " >&6
5083else
5084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005085/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005086#include <stdlib.h>
5087#include <stdarg.h>
5088#include <string.h>
5089#include <float.h>
5090
5091int
5092main ()
5093{
5094
5095 ;
5096 return 0;
5097}
5098_ACEOF
5099if ac_fn_c_try_compile "$LINENO"; then :
5100 ac_cv_header_stdc=yes
5101else
5102 ac_cv_header_stdc=no
5103fi
5104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5105
5106if test $ac_cv_header_stdc = yes; then
5107 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5109/* end confdefs.h. */
5110#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005111
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005112_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005115
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005116else
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005118fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005119rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005120
Matthias Kloseb9621712010-04-24 17:59:49 +00005121fi
5122
5123if test $ac_cv_header_stdc = yes; then
5124 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126/* end confdefs.h. */
5127#include <stdlib.h>
5128
5129_ACEOF
5130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5131 $EGREP "free" >/dev/null 2>&1; then :
5132
5133else
5134 ac_cv_header_stdc=no
5135fi
5136rm -f conftest*
5137
5138fi
5139
5140if test $ac_cv_header_stdc = yes; then
5141 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5142 if test "$cross_compiling" = yes; then :
5143 :
5144else
5145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5146/* end confdefs.h. */
5147#include <ctype.h>
5148#include <stdlib.h>
5149#if ((' ' & 0x0FF) == 0x020)
5150# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5151# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5152#else
5153# define ISLOWER(c) \
5154 (('a' <= (c) && (c) <= 'i') \
5155 || ('j' <= (c) && (c) <= 'r') \
5156 || ('s' <= (c) && (c) <= 'z'))
5157# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5158#endif
5159
5160#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5161int
5162main ()
5163{
5164 int i;
5165 for (i = 0; i < 256; i++)
5166 if (XOR (islower (i), ISLOWER (i))
5167 || toupper (i) != TOUPPER (i))
5168 return 2;
5169 return 0;
5170}
5171_ACEOF
5172if ac_fn_c_try_run "$LINENO"; then :
5173
5174else
5175 ac_cv_header_stdc=no
5176fi
5177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5178 conftest.$ac_objext conftest.beam conftest.$ac_ext
5179fi
5180
5181fi
5182fi
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5184$as_echo "$ac_cv_header_stdc" >&6; }
5185if test $ac_cv_header_stdc = yes; then
5186
5187$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5188
5189fi
5190
5191# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5192for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5193 inttypes.h stdint.h unistd.h
5194do :
5195 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5196ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5197"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005198if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005199 cat >>confdefs.h <<_ACEOF
5200#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5201_ACEOF
5202
5203fi
5204
5205done
5206
5207
5208
5209 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 +02005210if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005211 MINIX=yes
5212else
5213 MINIX=
5214fi
5215
5216
5217 if test "$MINIX" = yes; then
5218
5219$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5220
5221
5222$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5223
5224
5225$as_echo "#define _MINIX 1" >>confdefs.h
5226
5227 fi
5228
5229
5230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5231$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005232if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005233 $as_echo_n "(cached) " >&6
5234else
5235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5236/* end confdefs.h. */
5237
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005238# define __EXTENSIONS__ 1
5239 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005240int
5241main ()
5242{
5243
5244 ;
5245 return 0;
5246}
5247_ACEOF
5248if ac_fn_c_try_compile "$LINENO"; then :
5249 ac_cv_safe_to_define___extensions__=yes
5250else
5251 ac_cv_safe_to_define___extensions__=no
5252fi
5253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5254fi
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5256$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5257 test $ac_cv_safe_to_define___extensions__ = yes &&
5258 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5259
5260 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5261
5262 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5263
5264 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5265
5266 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5267
5268
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005270# Check for unsupported systems
5271case $ac_sys_system/$ac_sys_release in
5272atheos*|Linux*/1*)
5273 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5274 echo See README for details.
5275 exit 1;;
5276esac
5277
5278
Matthias Kloseb9621712010-04-24 17:59:49 +00005279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5280$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005281
5282# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005283if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284 withval=$with_suffix;
5285 case $withval in
5286 no) EXEEXT=;;
5287 yes) EXEEXT=.exe;;
5288 *) EXEEXT=$withval;;
5289 esac
5290fi
5291
Matthias Kloseb9621712010-04-24 17:59:49 +00005292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5293$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294
5295# Test whether we're running on a non-case-sensitive system, in which
5296# case we give a warning if no ext is given
5297
Matthias Kloseb9621712010-04-24 17:59:49 +00005298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5299$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300if test ! -d CaseSensitiveTestDir; then
5301mkdir CaseSensitiveTestDir
5302fi
5303
5304if test -d casesensitivetestdir
5305then
Matthias Kloseb9621712010-04-24 17:59:49 +00005306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5307$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308 BUILDEXEEXT=.exe
5309else
Matthias Kloseb9621712010-04-24 17:59:49 +00005310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005312 BUILDEXEEXT=$EXEEXT
5313fi
5314rmdir CaseSensitiveTestDir
5315
5316case $MACHDEP in
5317bsdos*)
5318 case $CC in
5319 gcc) CC="$CC -D_HAVE_BSDI";;
5320 esac;;
5321esac
5322
5323case $ac_sys_system in
5324hp*|HP*)
5325 case $CC in
5326 cc|*/cc) CC="$CC -Ae";;
5327 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005328esac
5329
5330
5331
Matthias Kloseb9621712010-04-24 17:59:49 +00005332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5333$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334if test -z "$LIBRARY"
5335then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005336 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5339$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
5341# LDLIBRARY is the name of the library to link against (as opposed to the
5342# name of the library into which to insert object files). BLDLIBRARY is also
5343# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5344# is blank as the main program is not linked directly against LDLIBRARY.
5345# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5346# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5347# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5348# DLLLIBRARY is the shared (i.e., DLL) library.
5349#
5350# RUNSHARED is used to run shared python without installed libraries
5351#
5352# INSTSONAME is the name of the shared library that will be use to install
5353# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005354#
5355# LDVERSION is the shared library version number, normally the Python version
5356# with the ABI build flags appended.
5357
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358
5359
5360
5361
5362
5363
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365LDLIBRARY="$LIBRARY"
5366BLDLIBRARY='$(LDLIBRARY)'
5367INSTSONAME='$(LDLIBRARY)'
5368DLLLIBRARY=''
5369LDLIBRARYDIR=''
5370RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005371LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372
5373# LINKCC is the command that links the python executable -- default is $(CC).
5374# If CXX is set, and if it is needed to link a main function that was
5375# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5376# python might then depend on the C++ runtime
5377# This is altered for AIX in order to build the export list before
5378# linking.
5379
Matthias Kloseb9621712010-04-24 17:59:49 +00005380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5381$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382if test -z "$LINKCC"
5383then
5384 LINKCC='$(PURIFY) $(MAINCC)'
5385 case $ac_sys_system in
5386 AIX*)
5387 exp_extra="\"\""
5388 if test $ac_sys_release -ge 5 -o \
5389 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5390 exp_extra="."
5391 fi
5392 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 QNX*)
5394 # qcc must be used because the other compilers do not
5395 # support -N.
5396 LINKCC=qcc;;
5397 esac
5398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5400$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5403# make sure we default having it set to "no": this is used by
5404# distutils.unixccompiler to know if it should add --enable-new-dtags
5405# to linker command lines, and failing to detect GNU ld simply results
5406# in the same bahaviour as before.
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5409$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410ac_prog=ld
5411if test "$GCC" = yes; then
5412 ac_prog=`$CC -print-prog-name=ld`
5413fi
5414case `"$ac_prog" -V 2>&1 < /dev/null` in
5415 *GNU*)
5416 GNULD=yes;;
5417 *)
5418 GNULD=no;;
5419esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5421$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5424$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005425if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005426 $as_echo_n "(cached) " >&6
5427else
5428 ac_cv_c_inline=no
5429for ac_kw in inline __inline__ __inline; do
5430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5431/* end confdefs.h. */
5432#ifndef __cplusplus
5433typedef int foo_t;
5434static $ac_kw foo_t static_foo () {return 0; }
5435$ac_kw foo_t foo () {return 0; }
5436#endif
5437
5438_ACEOF
5439if ac_fn_c_try_compile "$LINENO"; then :
5440 ac_cv_c_inline=$ac_kw
5441fi
5442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443 test "$ac_cv_c_inline" != no && break
5444done
5445
5446fi
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5448$as_echo "$ac_cv_c_inline" >&6; }
5449
5450case $ac_cv_c_inline in
5451 inline | yes) ;;
5452 *)
5453 case $ac_cv_c_inline in
5454 no) ac_val=;;
5455 *) ac_val=$ac_cv_c_inline;;
5456 esac
5457 cat >>confdefs.h <<_ACEOF
5458#ifndef __cplusplus
5459#define inline $ac_val
5460#endif
5461_ACEOF
5462 ;;
5463esac
5464
5465if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005466
5467$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005468
5469
5470fi
5471
5472
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5474$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005476if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005477 enableval=$enable_shared;
5478fi
5479
5480
5481if test -z "$enable_shared"
5482then
5483 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005484 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 enable_shared="yes";;
5486 *)
5487 enable_shared="no";;
5488 esac
5489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5491$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492
Matthias Kloseb9621712010-04-24 17:59:49 +00005493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5494$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005496if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005497 enableval=$enable_profiling;
5498fi
5499
5500if test "x$enable_profiling" = xyes; then
5501 ac_save_cc="$CC"
5502 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504/* end confdefs.h. */
5505int main() { return 0; }
5506_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005507if ac_fn_c_try_link "$LINENO"; then :
5508
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005510 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005511fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005512rm -f core conftest.err conftest.$ac_objext \
5513 conftest$ac_exeext conftest.$ac_ext
5514 CC="$ac_save_cc"
5515else
5516 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5519$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520
doko@ubuntu.comba015832012-06-30 16:52:05 +02005521if test "x$enable_profiling" = xyes; then
5522 BASECFLAGS="-pg $BASECFLAGS"
5523 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524fi
5525
Matthias Kloseb9621712010-04-24 17:59:49 +00005526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5527$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528
5529# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5530# library that we build, but we do not want to link against it (we
5531# will find it with a -framework option). For this reason there is an
5532# extra variable BLDLIBRARY against which Python and the extension
5533# modules are linked, BLDLIBRARY. This is normally the same as
5534# LDLIBRARY, but empty for MacOSX framework builds.
5535if test "$enable_framework"
5536then
5537 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5538 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5539 BLDLIBRARY=''
5540else
5541 BLDLIBRARY='$(LDLIBRARY)'
5542fi
5543
5544# Other platforms follow
5545if test $enable_shared = "yes"; then
5546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548
5549 case $ac_sys_system in
5550 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005551 LDLIBRARY='libpython$(LDVERSION).dll.a'
5552 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553 ;;
5554 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005555 LDLIBRARY='libpython$(LDVERSION).so'
5556 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5558 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005559 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005560 then
5561 PY3LIBRARY=libpython3.so
5562 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005564 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005565 LDLIBRARY='libpython$(LDVERSION).so'
5566 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5568 case $ac_sys_system in
5569 FreeBSD*)
5570 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5571 ;;
5572 esac
5573 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005574 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005575 then
5576 PY3LIBRARY=libpython3.so
5577 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578 ;;
5579 hp*|HP*)
5580 case `uname -m` in
5581 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005582 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 ;;
5584 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005585 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586 ;;
5587 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005588 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5590 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005592 LDLIBRARY='libpython$(LDVERSION).dylib'
5593 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5595 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005596 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005597 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005598 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5599 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600
5601 esac
5602else # shared is disabled
5603 case $ac_sys_system in
5604 CYGWIN*)
5605 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005606 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ;;
5608 esac
5609fi
5610
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005611if test "$cross_compiling" = yes; then
5612 RUNSHARED=
5613fi
5614
Matthias Kloseb9621712010-04-24 17:59:49 +00005615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5616$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
5618if test -n "$ac_tool_prefix"; then
5619 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5620set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005623if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625else
5626 if test -n "$RANLIB"; then
5627 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5628else
5629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5630for as_dir in $PATH
5631do
5632 IFS=$as_save_IFS
5633 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005634 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005635 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 +00005636 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 break 2
5639 fi
5640done
Matthias Kloseb9621712010-04-24 17:59:49 +00005641 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642IFS=$as_save_IFS
5643
5644fi
5645fi
5646RANLIB=$ac_cv_prog_RANLIB
5647if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5649$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650else
Matthias Kloseb9621712010-04-24 17:59:49 +00005651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5652$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653fi
5654
5655
5656fi
5657if test -z "$ac_cv_prog_RANLIB"; then
5658 ac_ct_RANLIB=$RANLIB
5659 # Extract the first word of "ranlib", so it can be a program name with args.
5660set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5662$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005663if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665else
5666 if test -n "$ac_ct_RANLIB"; then
5667 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5668else
5669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5670for as_dir in $PATH
5671do
5672 IFS=$as_save_IFS
5673 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005675 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 +00005676 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 break 2
5679 fi
5680done
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682IFS=$as_save_IFS
5683
5684fi
5685fi
5686ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5687if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5689$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690else
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693fi
5694
5695 if test "x$ac_ct_RANLIB" = x; then
5696 RANLIB=":"
5697 else
5698 case $cross_compiling:$ac_tool_warned in
5699yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702ac_tool_warned=yes ;;
5703esac
5704 RANLIB=$ac_ct_RANLIB
5705 fi
5706else
5707 RANLIB="$ac_cv_prog_RANLIB"
5708fi
5709
5710
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005711if test -n "$ac_tool_prefix"; then
5712 for ac_prog in ar aal
5713 do
5714 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5715set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005718if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720else
5721 if test -n "$AR"; then
5722 ac_cv_prog_AR="$AR" # Let the user override the test.
5723else
5724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5725for as_dir in $PATH
5726do
5727 IFS=$as_save_IFS
5728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005730 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5731 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733 break 2
5734 fi
5735done
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737IFS=$as_save_IFS
5738
5739fi
5740fi
5741AR=$ac_cv_prog_AR
5742if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5744$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745else
Matthias Kloseb9621712010-04-24 17:59:49 +00005746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
5749
5750
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005751 test -n "$AR" && break
5752 done
5753fi
5754if test -z "$AR"; then
5755 ac_ct_AR=$AR
5756 for ac_prog in ar aal
5757do
5758 # Extract the first word of "$ac_prog", so it can be a program name with args.
5759set dummy $ac_prog; ac_word=$2
5760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5761$as_echo_n "checking for $ac_word... " >&6; }
5762if ${ac_cv_prog_ac_ct_AR+:} false; then :
5763 $as_echo_n "(cached) " >&6
5764else
5765 if test -n "$ac_ct_AR"; then
5766 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5767else
5768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5769for as_dir in $PATH
5770do
5771 IFS=$as_save_IFS
5772 test -z "$as_dir" && as_dir=.
5773 for ac_exec_ext in '' $ac_executable_extensions; do
5774 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5775 ac_cv_prog_ac_ct_AR="$ac_prog"
5776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5777 break 2
5778 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005780 done
5781IFS=$as_save_IFS
5782
5783fi
5784fi
5785ac_ct_AR=$ac_cv_prog_ac_ct_AR
5786if test -n "$ac_ct_AR"; then
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5788$as_echo "$ac_ct_AR" >&6; }
5789else
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792fi
5793
5794
5795 test -n "$ac_ct_AR" && break
5796done
5797
5798 if test "x$ac_ct_AR" = x; then
5799 AR="ar"
5800 else
5801 case $cross_compiling:$ac_tool_warned in
5802yes:)
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5805ac_tool_warned=yes ;;
5806esac
5807 AR=$ac_ct_AR
5808 fi
5809fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810
5811
5812# tweak ARFLAGS only if the user didn't set it on the command line
5813
5814if test -z "$ARFLAGS"
5815then
5816 ARFLAGS="rc"
5817fi
5818
doko@ubuntu.com58844492012-06-30 18:25:32 +02005819if test -n "$ac_tool_prefix"; then
5820 for ac_prog in readelf
5821 do
5822 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5823set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5825$as_echo_n "checking for $ac_word... " >&6; }
5826if ${ac_cv_prog_READELF+:} false; then :
5827 $as_echo_n "(cached) " >&6
5828else
5829 if test -n "$READELF"; then
5830 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5831else
5832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5833for as_dir in $PATH
5834do
5835 IFS=$as_save_IFS
5836 test -z "$as_dir" && as_dir=.
5837 for ac_exec_ext in '' $ac_executable_extensions; do
5838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5839 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5841 break 2
5842 fi
5843done
5844 done
5845IFS=$as_save_IFS
5846
5847fi
5848fi
5849READELF=$ac_cv_prog_READELF
5850if test -n "$READELF"; then
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5852$as_echo "$READELF" >&6; }
5853else
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855$as_echo "no" >&6; }
5856fi
5857
5858
5859 test -n "$READELF" && break
5860 done
5861fi
5862if test -z "$READELF"; then
5863 ac_ct_READELF=$READELF
5864 for ac_prog in readelf
5865do
5866 # Extract the first word of "$ac_prog", so it can be a program name with args.
5867set dummy $ac_prog; ac_word=$2
5868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5869$as_echo_n "checking for $ac_word... " >&6; }
5870if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5871 $as_echo_n "(cached) " >&6
5872else
5873 if test -n "$ac_ct_READELF"; then
5874 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5875else
5876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5877for as_dir in $PATH
5878do
5879 IFS=$as_save_IFS
5880 test -z "$as_dir" && as_dir=.
5881 for ac_exec_ext in '' $ac_executable_extensions; do
5882 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5883 ac_cv_prog_ac_ct_READELF="$ac_prog"
5884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5885 break 2
5886 fi
5887done
5888 done
5889IFS=$as_save_IFS
5890
5891fi
5892fi
5893ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5894if test -n "$ac_ct_READELF"; then
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5896$as_echo "$ac_ct_READELF" >&6; }
5897else
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5899$as_echo "no" >&6; }
5900fi
5901
5902
5903 test -n "$ac_ct_READELF" && break
5904done
5905
5906 if test "x$ac_ct_READELF" = x; then
5907 READELF=":"
5908 else
5909 case $cross_compiling:$ac_tool_warned in
5910yes:)
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5913ac_tool_warned=yes ;;
5914esac
5915 READELF=$ac_ct_READELF
5916 fi
5917fi
5918
5919if test "$cross_compiling" = yes; then
5920 case "$READELF" in
5921 readelf|:)
5922 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5923 ;;
5924 esac
5925fi
5926
5927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005929DISABLE_ASDLGEN=""
5930# Extract the first word of "python", so it can be a program name with args.
5931set dummy python; ac_word=$2
5932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005934if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005935 $as_echo_n "(cached) " >&6
5936else
5937 if test -n "$HAS_PYTHON"; then
5938 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5939else
5940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943 IFS=$as_save_IFS
5944 test -z "$as_dir" && as_dir=.
5945 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005947 ac_cv_prog_HAS_PYTHON="found"
5948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5949 break 2
5950 fi
5951done
5952 done
5953IFS=$as_save_IFS
5954
5955 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5956fi
5957fi
5958HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5959if test -n "$HAS_PYTHON"; then
5960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5961$as_echo "$HAS_PYTHON" >&6; }
5962else
5963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
5965fi
5966
5967
5968if test $HAS_HG != found -o $HAS_PYTHON != found
5969then
5970 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5971fi
5972
5973
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974case $MACHDEP in
5975bsdos*|hp*|HP*)
5976 # install -d does not work on BSDI or HP-UX
5977 if test -z "$INSTALL"
5978 then
5979 INSTALL="${srcdir}/install-sh -c"
5980 fi
5981esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982# Find a good install program. We prefer a C program (faster),
5983# so one script is as good as another. But avoid the broken or
5984# incompatible versions:
5985# SysV /etc/install, /usr/sbin/install
5986# SunOS /usr/etc/install
5987# IRIX /sbin/install
5988# AIX /bin/install
5989# AmigaOS /C/install, which installs bootblocks on floppy discs
5990# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5991# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5992# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5993# OS/2's system install, which has a completely different semantic
5994# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005995# Reject install programs that cannot install multiple files.
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5997$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005999if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001else
6002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005 IFS=$as_save_IFS
6006 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 # Account for people who put trailing slashes in PATH elements.
6008case $as_dir/ in #((
6009 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006011 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 /usr/ucb/* ) ;;
6013 *)
6014 # OSF1 and SCO ODT 3.0 have their own names for install.
6015 # Don't use installbsd from OSF since it installs stuff as root
6016 # by default.
6017 for ac_prog in ginstall scoinst install; do
6018 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006019 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 +00006020 if test $ac_prog = install &&
6021 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6022 # AIX install. It has an incompatible calling convention.
6023 :
6024 elif test $ac_prog = install &&
6025 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6026 # program-specific install script used by HP pwplus--don't use.
6027 :
6028 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 rm -rf conftest.one conftest.two conftest.dir
6030 echo one > conftest.one
6031 echo two > conftest.two
6032 mkdir conftest.dir
6033 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6034 test -s conftest.one && test -s conftest.two &&
6035 test -s conftest.dir/conftest.one &&
6036 test -s conftest.dir/conftest.two
6037 then
6038 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6039 break 3
6040 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 fi
6042 fi
6043 done
6044 done
6045 ;;
6046esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006047
6048 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049IFS=$as_save_IFS
6050
Matthias Kloseb9621712010-04-24 17:59:49 +00006051rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052
6053fi
6054 if test "${ac_cv_path_install+set}" = set; then
6055 INSTALL=$ac_cv_path_install
6056 else
6057 # As a last resort, use the slow shell script. Don't cache a
6058 # value for INSTALL within a source directory, because that will
6059 # break other packages using the cache if that directory is
6060 # removed, or if the value is a relative name.
6061 INSTALL=$ac_install_sh
6062 fi
6063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6065$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066
6067# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6068# It thinks the first close brace ends the variable substitution.
6069test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6070
6071test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6072
6073test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6074
Matthias Klose93a0ef12012-03-15 18:08:34 +01006075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6076$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6077if test -z "$MKDIR_P"; then
6078 if ${ac_cv_path_mkdir+:} false; then :
6079 $as_echo_n "(cached) " >&6
6080else
6081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6082for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6083do
6084 IFS=$as_save_IFS
6085 test -z "$as_dir" && as_dir=.
6086 for ac_prog in mkdir gmkdir; do
6087 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006088 { 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 +01006089 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6090 'mkdir (GNU coreutils) '* | \
6091 'mkdir (coreutils) '* | \
6092 'mkdir (fileutils) '4.1*)
6093 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6094 break 3;;
6095 esac
6096 done
6097 done
6098 done
6099IFS=$as_save_IFS
6100
6101fi
6102
6103 test -d ./--version && rmdir ./--version
6104 if test "${ac_cv_path_mkdir+set}" = set; then
6105 MKDIR_P="$ac_cv_path_mkdir -p"
6106 else
6107 # As a last resort, use the slow shell script. Don't cache a
6108 # value for MKDIR_P within a source directory, because that will
6109 # break other packages using the cache if that directory is
6110 # removed, or if the value is a relative name.
6111 MKDIR_P="$ac_install_sh -d"
6112 fi
6113fi
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6115$as_echo "$MKDIR_P" >&6; }
6116
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117
6118# Not every filesystem supports hard links
6119
6120if test -z "$LN" ; then
6121 case $ac_sys_system in
6122 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006123 *) LN=ln;;
6124 esac
6125fi
6126
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006127# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006128
6129ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006130
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006131# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6133$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134
6135# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006136if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137 withval=$with_pydebug;
6138if test "$withval" != no
6139then
6140
Matthias Kloseb9621712010-04-24 17:59:49 +00006141$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6144$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006146 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006147else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149fi
6150else
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6152$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153fi
6154
6155
6156# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6157# merged with this chunk of code?
6158
6159# Optimizer/debugger flags
6160# ------------------------
6161# (The following bit of code is complicated enough - please keep things
6162# indented properly. Just pretend you're editing Python code. ;-)
6163
6164# There are two parallel sets of case statements below, one that checks to
6165# see if OPT was set and one that does BASECFLAGS setting based upon
6166# compiler and platform. BASECFLAGS tweaks need to be made even if the
6167# user set OPT.
6168
6169# tweak OPT based on compiler and platform, only if the user didn't set
6170# it on the command line
6171
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006172if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173then
6174 case $GCC in
6175 yes)
6176 if test "$CC" != 'g++' ; then
6177 STRICT_PROTO="-Wstrict-prototypes"
6178 fi
6179 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6180 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6181 WRAP="-fwrapv"
6182 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006183
6184 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006185 case $CC in
6186 *clang*) WRAP="-fwrapv"
6187 ;;
6188 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 case $ac_cv_prog_cc_g in
6191 yes)
6192 if test "$Py_DEBUG" = 'true' ; then
6193 # Optimization messes up debuggers, so turn it off for
6194 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006195 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 else
6197 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6198 fi
6199 ;;
6200 *)
6201 OPT="-O3 -Wall $STRICT_PROTO"
6202 ;;
6203 esac
6204 case $ac_sys_system in
6205 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6206 ;;
6207 esac
6208 ;;
6209
6210 *)
6211 OPT="-O"
6212 ;;
6213 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214fi
6215
6216
6217
6218# The -arch flags for universal builds on OSX
6219UNIVERSAL_ARCH_FLAGS=
6220
6221
6222# tweak BASECFLAGS based on compiler and platform
6223case $GCC in
6224yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006225 # Python doesn't violate C99 aliasing rules, but older versions of
6226 # GCC produce warnings for legal Python code. Enable
6227 # -fno-strict-aliasing on versions of GCC that support but produce
6228 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6230$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 ac_save_cc="$CC"
6232 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006233 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006234 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006235 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006236else
Matthias Kloseb9621712010-04-24 17:59:49 +00006237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006239
Matthias Kloseb159a552010-04-25 21:00:44 +00006240
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006241int
6242main ()
6243{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006244
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006245 ;
6246 return 0;
6247}
Matthias Kloseb159a552010-04-25 21:00:44 +00006248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006250if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006251
6252 CC="$ac_save_cc -fstrict-aliasing"
6253 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006255/* end confdefs.h. */
6256
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006257 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006258int
6259main ()
6260{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006261double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006262 ;
6263 return 0;
6264}
Matthias Kloseb159a552010-04-25 21:00:44 +00006265
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006267if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006268
6269 ac_cv_no_strict_aliasing=no
6270
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271else
Matthias Kloseb159a552010-04-25 21:00:44 +00006272
6273 ac_cv_no_strict_aliasing=yes
6274
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006275fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006277
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006278else
Matthias Kloseb159a552010-04-25 21:00:44 +00006279
6280 ac_cv_no_strict_aliasing=no
6281
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006284fi
6285
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006286 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6289$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006290 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291 then
6292 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6293 fi
6294
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6296$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6297 ac_save_cc="$CC"
6298 CC="$CC -Wunused-result -Werror"
6299 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006300 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006301 $as_echo_n "(cached) " >&6
6302else
6303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6304/* end confdefs.h. */
6305
6306
6307int
6308main ()
6309{
6310
6311 ;
6312 return 0;
6313}
6314
6315_ACEOF
6316if ac_fn_c_try_compile "$LINENO"; then :
6317
6318 ac_cv_disable_unused_result_warning=yes
6319
6320else
6321
6322 ac_cv_disable_unused_result_warning=no
6323
6324fi
6325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326fi
6327
6328 CFLAGS="$save_CFLAGS"
6329 CC="$ac_save_cc"
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6331$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6332
6333 if test $ac_cv_disable_unused_result_warning = yes
6334 then
6335 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6336 fi
6337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6339 # support. Without this, treatment of subnormals doesn't follow
6340 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006341 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342 alpha*)
6343 BASECFLAGS="$BASECFLAGS -mieee"
6344 ;;
6345 esac
6346
6347 case $ac_sys_system in
6348 SCO_SV*)
6349 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6350 ;;
6351 # is there any other compiler on Darwin besides gcc?
6352 Darwin*)
6353 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6354 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006355 if test "${CC}" = gcc
6356 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6358$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006359 case "${UNIVERSALSDK}" in
6360 */MacOSX10.4u.sdk)
6361 # Build using 10.4 SDK, force usage of gcc when the
6362 # compiler is gcc, otherwise the user will get very
6363 # confusing error messages when building on OSX 10.6
6364 CC=gcc-4.0
6365 CPP=cpp-4.0
6366 ;;
6367 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6369$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006370 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
6372
6373 if test "${enable_universalsdk}"; then
6374 UNIVERSAL_ARCH_FLAGS=""
6375 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6376 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6377 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006378 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6380 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006381 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006382 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383
6384 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6385 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006386 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006387 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006389 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6390 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006391 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006392 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006393
6394 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6395 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006396 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006397 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006400 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 +00006401
6402 fi
6403
6404
Ronald Oussoren666028b2010-04-18 19:07:43 +00006405 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6406 if test "${UNIVERSALSDK}" != "/"
6407 then
6408 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6409 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006410 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006411 fi
6412 fi
6413
6414 # Calculate the right deployment target for this build.
6415 #
6416 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006417 if test ${cur_target} '>' 10.2 && \
6418 test ${cur_target} '<' 10.6
6419 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006421 if test ${enable_universalsdk}; then
6422 if test "${UNIVERSAL_ARCHS}" = "all"; then
6423 # Ensure that the default platform for a
6424 # 4-way universal build is OSX 10.5,
6425 # that's the first OS release where
6426 # 4-way builds make sense.
6427 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006428
6429 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6430 cur_target='10.5'
6431
6432 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6433 cur_target='10.5'
6434
6435 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6436 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006437 fi
6438 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006439 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006440 # On Intel macs default to a deployment
6441 # target of 10.4, that's the first OSX
6442 # release with Intel support.
6443 cur_target="10.4"
6444 fi
6445 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 fi
6447 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6448
6449 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6450 # environment with a value that is the same as what we'll use
6451 # in the Makefile to ensure that we'll get the same compiler
6452 # environment during configure and build time.
6453 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6454 export MACOSX_DEPLOYMENT_TARGET
6455 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6456
6457 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 esac
6459 ;;
6460
6461*)
6462 case $ac_sys_system in
6463 OpenUNIX*|UnixWare*)
6464 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6465 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466 SCO_SV*)
6467 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6468 ;;
6469 esac
6470 ;;
6471esac
6472
6473if test "$Py_DEBUG" = 'true'; then
6474 :
6475else
6476 OPT="-DNDEBUG $OPT"
6477fi
6478
6479if test "$ac_arch_flags"
6480then
6481 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6482fi
6483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006484# Check whether GCC supports PyArg_ParseTuple format
6485if test "$GCC" = "yes"
6486then
Matthias Kloseb9621712010-04-24 17:59:49 +00006487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6488$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006489 save_CFLAGS=$CFLAGS
6490 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492/* end confdefs.h. */
6493
6494 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006495int
6496main ()
6497{
6498
6499 ;
6500 return 0;
6501}
Matthias Kloseb159a552010-04-25 21:00:44 +00006502
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006504if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505
Matthias Kloseb159a552010-04-25 21:00:44 +00006506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508
Matthias Kloseb159a552010-04-25 21:00:44 +00006509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006510$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512else
Matthias Kloseb159a552010-04-25 21:00:44 +00006513
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006515$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516
6517fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519 CFLAGS=$save_CFLAGS
6520fi
6521
6522# On some compilers, pthreads are available without further options
6523# (e.g. MacOS X). On some of these systems, the compiler will not
6524# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6525# So we have to see first whether pthreads are available without
6526# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6528$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006529if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006530 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531else
Matthias Kloseb9621712010-04-24 17:59:49 +00006532 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533 ac_cv_pthread_is_default=no
6534else
Matthias Kloseb9621712010-04-24 17:59:49 +00006535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006536/* end confdefs.h. */
6537
6538#include <pthread.h>
6539
6540void* routine(void* p){return NULL;}
6541
6542int main(){
6543 pthread_t p;
6544 if(pthread_create(&p,NULL,routine,NULL)!=0)
6545 return 1;
6546 (void)pthread_detach(p);
6547 return 0;
6548}
6549
6550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006551if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006552
6553 ac_cv_pthread_is_default=yes
6554 ac_cv_kthread=no
6555 ac_cv_pthread=no
6556
6557else
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6561 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562fi
6563
6564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565fi
6566
Matthias Kloseb9621712010-04-24 17:59:49 +00006567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6568$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569
6570
6571if test $ac_cv_pthread_is_default = yes
6572then
6573 ac_cv_kpthread=no
6574else
6575# -Kpthread, if available, provides the right #defines
6576# and linker options to make pthread_create available
6577# Some compilers won't report that they do not support -Kpthread,
6578# so we need to run a program to see whether it really made the
6579# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6581$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006582if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006583 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584else
6585 ac_save_cc="$CC"
6586CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006587if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588 ac_cv_kpthread=no
6589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591/* end confdefs.h. */
6592
6593#include <pthread.h>
6594
6595void* routine(void* p){return NULL;}
6596
6597int main(){
6598 pthread_t p;
6599 if(pthread_create(&p,NULL,routine,NULL)!=0)
6600 return 1;
6601 (void)pthread_detach(p);
6602 return 0;
6603}
6604
6605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006606if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006607 ac_cv_kpthread=yes
6608else
Matthias Kloseb9621712010-04-24 17:59:49 +00006609 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613fi
6614
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006615CC="$ac_save_cc"
6616fi
6617
Matthias Kloseb9621712010-04-24 17:59:49 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6619$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620fi
6621
6622if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6623then
6624# -Kthread, if available, provides the right #defines
6625# and linker options to make pthread_create available
6626# Some compilers won't report that they do not support -Kthread,
6627# so we need to run a program to see whether it really made the
6628# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6630$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006631if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633else
6634 ac_save_cc="$CC"
6635CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006636if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637 ac_cv_kthread=no
6638else
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640/* end confdefs.h. */
6641
6642#include <pthread.h>
6643
6644void* routine(void* p){return NULL;}
6645
6646int main(){
6647 pthread_t p;
6648 if(pthread_create(&p,NULL,routine,NULL)!=0)
6649 return 1;
6650 (void)pthread_detach(p);
6651 return 0;
6652}
6653
6654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006655if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656 ac_cv_kthread=yes
6657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662fi
6663
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664CC="$ac_save_cc"
6665fi
6666
Matthias Kloseb9621712010-04-24 17:59:49 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6668$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669fi
6670
6671if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6672then
6673# -pthread, if available, provides the right #defines
6674# and linker options to make pthread_create available
6675# Some compilers won't report that they do not support -pthread,
6676# so we need to run a program to see whether it really made the
6677# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6679$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006680if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006681 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682else
6683 ac_save_cc="$CC"
6684CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006685if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686 ac_cv_pthread=no
6687else
Matthias Kloseb9621712010-04-24 17:59:49 +00006688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689/* end confdefs.h. */
6690
6691#include <pthread.h>
6692
6693void* routine(void* p){return NULL;}
6694
6695int main(){
6696 pthread_t p;
6697 if(pthread_create(&p,NULL,routine,NULL)!=0)
6698 return 1;
6699 (void)pthread_detach(p);
6700 return 0;
6701}
6702
6703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006704if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705 ac_cv_pthread=yes
6706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713CC="$ac_save_cc"
6714fi
6715
Matthias Kloseb9621712010-04-24 17:59:49 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6717$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718fi
6719
6720# If we have set a CC compiler flag for thread support then
6721# check if it works for CXX, too.
6722ac_cv_cxx_thread=no
6723if test ! -z "$CXX"
6724then
Matthias Kloseb9621712010-04-24 17:59:49 +00006725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6726$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727ac_save_cxx="$CXX"
6728
6729if test "$ac_cv_kpthread" = "yes"
6730then
6731 CXX="$CXX -Kpthread"
6732 ac_cv_cxx_thread=yes
6733elif test "$ac_cv_kthread" = "yes"
6734then
6735 CXX="$CXX -Kthread"
6736 ac_cv_cxx_thread=yes
6737elif test "$ac_cv_pthread" = "yes"
6738then
6739 CXX="$CXX -pthread"
6740 ac_cv_cxx_thread=yes
6741fi
6742
6743if test $ac_cv_cxx_thread = yes
6744then
6745 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6746 $CXX -c conftest.$ac_ext 2>&5
6747 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6748 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6749 then
6750 ac_cv_cxx_thread=yes
6751 else
6752 ac_cv_cxx_thread=no
6753 fi
6754 rm -fr conftest*
6755fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6757$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758fi
6759CXX="$ac_save_cxx"
6760
6761
6762# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6764$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006765if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767else
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769/* end confdefs.h. */
6770#include <stdlib.h>
6771#include <stdarg.h>
6772#include <string.h>
6773#include <float.h>
6774
6775int
6776main ()
6777{
6778
6779 ;
6780 return 0;
6781}
6782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006783if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784 ac_cv_header_stdc=yes
6785else
Matthias Kloseb9621712010-04-24 17:59:49 +00006786 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6789
6790if test $ac_cv_header_stdc = yes; then
6791 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793/* end confdefs.h. */
6794#include <string.h>
6795
6796_ACEOF
6797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006798 $EGREP "memchr" >/dev/null 2>&1; then :
6799
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800else
6801 ac_cv_header_stdc=no
6802fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006803rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006804
6805fi
6806
6807if test $ac_cv_header_stdc = yes; then
6808 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810/* end confdefs.h. */
6811#include <stdlib.h>
6812
6813_ACEOF
6814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 $EGREP "free" >/dev/null 2>&1; then :
6816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817else
6818 ac_cv_header_stdc=no
6819fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006820rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821
6822fi
6823
6824if test $ac_cv_header_stdc = yes; then
6825 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006826 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827 :
6828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830/* end confdefs.h. */
6831#include <ctype.h>
6832#include <stdlib.h>
6833#if ((' ' & 0x0FF) == 0x020)
6834# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6835# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6836#else
6837# define ISLOWER(c) \
6838 (('a' <= (c) && (c) <= 'i') \
6839 || ('j' <= (c) && (c) <= 'r') \
6840 || ('s' <= (c) && (c) <= 'z'))
6841# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6842#endif
6843
6844#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6845int
6846main ()
6847{
6848 int i;
6849 for (i = 0; i < 256; i++)
6850 if (XOR (islower (i), ISLOWER (i))
6851 || toupper (i) != TOUPPER (i))
6852 return 2;
6853 return 0;
6854}
6855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006856if ac_fn_c_try_run "$LINENO"; then :
6857
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863fi
6864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865fi
6866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6868$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869if test $ac_cv_header_stdc = yes; then
6870
Matthias Kloseb9621712010-04-24 17:59:49 +00006871$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872
6873fi
6874
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006875ac_save_cppflags="$CPPFLAGS"
6876CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006877for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006878fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006879ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006880sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006881unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006882poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006883sys/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 +01006884sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006885sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006886sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006887sys/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 -07006888libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006889bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006890do :
6891 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6892ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006893if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006894 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006895#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006896_ACEOF
6897
6898fi
6899
Guido van Rossum627b2d71993-12-24 10:39:16 +00006900done
6901
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006902CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006904for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006905 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6907$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006908if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006910else
Matthias Kloseb9621712010-04-24 17:59:49 +00006911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006912/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006913#include <sys/types.h>
6914#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006915
Martin v. Löwis11437992002-04-12 09:54:03 +00006916int
6917main ()
6918{
6919if ((DIR *) 0)
6920return 0;
6921 ;
6922 return 0;
6923}
6924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006925if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006932eval ac_res=\$$as_ac_Header
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6934$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006935if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006937#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006938_ACEOF
6939
6940ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006941fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006943done
6944# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6945if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6947$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006948if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006949 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006950else
Martin v. Löwis11437992002-04-12 09:54:03 +00006951 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006955/* Override any GCC internal prototype to avoid an error.
6956 Use char because int might match the return type of a GCC
6957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006958#ifdef __cplusplus
6959extern "C"
6960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006961char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006966 ;
6967 return 0;
6968}
6969_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970for ac_lib in '' dir; do
6971 if test -z "$ac_lib"; then
6972 ac_res="none required"
6973 else
6974 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006980rm -f core conftest.err conftest.$ac_objext \
6981 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006982 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006983 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006985done
Victor Stinnere0be4232011-10-25 13:06:09 +02006986if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988else
6989 ac_cv_search_opendir=no
6990fi
6991rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006992LIBS=$ac_func_search_save_LIBS
6993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6995$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006996ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006997if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007001
Michael W. Hudson54241132001-12-07 15:38:26 +00007002else
Matthias Kloseb9621712010-04-24 17:59:49 +00007003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7004$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007005if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007007else
7008 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007010/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012/* Override any GCC internal prototype to avoid an error.
7013 Use char because int might match the return type of a GCC
7014 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007015#ifdef __cplusplus
7016extern "C"
7017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007018char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007019int
7020main ()
7021{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007023 ;
7024 return 0;
7025}
7026_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027for ac_lib in '' x; do
7028 if test -z "$ac_lib"; then
7029 ac_res="none required"
7030 else
7031 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007032 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007037rm -f core conftest.err conftest.$ac_objext \
7038 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007039 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042done
Victor Stinnere0be4232011-10-25 13:06:09 +02007043if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045else
7046 ac_cv_search_opendir=no
7047fi
7048rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007049LIBS=$ac_func_search_save_LIBS
7050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7052$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007054if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007057fi
7058
7059fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007060
Matthias Kloseb9621712010-04-24 17:59:49 +00007061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7062$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007063if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007065else
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007067/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007068#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007069int
7070main ()
7071{
7072return makedev(0, 0);
7073 ;
7074 return 0;
7075}
7076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007078 ac_cv_header_sys_types_h_makedev=yes
7079else
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082rm -f core conftest.err conftest.$ac_objext \
7083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007084
7085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7087$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007088
7089if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007090ac_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 +02007091if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007092
Matthias Kloseb9621712010-04-24 17:59:49 +00007093$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007094
7095fi
7096
7097
7098
7099 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007100 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 +02007101if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007102
Matthias Kloseb9621712010-04-24 17:59:49 +00007103$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007104
7105fi
7106
7107
7108 fi
7109fi
7110
Michael W. Hudson54241132001-12-07 15:38:26 +00007111
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007112# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7113for ac_header in net/if.h
7114do :
7115 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7116#ifdef STDC_HEADERS
7117# include <stdlib.h>
7118# include <stddef.h>
7119#else
7120# ifdef HAVE_STDLIB_H
7121# include <stdlib.h>
7122# endif
7123#endif
7124#ifdef HAVE_SYS_SOCKET_H
7125# include <sys/socket.h>
7126#endif
7127
7128"
Victor Stinnere0be4232011-10-25 13:06:09 +02007129if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007130 cat >>confdefs.h <<_ACEOF
7131#define HAVE_NET_IF_H 1
7132_ACEOF
7133
7134fi
7135
7136done
7137
7138
7139
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007140# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007141for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007142do :
7143 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007144#ifdef HAVE_CURSES_H
7145#include <curses.h>
7146#endif
7147
Matthias Kloseb9621712010-04-24 17:59:49 +00007148"
Victor Stinnere0be4232011-10-25 13:06:09 +02007149if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007150 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007151#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007152_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007153
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007154fi
7155
7156done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007157
7158
Martin v. Löwis11017b12006-01-14 18:12:57 +00007159# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007160for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007161do :
7162 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 +00007163#ifdef HAVE_ASM_TYPES_H
7164#include <asm/types.h>
7165#endif
7166#ifdef HAVE_SYS_SOCKET_H
7167#include <sys/socket.h>
7168#endif
7169
Matthias Kloseb9621712010-04-24 17:59:49 +00007170"
Victor Stinnere0be4232011-10-25 13:06:09 +02007171if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007172 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007173#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007174_ACEOF
7175
7176fi
7177
7178done
7179
7180
Charles-François Natali47413c12011-10-06 19:47:44 +02007181# On Linux, can.h and can/raw.h require sys/socket.h
7182for ac_header in linux/can.h linux/can/raw.h
7183do :
7184 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7185ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7186#ifdef HAVE_SYS_SOCKET_H
7187#include <sys/socket.h>
7188#endif
7189
7190"
7191if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7192 cat >>confdefs.h <<_ACEOF
7193#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7194_ACEOF
7195
7196fi
7197
7198done
7199
7200
Guido van Rossum627b2d71993-12-24 10:39:16 +00007201# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007202was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7204$as_echo_n "checking for clock_t in time.h... " >&6; }
7205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007206/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007208
7209_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007212 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007213else
Martin v. Löwis11437992002-04-12 09:54:03 +00007214
7215
Matthias Kloseb9621712010-04-24 17:59:49 +00007216$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007217
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007218
Guido van Rossum627b2d71993-12-24 10:39:16 +00007219fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007220rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007221
Matthias Kloseb9621712010-04-24 17:59:49 +00007222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7223$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007224
Matthias Kloseb9621712010-04-24 17:59:49 +00007225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7226$as_echo_n "checking for makedev... " >&6; }
7227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007228/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007229
Jesus Cea740f53a2010-04-28 11:35:30 +00007230#if defined(MAJOR_IN_MKDEV)
7231#include <sys/mkdev.h>
7232#elif defined(MAJOR_IN_SYSMACROS)
7233#include <sys/sysmacros.h>
7234#else
7235#include <sys/types.h>
7236#endif
7237
Neal Norwitz11690112002-07-30 01:08:28 +00007238int
7239main ()
7240{
Jesus Cea740f53a2010-04-28 11:35:30 +00007241
7242 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007243 ;
7244 return 0;
7245}
Matthias Kloseb159a552010-04-25 21:00:44 +00007246
Neal Norwitz11690112002-07-30 01:08:28 +00007247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007248if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007249 ac_cv_has_makedev=yes
7250else
Matthias Kloseb9621712010-04-24 17:59:49 +00007251 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007253rm -f core conftest.err conftest.$ac_objext \
7254 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7256$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007257if test "$ac_cv_has_makedev" = "yes"; then
7258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007260
7261fi
7262
Martin v. Löwis399a6892002-10-04 10:22:02 +00007263# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7264# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7265# defined, but the compiler does not support pragma redefine_extname,
7266# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7267# structures (such as rlimit64) without declaring them. As a
7268# work-around, disable LFS on such configurations
7269
7270use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7272$as_echo_n "checking Solaris LFS bug... " >&6; }
7273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007274/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007275
7276#define _LARGEFILE_SOURCE 1
7277#define _FILE_OFFSET_BITS 64
7278#include <sys/resource.h>
7279
Martin v. Löwis399a6892002-10-04 10:22:02 +00007280int
7281main ()
7282{
7283struct rlimit foo;
7284 ;
7285 return 0;
7286}
7287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007289 sol_lfs_bug=no
7290else
Matthias Kloseb9621712010-04-24 17:59:49 +00007291 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7295$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007296if test "$sol_lfs_bug" = "yes"; then
7297 use_lfs=no
7298fi
7299
7300if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007301# Two defines needed to enable largefile support on various platforms
7302# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007303case $ac_sys_system/$ac_sys_release in
7304AIX*)
7305
7306$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7307
7308 ;;
7309esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007310
Matthias Kloseb9621712010-04-24 17:59:49 +00007311$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007312
7313
Matthias Kloseb9621712010-04-24 17:59:49 +00007314$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007315
Martin v. Löwis399a6892002-10-04 10:22:02 +00007316fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007317
Guido van Rossum84e7b241996-08-19 21:59:00 +00007318# Add some code to confdefs.h so that the test for off_t works on SCO
7319cat >> confdefs.h <<\EOF
7320#if defined(SCO_DS)
7321#undef _OFF_T
7322#endif
7323EOF
7324
Guido van Rossumef2255b2000-03-10 22:30:29 +00007325# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007326ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007327if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007328
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007329else
Martin v. Löwis11437992002-04-12 09:54:03 +00007330
7331cat >>confdefs.h <<_ACEOF
7332#define mode_t int
7333_ACEOF
7334
7335fi
7336
Matthias Kloseb9621712010-04-24 17:59:49 +00007337ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007338if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007339
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007340else
Martin v. Löwis11437992002-04-12 09:54:03 +00007341
7342cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007343#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007344_ACEOF
7345
7346fi
7347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007349if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351else
Martin v. Löwis11437992002-04-12 09:54:03 +00007352
7353cat >>confdefs.h <<_ACEOF
7354#define pid_t int
7355_ACEOF
7356
7357fi
7358
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007359
Martin v. Löwis11437992002-04-12 09:54:03 +00007360cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007361#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007362_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007365if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007367else
Martin v. Löwis11437992002-04-12 09:54:03 +00007368
7369cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007370#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007371_ACEOF
7372
7373fi
7374
Matthias Kloseb9621712010-04-24 17:59:49 +00007375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7376$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007377if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007378 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007381/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007383
7384_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007385if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007386 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007387 ac_cv_type_uid_t=yes
7388else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007389 ac_cv_type_uid_t=no
7390fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007391rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7395$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007396if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007399
7400
Matthias Kloseb9621712010-04-24 17:59:49 +00007401$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007402
7403fi
7404
Matthias Kloseb9621712010-04-24 17:59:49 +00007405ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7406case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007407 no|yes) ;; #(
7408 *)
7409
Matthias Kloseb9621712010-04-24 17:59:49 +00007410$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007411
7412
7413cat >>confdefs.h <<_ACEOF
7414#define uint32_t $ac_cv_c_uint32_t
7415_ACEOF
7416;;
7417 esac
7418
Matthias Kloseb9621712010-04-24 17:59:49 +00007419ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7420case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007421 no|yes) ;; #(
7422 *)
7423
Matthias Kloseb9621712010-04-24 17:59:49 +00007424$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007425
7426
7427cat >>confdefs.h <<_ACEOF
7428#define uint64_t $ac_cv_c_uint64_t
7429_ACEOF
7430;;
7431 esac
7432
Matthias Kloseb9621712010-04-24 17:59:49 +00007433ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7434case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007435 no|yes) ;; #(
7436 *)
7437
7438cat >>confdefs.h <<_ACEOF
7439#define int32_t $ac_cv_c_int32_t
7440_ACEOF
7441;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007442esac
7443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7445case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007446 no|yes) ;; #(
7447 *)
7448
7449cat >>confdefs.h <<_ACEOF
7450#define int64_t $ac_cv_c_int64_t
7451_ACEOF
7452;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007453esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007456if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007459
7460fi
7461
Stefan Krah1919b7e2012-03-21 18:25:23 +01007462ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7463if test "x$ac_cv_type___uint128_t" = xyes; then :
7464
7465$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7466
7467fi
7468
Jack Jansendd19cf82001-12-06 22:36:17 +00007469
Michael W. Hudson54241132001-12-07 15:38:26 +00007470# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007471# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007472# The cast to long int works around a bug in the HP C Compiler
7473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7475# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7477$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007480else
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 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 +00007482
Martin v. Löwis11437992002-04-12 09:54:03 +00007483else
Matthias Kloseb9621712010-04-24 17:59:49 +00007484 if test "$ac_cv_type_int" = yes; then
7485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007487as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007488See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007489 else
7490 ac_cv_sizeof_int=0
7491 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007493
Martin v. Löwis11437992002-04-12 09:54:03 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7496$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007497
7498
7499
Martin v. Löwis11437992002-04-12 09:54:03 +00007500cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007501#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007502_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007503
7504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007505# The cast to long int works around a bug in the HP C Compiler
7506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7508# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7510$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007511if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007513else
Matthias Kloseb9621712010-04-24 17:59:49 +00007514 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 +00007515
Martin v. Löwis11437992002-04-12 09:54:03 +00007516else
Matthias Kloseb9621712010-04-24 17:59:49 +00007517 if test "$ac_cv_type_long" = yes; then
7518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007520as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007521See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007522 else
7523 ac_cv_sizeof_long=0
7524 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007526
Martin v. Löwis11437992002-04-12 09:54:03 +00007527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7529$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530
7531
7532
Martin v. Löwis11437992002-04-12 09:54:03 +00007533cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007534#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007535_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007536
7537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007538# The cast to long int works around a bug in the HP C Compiler
7539# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7540# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7541# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7543$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007544if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007546else
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 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 +00007548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549else
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 if test "$ac_cv_type_void_p" = yes; then
7551 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007553as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007554See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007555 else
7556 ac_cv_sizeof_void_p=0
7557 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559
Martin v. Löwis11437992002-04-12 09:54:03 +00007560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7562$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007563
7564
7565
Martin v. Löwis11437992002-04-12 09:54:03 +00007566cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007567#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007568_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007569
7570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571# The cast to long int works around a bug in the HP C Compiler
7572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7574# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7576$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007577if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007579else
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 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 +00007581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 if test "$ac_cv_type_short" = yes; then
7584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007586as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007587See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588 else
7589 ac_cv_sizeof_short=0
7590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7595$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007596
7597
7598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007600#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007601_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007602
7603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604# The cast to long int works around a bug in the HP C Compiler
7605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7607# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7609$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007610if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007612else
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 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 +00007614
Martin v. Löwis11437992002-04-12 09:54:03 +00007615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 if test "$ac_cv_type_float" = yes; then
7617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007619as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007620See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621 else
7622 ac_cv_sizeof_float=0
7623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7628$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629
7630
7631
Martin v. Löwis11437992002-04-12 09:54:03 +00007632cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007634_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007635
7636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637# The cast to long int works around a bug in the HP C Compiler
7638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7640# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7642$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007643if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 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 +00007647
Martin v. Löwis11437992002-04-12 09:54:03 +00007648else
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 if test "$ac_cv_type_double" = yes; then
7650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007652as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007653See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007654 else
7655 ac_cv_sizeof_double=0
7656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7661$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662
7663
7664
Martin v. Löwis11437992002-04-12 09:54:03 +00007665cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007666#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007668
7669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670# The cast to long int works around a bug in the HP C Compiler
7671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7673# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7675$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007676if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 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 +00007680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 if test "$ac_cv_type_fpos_t" = yes; then
7683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007685as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007686See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687 else
7688 ac_cv_sizeof_fpos_t=0
7689 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7694$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695
7696
7697
Martin v. Löwis11437992002-04-12 09:54:03 +00007698cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007699#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007700_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007701
Michael W. Hudson54241132001-12-07 15:38:26 +00007702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703# The cast to long int works around a bug in the HP C Compiler
7704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7706# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7708$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007709if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 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 +00007713
Martin v. Löwis18e16552006-02-15 17:27:45 +00007714else
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 if test "$ac_cv_type_size_t" = yes; then
7716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007718as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007719See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720 else
7721 ac_cv_sizeof_size_t=0
7722 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724
Martin v. Löwis18e16552006-02-15 17:27:45 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7727$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728
7729
7730
Martin v. Löwis18e16552006-02-15 17:27:45 +00007731cat >>confdefs.h <<_ACEOF
7732#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7733_ACEOF
7734
7735
Christian Heimes400adb02008-02-01 08:12:03 +00007736# The cast to long int works around a bug in the HP C Compiler
7737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7739# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7741$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007742if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 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 +00007746
Christian Heimes400adb02008-02-01 08:12:03 +00007747else
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 if test "$ac_cv_type_pid_t" = yes; then
7749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007751as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007752See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007753 else
7754 ac_cv_sizeof_pid_t=0
7755 fi
7756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757
Christian Heimes400adb02008-02-01 08:12:03 +00007758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7760$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007761
7762
7763
7764cat >>confdefs.h <<_ACEOF
7765#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7766_ACEOF
7767
7768
Michael W. Hudson54241132001-12-07 15:38:26 +00007769
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7771$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007772have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007774/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007775
Martin v. Löwis11437992002-04-12 09:54:03 +00007776int
7777main ()
7778{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007779long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007780 ;
7781 return 0;
7782}
7783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007785
7786
Matthias Kloseb9621712010-04-24 17:59:49 +00007787$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007788
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007789 have_long_long=yes
7790
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7794$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007795if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796# The cast to long int works around a bug in the HP C Compiler
7797# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7798# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7799# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7801$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007802if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 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 +00007806
Martin v. Löwis11437992002-04-12 09:54:03 +00007807else
Matthias Kloseb9621712010-04-24 17:59:49 +00007808 if test "$ac_cv_type_long_long" = yes; then
7809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007811as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007812See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813 else
7814 ac_cv_sizeof_long_long=0
7815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007817
Martin v. Löwis11437992002-04-12 09:54:03 +00007818fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7820$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007821
7822
7823
Martin v. Löwis11437992002-04-12 09:54:03 +00007824cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007825#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007826_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007827
Michael W. Hudson54241132001-12-07 15:38:26 +00007828
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007829fi
7830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7832$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007833have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007835/* end confdefs.h. */
7836
7837int
7838main ()
7839{
7840long double x; x = (long double)0;
7841 ;
7842 return 0;
7843}
7844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007845if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007846
7847
Matthias Kloseb9621712010-04-24 17:59:49 +00007848$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007849
7850 have_long_double=yes
7851
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007852fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7855$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007856if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007857# The cast to long int works around a bug in the HP C Compiler
7858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7862$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007863if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 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 +00007867
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007868else
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 if test "$ac_cv_type_long_double" = yes; then
7870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007872as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007873See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007874 else
7875 ac_cv_sizeof_long_double=0
7876 fi
7877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7881$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007882
7883
7884
7885cat >>confdefs.h <<_ACEOF
7886#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7887_ACEOF
7888
7889
7890fi
7891
7892
Matthias Kloseb9621712010-04-24 17:59:49 +00007893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7894$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007895have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007897/* end confdefs.h. */
7898
7899int
7900main ()
7901{
7902_Bool x; x = (_Bool)0;
7903 ;
7904 return 0;
7905}
7906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007907if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007908
7909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007911
7912 have_c99_bool=yes
7913
Thomas Woutersb2137042007-02-01 18:02:27 +00007914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7917$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007918if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007919# The cast to long int works around a bug in the HP C Compiler
7920# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7921# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7922# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7924$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007925if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007927else
Matthias Kloseb9621712010-04-24 17:59:49 +00007928 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 +00007929
Thomas Woutersb2137042007-02-01 18:02:27 +00007930else
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 if test "$ac_cv_type__Bool" = yes; then
7932 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007934as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007935See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007936 else
7937 ac_cv_sizeof__Bool=0
7938 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007940
Thomas Woutersb2137042007-02-01 18:02:27 +00007941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7943$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944
7945
7946
Thomas Woutersb2137042007-02-01 18:02:27 +00007947cat >>confdefs.h <<_ACEOF
7948#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7949_ACEOF
7950
7951
7952fi
7953
Matthias Kloseb9621712010-04-24 17:59:49 +00007954ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007955 #include <stdint.h>
7956 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007957 #ifdef HAVE_INTTYPES_H
7958 #include <inttypes.h>
7959 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007960"
Victor Stinnere0be4232011-10-25 13:06:09 +02007961if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007962
7963cat >>confdefs.h <<_ACEOF
7964#define HAVE_UINTPTR_T 1
7965_ACEOF
7966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967# The cast to long int works around a bug in the HP C Compiler
7968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7970# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7972$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007973if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007975else
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 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 +00007977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978else
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 if test "$ac_cv_type_uintptr_t" = yes; then
7980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007982as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007983See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984 else
7985 ac_cv_sizeof_uintptr_t=0
7986 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988
Martin v. Löwis11437992002-04-12 09:54:03 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7991$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992
7993
7994
Martin v. Löwis11437992002-04-12 09:54:03 +00007995cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007996#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007997_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007998
Michael W. Hudson54241132001-12-07 15:38:26 +00007999
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008000fi
8001
Thomas Wouters89f507f2006-12-13 04:49:30 +00008002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008003# The cast to long int works around a bug in the HP C Compiler
8004# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8005# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8006# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8008$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008009if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008013#ifdef HAVE_SYS_TYPES_H
8014#include <sys/types.h>
8015#endif
8016
Matthias Kloseb9621712010-04-24 17:59:49 +00008017"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008019else
Matthias Kloseb9621712010-04-24 17:59:49 +00008020 if test "$ac_cv_type_off_t" = yes; then
8021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008023as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008024See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008025 else
8026 ac_cv_sizeof_off_t=0
8027 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008029
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8032$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008034
8035
Martin v. Löwis11437992002-04-12 09:54:03 +00008036cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008037#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008038_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008039
Michael W. Hudson54241132001-12-07 15:38:26 +00008040
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008041
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8043$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008044if test "$have_long_long" = yes
8045then
8046if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008047 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8052$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8055$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008056fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8059$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008060fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008061
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008062# The cast to long int works around a bug in the HP C Compiler
8063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8065# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8067$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008068if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008070else
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008072#ifdef HAVE_SYS_TYPES_H
8073#include <sys/types.h>
8074#endif
8075#ifdef HAVE_TIME_H
8076#include <time.h>
8077#endif
8078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008081else
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 if test "$ac_cv_type_time_t" = yes; then
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008085as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008086See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008087 else
8088 ac_cv_sizeof_time_t=0
8089 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008091
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8094$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008096
8097
Martin v. Löwis11437992002-04-12 09:54:03 +00008098cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008099#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008100_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008101
Michael W. Hudson54241132001-12-07 15:38:26 +00008102
8103
Trent Mick635f6fb2000-08-23 21:33:05 +00008104# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008105ac_save_cc="$CC"
8106if test "$ac_cv_kpthread" = "yes"
8107then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008108elif test "$ac_cv_kthread" = "yes"
8109then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008110elif test "$ac_cv_pthread" = "yes"
8111then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008112fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8115$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008116have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008118/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008119
8120 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008121int
8122main ()
8123{
Guido van Rossum12580492000-09-24 16:47:19 +00008124pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008125 ;
8126 return 0;
8127}
Matthias Kloseb159a552010-04-25 21:00:44 +00008128
Martin v. Löwis11437992002-04-12 09:54:03 +00008129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008130if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008131 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8135$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008136if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008138# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8139# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8140# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8142$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008143if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008145else
Matthias Kloseb9621712010-04-24 17:59:49 +00008146 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008147#ifdef HAVE_PTHREAD_H
8148#include <pthread.h>
8149#endif
8150
Matthias Kloseb9621712010-04-24 17:59:49 +00008151"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008153else
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 if test "$ac_cv_type_pthread_t" = yes; then
8155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008157as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008158See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008159 else
8160 ac_cv_sizeof_pthread_t=0
8161 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008163
Trent Mick635f6fb2000-08-23 21:33:05 +00008164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8166$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008167
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008168
8169
Martin v. Löwis11437992002-04-12 09:54:03 +00008170cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008171#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008172_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008174
Trent Mick635f6fb2000-08-23 21:33:05 +00008175fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008176CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008177
Michael W. Hudson54241132001-12-07 15:38:26 +00008178
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008179case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008180 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008181 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8182 ;;
8183 Darwin/*)
8184 OTHER_LIBTOOL_OPT=""
8185 ;;
8186esac
8187
8188
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008189ARCH_RUN_32BIT=""
8190
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008191case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008192 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008193 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8194 if test "${enable_universalsdk}"; then
8195 :
8196 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008197 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008198 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008199 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008200 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008201 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008202 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008203 if test ${gcc_version} '<' 4.0
8204 then
8205 LIBTOOL_CRUFT="-lcc_dynamic"
8206 else
8207 LIBTOOL_CRUFT=""
8208 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008210 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008211else
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008213/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008214
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008215 #include <unistd.h>
8216 int main(int argc, char*argv[])
8217 {
8218 if (sizeof(long) == 4) {
8219 return 0;
8220 } else {
8221 return 1;
8222 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008223 }
8224
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008226if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008227 ac_osx_32bit=yes
8228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008233fi
8234
8235
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008236 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008237 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008238 i386)
8239 MACOSX_DEFAULT_ARCH="i386"
8240 ;;
8241 ppc)
8242 MACOSX_DEFAULT_ARCH="ppc"
8243 ;;
8244 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008245 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008246 ;;
8247 esac
8248 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008249 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008250 i386)
8251 MACOSX_DEFAULT_ARCH="x86_64"
8252 ;;
8253 ppc)
8254 MACOSX_DEFAULT_ARCH="ppc64"
8255 ;;
8256 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008257 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008258 ;;
8259 esac
8260
8261 #ARCH_RUN_32BIT="true"
8262 fi
8263
8264 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008265 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008267esac
8268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8270$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008271if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008272then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008273 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008275 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008278
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8280$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008281 if test $enable_shared = "yes"
8282 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008283 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 +00008284 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008285else
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008288fi
8289
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8291$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008292case $ac_sys_system/$ac_sys_release in
8293 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8298$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008299 ;;
8300 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8302$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008303 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008304esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008305
Guido van Rossum0a516c91994-09-12 10:58:40 +00008306# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008307
Michael W. Hudson54241132001-12-07 15:38:26 +00008308
8309
8310
8311
Benjamin Peterson99f03762010-04-11 22:15:28 +00008312
Thomas Wouters477c8d52006-05-27 19:21:47 +00008313
Georg Brandlb1441c72009-01-03 22:33:39 +00008314
Thomas Wouters477c8d52006-05-27 19:21:47 +00008315cat >>confdefs.h <<_ACEOF
8316#define SHLIB_EXT "$SO"
8317_ACEOF
8318
Guido van Rossum0a516c91994-09-12 10:58:40 +00008319# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008320# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008321# (Shared libraries in this instance are shared modules to be loaded into
8322# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8324$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008325if test -z "$LDSHARED"
8326then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008327 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008328 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008329 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008330 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008331 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008332 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008333 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008334 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008335 if test "$GCC" = "yes" ; then
8336 LDSHARED='$(CC) -shared'
8337 LDCXXSHARED='$(CXX) -shared'
8338 else
8339 LDSHARED='$(CC) -G'
8340 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008341 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008342 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008343 if test "$GCC" = "yes" ; then
8344 LDSHARED='$(CC) -shared'
8345 LDCXXSHARED='$(CXX) -shared'
8346 else
8347 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008348 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008349 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008350 LDSHARED='$(CC) -bundle'
8351 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008352 if test "$enable_framework" ; then
8353 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008354 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8355 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008356 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008357 else
8358 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008359 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008360 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008361 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008362 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008363 LDSHARED='$(CC) -bundle'
8364 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008365 if test "$enable_framework" ; then
8366 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008367 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8368 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008369 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008370 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008371 # No framework, use the Python app as bundle-loader
8372 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008373 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008374 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008376 Darwin/*)
8377 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8378 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008379
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008380 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008381 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008382 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008383 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008384 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008385 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8386 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008387 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008388 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008389 LDSHARED='$(CC) -bundle'
8390 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008391 if test "$enable_framework" ; then
8392 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008393 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8394 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008395 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008396 else
8397 # No framework, use the Python app as bundle-loader
8398 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8399 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008400 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008401 fi
8402 fi
8403 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008404 Linux*|GNU*|QNX*)
8405 LDSHARED='$(CC) -shared'
8406 LDCXXSHARED='$(CXX) -shared';;
8407 BSD/OS*/4*)
8408 LDSHARED="gcc -shared"
8409 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008410 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008411 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008412 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008413 LDSHARED='$(CC) -shared'
8414 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008415 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008416 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008417 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008418 OpenBSD*)
8419 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8420 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008421 LDSHARED='$(CC) -shared $(CCSHARED)'
8422 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008423 else
8424 case `uname -r` in
8425 [01].* | 2.[0-7] | 2.[0-7].*)
8426 LDSHARED="ld -Bshareable ${LDFLAGS}"
8427 ;;
8428 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008429 LDSHARED='$(CC) -shared $(CCSHARED)'
8430 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008431 ;;
8432 esac
8433 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008434 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008435 LDSHARED='$(CC) -shared'
8436 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008437 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008438 if test "$GCC" = "yes" ; then
8439 LDSHARED='$(CC) -shared'
8440 LDCXXSHARED='$(CXX) -shared'
8441 else
8442 LDSHARED='$(CC) -G'
8443 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008444 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008445 SCO_SV*)
8446 LDSHARED='$(CC) -Wl,-G,-Bexport'
8447 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8448 CYGWIN*)
8449 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8450 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008451 *) LDSHARED="ld";;
8452 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8455$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008457BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008458# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008459# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8461$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008462if test -z "$CCSHARED"
8463then
Guido van Rossum07397971997-04-29 21:49:50 +00008464 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008465 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008466 then CCSHARED="-fPIC";
8467 elif test `uname -p` = sparc;
8468 then CCSHARED="-xcode=pic32";
8469 else CCSHARED="-Kpic";
8470 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008471 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008472 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008473 else CCSHARED="+z";
8474 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008475 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008476 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008477 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008478 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008479 if test "$GCC" = "yes"
8480 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008481 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008482 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008483 SCO_SV*)
8484 if test "$GCC" = "yes"
8485 then CCSHARED="-fPIC"
8486 else CCSHARED="-Kpic -belf"
8487 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008488 IRIX*/6*) case $CC in
8489 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008490 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008491 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008492 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8495$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008496# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008497# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8499$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008500if test -z "$LINKFORSHARED"
8501then
Guido van Rossum07397971997-04-29 21:49:50 +00008502 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008503 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008504 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008505 LINKFORSHARED="-Wl,-E -Wl,+s";;
8506# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008507 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008508 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008509 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008511 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008512 if test "$enable_framework"
8513 then
Jack Jansenda49e192005-01-07 13:08:22 +00008514 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008515 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008516 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008517 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008518 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008519 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008520 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008521 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8522 then
8523 LINKFORSHARED="-Wl,--export-dynamic"
8524 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008525 SunOS/5*) case $CC in
8526 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008527 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008528 then
8529 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008530 fi;;
8531 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008532 CYGWIN*)
8533 if test $enable_shared = "no"
8534 then
8535 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8536 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008537 QNX*)
8538 # -Wl,-E causes the symbols to be added to the dynamic
8539 # symbol table so that they can be found when a module
8540 # is loaded. -N 2048K causes the stack size to be set
8541 # to 2048 kilobytes so that the stack doesn't overflow
8542 # when running test_compile.py.
8543 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008544 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8547$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008548
Michael W. Hudson54241132001-12-07 15:38:26 +00008549
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008550
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8552$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008553if test ! "$LIBRARY" = "$LDLIBRARY"
8554then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008555 case $ac_sys_system in
8556 CYGWIN*)
8557 # Cygwin needs CCSHARED when building extension DLLs
8558 # but not when building the interpreter DLL.
8559 CFLAGSFORSHARED='';;
8560 *)
8561 CFLAGSFORSHARED='$(CCSHARED)'
8562 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8565$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008566
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008567# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8568# library (with --enable-shared).
8569# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008570# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8571# if it is not required, since it creates a dependency of the shared library
8572# to LIBS. This, in turn, means that applications linking the shared libpython
8573# don't need to link LIBS explicitly. The default should be only changed
8574# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008575
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8577$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008578case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008579 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008580 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008581esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8583$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008584
8585
Guido van Rossum627b2d71993-12-24 10:39:16 +00008586# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8588$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008589if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008590 $as_echo_n "(cached) " >&6
8591else
8592 ac_check_lib_save_LIBS=$LIBS
8593LIBS="-lsendfile $LIBS"
8594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8595/* end confdefs.h. */
8596
8597/* Override any GCC internal prototype to avoid an error.
8598 Use char because int might match the return type of a GCC
8599 builtin and then its argument prototype would still apply. */
8600#ifdef __cplusplus
8601extern "C"
8602#endif
8603char sendfile ();
8604int
8605main ()
8606{
8607return sendfile ();
8608 ;
8609 return 0;
8610}
8611_ACEOF
8612if ac_fn_c_try_link "$LINENO"; then :
8613 ac_cv_lib_sendfile_sendfile=yes
8614else
8615 ac_cv_lib_sendfile_sendfile=no
8616fi
8617rm -f core conftest.err conftest.$ac_objext \
8618 conftest$ac_exeext conftest.$ac_ext
8619LIBS=$ac_check_lib_save_LIBS
8620fi
8621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8622$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008623if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008624 cat >>confdefs.h <<_ACEOF
8625#define HAVE_LIBSENDFILE 1
8626_ACEOF
8627
8628 LIBS="-lsendfile $LIBS"
8629
8630fi
8631
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8633$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008634if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008635 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008636else
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008638LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642/* Override any GCC internal prototype to avoid an error.
8643 Use char because int might match the return type of a GCC
8644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008645#ifdef __cplusplus
8646extern "C"
8647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008648char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008653 ;
8654 return 0;
8655}
8656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008659else
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662rm -f core conftest.err conftest.$ac_objext \
8663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8667$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008668if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 cat >>confdefs.h <<_ACEOF
8670#define HAVE_LIBDL 1
8671_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008672
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008673 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008674
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008675fi
8676 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8678$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008679if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008681else
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008683LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687/* Override any GCC internal prototype to avoid an error.
8688 Use char because int might match the return type of a GCC
8689 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008690#ifdef __cplusplus
8691extern "C"
8692#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008693char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008694int
8695main ()
8696{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 ;
8699 return 0;
8700}
8701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008702if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008704else
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707rm -f core conftest.err conftest.$ac_objext \
8708 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008709LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8712$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 cat >>confdefs.h <<_ACEOF
8715#define HAVE_LIBDLD 1
8716_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008717
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008718 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008719
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008720fi
8721 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008722
Georg Brandlb1441c72009-01-03 22:33:39 +00008723# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008724if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8726$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008729else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008730 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008732/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734/* Override any GCC internal prototype to avoid an error.
8735 Use char because int might match the return type of a GCC
8736 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737#ifdef __cplusplus
8738extern "C"
8739#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008740char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008741int
8742main ()
8743{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ;
8746 return 0;
8747}
8748_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749for ac_lib in '' pthread rt posix4; do
8750 if test -z "$ac_lib"; then
8751 ac_res="none required"
8752 else
8753 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008754 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008759rm -f core conftest.err conftest.$ac_objext \
8760 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008761 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764done
Victor Stinnere0be4232011-10-25 13:06:09 +02008765if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008767else
8768 ac_cv_search_sem_init=no
8769fi
8770rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008771LIBS=$ac_func_search_save_LIBS
8772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8774$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008776if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008778
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008779fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008780 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008781 # posix4 on Solaris 2.6
8782 # pthread (first!) on Linux
8783fi
8784
Martin v. Löwis19d17342003-06-14 21:03:05 +00008785# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8787$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008788if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008790else
8791 ac_check_lib_save_LIBS=$LIBS
8792LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008794/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008796/* Override any GCC internal prototype to avoid an error.
8797 Use char because int might match the return type of a GCC
8798 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008799#ifdef __cplusplus
8800extern "C"
8801#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008802char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008803int
8804main ()
8805{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008807 ;
8808 return 0;
8809}
8810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008811if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008812 ac_cv_lib_intl_textdomain=yes
8813else
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816rm -f core conftest.err conftest.$ac_objext \
8817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008818LIBS=$ac_check_lib_save_LIBS
8819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8821$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008822if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008823
Matthias Kloseb9621712010-04-24 17:59:49 +00008824$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008825
Brett Cannonc6d936e2009-06-07 20:09:53 +00008826 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008827fi
8828
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008829
8830# checks for system dependent C++ extensions support
8831case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8833$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008835/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008836
Georg Brandl59e87bd2011-02-15 19:48:59 +00008837 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008838int
8839main ()
8840{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008841loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ;
8843 return 0;
8844}
Matthias Kloseb159a552010-04-25 21:00:44 +00008845
Martin v. Löwis11437992002-04-12 09:54:03 +00008846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008847if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008848
Matthias Kloseb159a552010-04-25 21:00:44 +00008849
Matthias Kloseb9621712010-04-24 17:59:49 +00008850$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008851
Matthias Kloseb159a552010-04-25 21:00:44 +00008852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008853$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008854
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008855else
Matthias Kloseb159a552010-04-25 21:00:44 +00008856
8857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008858$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008859
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008861rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008863 *) ;;
8864esac
8865
Guido van Rossum70c7f481998-03-26 18:44:10 +00008866# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8868$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008869if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008871else
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008873LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877/* Override any GCC internal prototype to avoid an error.
8878 Use char because int might match the return type of a GCC
8879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008880#ifdef __cplusplus
8881extern "C"
8882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008883char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008884int
8885main ()
8886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 ;
8889 return 0;
8890}
8891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008894else
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897rm -f core conftest.err conftest.$ac_objext \
8898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008899LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8902$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008903if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008904 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008905fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008906 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8908$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008909if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008911else
Martin v. Löwis11437992002-04-12 09:54:03 +00008912 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008913LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008915/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917/* Override any GCC internal prototype to avoid an error.
8918 Use char because int might match the return type of a GCC
8919 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008920#ifdef __cplusplus
8921extern "C"
8922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008923char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008924int
8925main ()
8926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008928 ;
8929 return 0;
8930}
8931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008932if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008934else
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008937rm -f core conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008939LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8942$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008943if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008944 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008945fi
8946 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008947
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8949$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008952if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8955$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008956LIBS="$withval $LIBS"
8957
8958else
Matthias Kloseb9621712010-04-24 17:59:49 +00008959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961fi
8962
Guido van Rossum7f43da71994-08-01 12:15:30 +00008963
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008964if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008965 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8966set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8968$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008969if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008971else
8972 case $PKG_CONFIG in
8973 [\\/]* | ?:[\\/]*)
8974 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8975 ;;
8976 *)
8977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8978for as_dir in $PATH
8979do
8980 IFS=$as_save_IFS
8981 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008983 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 +00008984 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008986 break 2
8987 fi
8988done
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008990IFS=$as_save_IFS
8991
8992 ;;
8993esac
8994fi
8995PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8996if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8998$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9001$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009002fi
9003
9004
9005fi
9006if test -z "$ac_cv_path_PKG_CONFIG"; then
9007 ac_pt_PKG_CONFIG=$PKG_CONFIG
9008 # Extract the first word of "pkg-config", so it can be a program name with args.
9009set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9011$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009012if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009014else
9015 case $ac_pt_PKG_CONFIG in
9016 [\\/]* | ?:[\\/]*)
9017 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9018 ;;
9019 *)
9020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9021for as_dir in $PATH
9022do
9023 IFS=$as_save_IFS
9024 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02009026 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 +00009027 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009029 break 2
9030 fi
9031done
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009033IFS=$as_save_IFS
9034
9035 ;;
9036esac
9037fi
9038ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9039if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9041$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009042else
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9044$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009045fi
9046
9047 if test "x$ac_pt_PKG_CONFIG" = x; then
9048 PKG_CONFIG=""
9049 else
9050 case $cross_compiling:$ac_tool_warned in
9051yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9053$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009054ac_tool_warned=yes ;;
9055esac
9056 PKG_CONFIG=$ac_pt_PKG_CONFIG
9057 fi
9058else
9059 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9060fi
9061
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009062
9063# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9065$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009066
9067# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009068if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009069 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009070else
9071 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009072fi
9073
9074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9076$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009077
9078# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9080$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009081
9082# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009083if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009084 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009085else
9086 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009087fi
9088
9089
9090if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009091 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9092else
9093 LIBFFI_INCLUDEDIR=""
9094fi
9095
9096
Matthias Kloseb9621712010-04-24 17:59:49 +00009097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9098$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009099
Stefan Krah60187b52012-03-23 19:06:27 +01009100# Check for use of the system libmpdec library
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9102$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9103
9104# Check whether --with-system_libmpdec was given.
9105if test "${with_system_libmpdec+set}" = set; then :
9106 withval=$with_system_libmpdec;
9107else
9108 with_system_libmpdec="no"
9109fi
9110
9111
9112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9113$as_echo "$with_system_libmpdec" >&6; }
9114
Benjamin Peterson076ed002010-10-31 17:11:02 +00009115# Check for support for loadable sqlite extensions
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9117$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9118# Check whether --enable-loadable-sqlite-extensions was given.
9119if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9120 enableval=$enable_loadable_sqlite_extensions;
9121else
9122 enable_loadable_sqlite_extensions="no"
9123fi
9124
9125
9126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9127$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9128
Matthias Klose55708cc2009-04-30 08:06:49 +00009129# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9131$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009132
9133# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009134if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009135 withval=$with_dbmliborder;
9136if test x$with_dbmliborder = xyes
9137then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009138as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009139else
9140 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9141 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9142 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009143 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009144 fi
9145 done
9146fi
9147fi
9148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9150$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009151
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009152# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009153
9154
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9156$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160 withval=$with_signal_module;
9161fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009162
9163
9164if test -z "$with_signal_module"
9165then with_signal_module="yes"
9166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9168$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009169
9170if test "${with_signal_module}" = "yes"; then
9171 USE_SIGNAL_MODULE=""
9172 SIGNAL_OBJS=""
9173else
9174 USE_SIGNAL_MODULE="#"
9175 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9176fi
9177
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009178# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009179
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009180USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009181
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182
Martin v. Löwis11437992002-04-12 09:54:03 +00009183
9184# Templates for things AC_DEFINEd more than once.
9185# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009186
9187
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9190$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009193if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194 withval=$with_threads;
9195fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009196
9197
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009198# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009199
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009201if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202 withval=$with_thread; with_threads=$with_thread
9203fi
9204
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009205
9206if test -z "$with_threads"
9207then with_threads="yes"
9208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9210$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009211
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009212
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009213if test "$with_threads" = "no"
9214then
9215 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009216elif test "$ac_cv_pthread_is_default" = yes
9217then
Matthias Kloseb9621712010-04-24 17:59:49 +00009218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009219
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009220 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009221 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009222
9223 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009225elif test "$ac_cv_kpthread" = "yes"
9226then
9227 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009228 if test "$ac_cv_cxx_thread" = "yes"; then
9229 CXX="$CXX -Kpthread"
9230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009233 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009234 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009235elif test "$ac_cv_kthread" = "yes"
9236then
9237 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009238 if test "$ac_cv_cxx_thread" = "yes"; then
9239 CXX="$CXX -Kthread"
9240 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009241 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009242
9243 posix_threads=yes
9244 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009245elif test "$ac_cv_pthread" = "yes"
9246then
9247 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009248 if test "$ac_cv_cxx_thread" = "yes"; then
9249 CXX="$CXX -pthread"
9250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009252
9253 posix_threads=yes
9254 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009255else
9256 if test ! -z "$with_threads" -a -d "$with_threads"
9257 then LDFLAGS="$LDFLAGS -L$with_threads"
9258 fi
9259 if test ! -z "$withval" -a -d "$withval"
9260 then LDFLAGS="$LDFLAGS -L$withval"
9261 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009262
9263 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009264 # define _POSIX_THREADS in unistd.h. Some apparently don't
9265 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9267$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009269/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009270
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009271#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009272#ifdef _POSIX_THREADS
9273yes
9274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009275
9276_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009279 unistd_defines_pthreads=yes
9280else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009281 unistd_defines_pthreads=no
9282fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009283rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9286$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009287
Matthias Kloseb9621712010-04-24 17:59:49 +00009288 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009289
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009290 # Just looking for pthread_create in libpthread is not enough:
9291 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9292 # So we really have to include pthread.h, and then link.
9293 _libs=$LIBS
9294 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9296$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009298/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009299#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009300
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009301void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009302int
9303main ()
9304{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009305
9306pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009307 ;
9308 return 0;
9309}
9310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9314$as_echo "yes" >&6; }
9315 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009316
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009317 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009318 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009319else
Martin v. Löwis11437992002-04-12 09:54:03 +00009320
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009321 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009323if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009324 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009325
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009326 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009327 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009328else
Guido van Rossumad678af1998-10-02 14:42:15 +00009329
Matthias Kloseb9621712010-04-24 17:59:49 +00009330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9331$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009332if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009333 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009334else
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009336LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340/* Override any GCC internal prototype to avoid an error.
9341 Use char because int might match the return type of a GCC
9342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343#ifdef __cplusplus
9344extern "C"
9345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009346char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009347int
9348main ()
9349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 ;
9352 return 0;
9353}
9354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009355if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009356 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009357else
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009360rm -f core conftest.err conftest.$ac_objext \
9361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009362LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009363fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9365$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009366if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009368
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009369 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009370 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009371 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009372else
Greg Steinadf63d62000-07-05 10:38:09 +00009373
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9375$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009376if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009377 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009378else
Martin v. Löwis11437992002-04-12 09:54:03 +00009379 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009380LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009383
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009384/* Override any GCC internal prototype to avoid an error.
9385 Use char because int might match the return type of a GCC
9386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009387#ifdef __cplusplus
9388extern "C"
9389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009390char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009391int
9392main ()
9393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009394return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ;
9396 return 0;
9397}
9398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009399if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009401else
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009404rm -f core conftest.err conftest.$ac_objext \
9405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009406LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9409$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009410if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009412
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009413 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009414 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009415 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009416else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009417
Matthias Kloseb9621712010-04-24 17:59:49 +00009418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9419$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009420if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009421 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009422else
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009424LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428/* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009431#ifdef __cplusplus
9432extern "C"
9433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009434char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 ;
9440 return 0;
9441}
9442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009443if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009445else
Matthias Kloseb9621712010-04-24 17:59:49 +00009446 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009448rm -f core conftest.err conftest.$ac_objext \
9449 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009450LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9453$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009456
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009457 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009458 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009459 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009460else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009461
Matthias Kloseb9621712010-04-24 17:59:49 +00009462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9463$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009466else
Martin v. Löwis11437992002-04-12 09:54:03 +00009467 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009468LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009471
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472/* Override any GCC internal prototype to avoid an error.
9473 Use char because int might match the return type of a GCC
9474 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009475#ifdef __cplusplus
9476extern "C"
9477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009478char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009479int
9480main ()
9481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ;
9484 return 0;
9485}
9486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009489else
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009492rm -f core conftest.err conftest.$ac_objext \
9493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009494LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9497$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009500
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009501 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009502 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009503 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009504else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009505
Martin v. Löwis130fb172001-07-19 11:00:41 +00009506 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009507fi
9508
Guido van Rossum627b2d71993-12-24 10:39:16 +00009509
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009510fi
9511
Guido van Rossum0be3e491997-05-22 20:33:33 +00009512fi
9513
Guido van Rossum49545951997-12-02 19:28:29 +00009514fi
9515
Guido van Rossumb93a8621998-05-07 13:27:32 +00009516fi
9517
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009519rm -f core conftest.err conftest.$ac_objext \
9520 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009521
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9523$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009524if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009525 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526else
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009528LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532/* Override any GCC internal prototype to avoid an error.
9533 Use char because int might match the return type of a GCC
9534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535#ifdef __cplusplus
9536extern "C"
9537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009538char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009539int
9540main ()
9541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009542return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ;
9544 return 0;
9545}
9546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009549else
Matthias Kloseb9621712010-04-24 17:59:49 +00009550 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009552rm -f core conftest.err conftest.$ac_objext \
9553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009554LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9557$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009558if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009560
Martin v. Löwis130fb172001-07-19 11:00:41 +00009561 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009562 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009563 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009564fi
9565
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009566
Neal Norwitza978ab02002-11-02 16:58:05 +00009567 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9569$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009570if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009574LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578/* Override any GCC internal prototype to avoid an error.
9579 Use char because int might match the return type of a GCC
9580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009581#ifdef __cplusplus
9582extern "C"
9583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009584char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009585int
9586main ()
9587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009588return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ;
9590 return 0;
9591}
9592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009595else
Matthias Kloseb9621712010-04-24 17:59:49 +00009596 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009598rm -f core conftest.err conftest.$ac_objext \
9599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009600LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009601fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9603$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009604if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009606
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009607 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009608 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009609 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009610fi
9611
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009612 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009613fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009614
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009615if test "$posix_threads" = "yes"; then
9616 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009617
Matthias Kloseb9621712010-04-24 17:59:49 +00009618$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009619
9620 fi
9621
9622 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9623 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009624 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009626
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009627 ;;
9628 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009629$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009630
9631 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009632 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009633$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009634
9635 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009636 esac
9637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9639$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642else
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009644 ac_cv_pthread_system_supported=no
9645else
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009647/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009648#include <pthread.h>
9649 void *foo(void *parm) {
9650 return NULL;
9651 }
9652 main() {
9653 pthread_attr_t attr;
9654 pthread_t id;
9655 if (pthread_attr_init(&attr)) exit(-1);
9656 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9657 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9658 exit(0);
9659 }
9660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009661if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009662 ac_cv_pthread_system_supported=yes
9663else
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9667 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009668fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009670
Guido van Rossum627b2d71993-12-24 10:39:16 +00009671fi
9672
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9674$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675 if test "$ac_cv_pthread_system_supported" = "yes"; then
9676
Matthias Kloseb9621712010-04-24 17:59:49 +00009677$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009678
9679 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 for ac_func in pthread_sigmask
9681do :
9682 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009684 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009685#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009687 case $ac_sys_system in
9688 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009691
9692 ;;
9693 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009694fi
9695done
9696
9697fi
9698
9699
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009700# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009701
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9703$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009705if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009706 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009707 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9709$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009710 ipv6=no
9711 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9713$as_echo "yes" >&6; }
9714 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009715
9716 ipv6=yes
9717 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009719else
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009725 ipv6=no
9726
9727else
Matthias Kloseb9621712010-04-24 17:59:49 +00009728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009730 /* AF_INET6 available check */
9731#include <sys/types.h>
9732#include <sys/socket.h>
9733main()
9734{
9735 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9736 exit(1);
9737 else
9738 exit(0);
9739}
9740
Martin v. Löwis11437992002-04-12 09:54:03 +00009741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009743
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9745$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009746 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009748else
Matthias Kloseb159a552010-04-25 21:00:44 +00009749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9751$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009752 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009753
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009757fi
9758
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009760if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9762$as_echo_n "checking if RFC2553 API is available... " >&6; }
9763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009765
9766 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009767#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009768int
9769main ()
9770{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009771struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009772 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ;
9774 return 0;
9775}
Matthias Kloseb159a552010-04-25 21:00:44 +00009776
Martin v. Löwis11437992002-04-12 09:54:03 +00009777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009778if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009779
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009781$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009782 ipv6=yes
9783
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009784else
Matthias Kloseb159a552010-04-25 21:00:44 +00009785
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009787$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009788 ipv6=no
9789
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009792fi
9793
9794if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009796
9797fi
9798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799fi
9800
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009801
9802ipv6type=unknown
9803ipv6lib=none
9804ipv6trylibc=no
9805
9806if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9808$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009809 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9810 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009811 case $i in
9812 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009814/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009815
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816#include <netinet/in.h>
9817#ifdef IPV6_INRIA_VERSION
9818yes
9819#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009820_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009823 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009825rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826
9827 ;;
9828 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009831
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832#include <netinet/in.h>
9833#ifdef __KAME__
9834yes
9835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009836_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009839 ipv6type=$i;
9840 ipv6lib=inet6
9841 ipv6libdir=/usr/local/v6/lib
9842 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009844rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009845
9846 ;;
9847 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009849/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851#include <features.h>
9852#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9853yes
9854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009858 ipv6type=$i;
9859 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009860fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009861rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009862
9863 ;;
9864 linux-inet6)
9865 if test -d /usr/inet6; then
9866 ipv6type=$i
9867 ipv6lib=inet6
9868 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009869 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009870 fi
9871 ;;
9872 solaris)
9873 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009874 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009875 ipv6type=$i
9876 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009877 fi
9878 fi
9879 ;;
9880 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009882/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009883
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884#include <sys/param.h>
9885#ifdef _TOSHIBA_INET6
9886yes
9887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009888_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891 ipv6type=$i;
9892 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009893 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009895rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009896
9897 ;;
9898 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009900/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009901
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902#include </usr/local/v6/include/sys/v6config.h>
9903#ifdef __V6D__
9904yes
9905#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009906_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909 ipv6type=$i;
9910 ipv6lib=v6;
9911 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009912 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009913fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009914rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009915
9916 ;;
9917 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009919/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921#include <sys/param.h>
9922#ifdef _ZETA_MINAMI_INET6
9923yes
9924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009925_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928 ipv6type=$i;
9929 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009930 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009932rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933
9934 ;;
9935 esac
9936 if test "$ipv6type" != "unknown"; then
9937 break
9938 fi
9939 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9941$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009942fi
9943
9944if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9945 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9946 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9947 echo "using lib$ipv6lib"
9948 else
9949 if test $ipv6trylibc = "yes"; then
9950 echo "using libc"
9951 else
9952 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9953 echo "You need to fetch lib$ipv6lib.a from appropriate"
9954 echo 'ipv6 kit and compile beforehand.'
9955 exit 1
9956 fi
9957 fi
9958fi
9959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9961$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009963/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009964
9965 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009966int
9967main ()
9968{
9969FSIORefNum fRef = 0
9970 ;
9971 return 0;
9972}
Matthias Kloseb159a552010-04-25 21:00:44 +00009973
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009975if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009976
Matthias Kloseb159a552010-04-25 21:00:44 +00009977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9981$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009982
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009983else
Matthias Kloseb159a552010-04-25 21:00:44 +00009984
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009987
9988fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9990
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009991# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9993$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009995# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009996if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997 withval=$with_doc_strings;
9998fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009999
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010000
10001if test -z "$with_doc_strings"
10002then with_doc_strings="yes"
10003fi
10004if test "$with_doc_strings" != "no"
10005then
10006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010008
10009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10011$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010012
Antoine Pitrou042b1282010-08-13 21:15:58 +000010013# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10015$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010018if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010020if test "$withval" != no
10021then
10022
Matthias Kloseb9621712010-04-24 17:59:49 +000010023$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010024
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10026$as_echo "yes" >&6; }
10027else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10028$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010029fi
10030else
Matthias Kloseb9621712010-04-24 17:59:49 +000010031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033fi
10034
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010035
10036# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10038$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010041if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042 withval=$with_pymalloc;
10043fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010044
Neil Schemenauera35c6882001-02-27 04:45:05 +000010045
Neil Schemenauer16c22972002-03-22 15:34:49 +000010046if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010047then
10048 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010049fi
10050if test "$with_pymalloc" != "no"
10051then
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010054
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010055 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10058$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010059
Benjamin Peterson05159c42009-12-03 03:01:27 +000010060# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10062$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010063
10064# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010065if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010066 withval=$with_valgrind;
10067else
10068 with_valgrind=no
10069fi
10070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10072$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010073if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 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 +020010075if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010076
Matthias Kloseb9621712010-04-24 17:59:49 +000010077$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010078
10079else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010080 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010081
10082fi
10083
10084
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010085 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010086fi
10087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010088# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010089
Guido van Rossum98935bf2001-09-05 19:13:16 +000010090DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010091
Guido van Rossume97ee181999-12-20 21:27:22 +000010092# the dlopen() function means we might want to use dynload_shlib.o. some
10093# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010094for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010095do :
10096 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010097if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010098 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010099#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010100_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010101
Guido van Rossume97ee181999-12-20 21:27:22 +000010102fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010103done
Guido van Rossume97ee181999-12-20 21:27:22 +000010104
Michael W. Hudson54241132001-12-07 15:38:26 +000010105
Guido van Rossume97ee181999-12-20 21:27:22 +000010106# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10107# loading of modules.
10108
Matthias Kloseb9621712010-04-24 17:59:49 +000010109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10110$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010111if test -z "$DYNLOADFILE"
10112then
10113 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010114 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10115 if test "$ac_cv_func_dlopen" = yes
10116 then DYNLOADFILE="dynload_shlib.o"
10117 else DYNLOADFILE="dynload_aix.o"
10118 fi
10119 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010120 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010121 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10122 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010123 *)
10124 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10125 # out any dynamic loading
10126 if test "$ac_cv_func_dlopen" = yes
10127 then DYNLOADFILE="dynload_shlib.o"
10128 else DYNLOADFILE="dynload_stub.o"
10129 fi
10130 ;;
10131 esac
10132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10134$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010135if test "$DYNLOADFILE" != "dynload_stub.o"
10136then
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010139
10140fi
10141
Neil Schemenauer4e425612001-06-19 15:44:15 +000010142# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10143
Michael W. Hudson54241132001-12-07 15:38:26 +000010144
Matthias Kloseb9621712010-04-24 17:59:49 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10146$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010147if test -z "$MACHDEP_OBJS"
10148then
Jack Jansene578a632001-08-15 01:27:14 +000010149 MACHDEP_OBJS=$extra_machdep_objs
10150else
10151 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010152fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010153if test -z "$MACHDEP_OBJS"; then
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10155$as_echo "none" >&6; }
10156else
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10158$as_echo "$MACHDEP_OBJS" >&6; }
10159fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010160
Guido van Rossum627b2d71993-12-24 10:39:16 +000010161# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010162for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010163 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010164 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010165 futimens futimes gai_strerror \
10166 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010167 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010168 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010169 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10170 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010171 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010172 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010173 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010174 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010175 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010176 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010177 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10178 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010179 sigaction sigaltstack siginterrupt sigpending sigrelse \
10180 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010181 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010182 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10183 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010184do :
10185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10186ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010187if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010188 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010189#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010190_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010191
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010192fi
10193done
10194
Michael W. Hudson54241132001-12-07 15:38:26 +000010195
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010196ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10197 #include <dirent.h>
10198"
10199if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10200
10201$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10202
10203fi
10204
10205
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010206# For some functions, having a definition is not sufficient, since
10207# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10209$as_echo_n "checking for chroot... " >&6; }
10210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010212#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010213int
10214main ()
10215{
10216void *x=chroot
10217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010222
Matthias Kloseb9621712010-04-24 17:59:49 +000010223$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010224
Matthias Kloseb159a552010-04-25 21:00:44 +000010225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010226$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010227else
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010230
10231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10234$as_echo_n "checking for link... " >&6; }
10235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010237#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010238int
10239main ()
10240{
10241void *x=link
10242 ;
10243 return 0;
10244}
10245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249
Matthias Kloseb159a552010-04-25 21:00:44 +000010250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010251$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010252else
Matthias Kloseb9621712010-04-24 17:59:49 +000010253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010255
10256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10259$as_echo_n "checking for symlink... " >&6; }
10260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010262#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010263int
10264main ()
10265{
10266void *x=symlink
10267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010272
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274
Matthias Kloseb159a552010-04-25 21:00:44 +000010275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010276$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277else
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010280
10281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10284$as_echo_n "checking for fchdir... " >&6; }
10285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010287#include <unistd.h>
10288int
10289main ()
10290{
10291void *x=fchdir
10292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010299
Matthias Kloseb159a552010-04-25 21:00:44 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010305
10306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10309$as_echo_n "checking for fsync... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010312#include <unistd.h>
10313int
10314main ()
10315{
10316void *x=fsync
10317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324
Matthias Kloseb159a552010-04-25 21:00:44 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010330
10331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10334$as_echo_n "checking for fdatasync... " >&6; }
10335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010337#include <unistd.h>
10338int
10339main ()
10340{
10341void *x=fdatasync
10342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010349
Matthias Kloseb159a552010-04-25 21:00:44 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010355
10356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10359$as_echo_n "checking for epoll... " >&6; }
10360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010361/* end confdefs.h. */
10362#include <sys/epoll.h>
10363int
10364main ()
10365{
10366void *x=epoll_create
10367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010374
Matthias Kloseb159a552010-04-25 21:00:44 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010380
10381fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10384$as_echo_n "checking for epoll_create1... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10386/* end confdefs.h. */
10387#include <sys/epoll.h>
10388int
10389main ()
10390{
10391void *x=epoll_create1
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396if ac_fn_c_try_compile "$LINENO"; then :
10397
10398$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10399
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10401$as_echo "yes" >&6; }
10402else
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
10405
10406fi
10407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10409$as_echo_n "checking for kqueue... " >&6; }
10410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010411/* end confdefs.h. */
10412
10413#include <sys/types.h>
10414#include <sys/event.h>
10415
10416int
10417main ()
10418{
10419int x=kqueue()
10420 ;
10421 return 0;
10422}
10423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010424if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010425
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010427
Matthias Kloseb159a552010-04-25 21:00:44 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010429$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010430else
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010433
10434fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010436# On some systems (eg. FreeBSD 5), we would find a definition of the
10437# functions ctermid_r, setgroups in the library, but no prototype
10438# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10439# address to avoid compiler warnings and potential miscompilations
10440# because of the missing prototypes.
10441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10443$as_echo_n "checking for ctermid_r... " >&6; }
10444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010445/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010446
Martin v. Löwisd5843682002-11-21 20:41:28 +000010447#include <stdio.h>
10448
Martin v. Löwisd5843682002-11-21 20:41:28 +000010449int
10450main ()
10451{
10452void* p = ctermid_r
10453 ;
10454 return 0;
10455}
10456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010458
Matthias Kloseb9621712010-04-24 17:59:49 +000010459$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010460
Matthias Kloseb159a552010-04-25 21:00:44 +000010461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010463else
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10465$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010466
10467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10469
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10471$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010472if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010473 $as_echo_n "(cached) " >&6
10474else
10475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010476/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010477#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010478int
10479main ()
10480{
10481void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010482
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010483 ;
10484 return 0;
10485}
10486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010487if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010488 ac_cv_flock_decl=yes
10489else
10490 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010491
10492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010494
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010495fi
10496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10497$as_echo "$ac_cv_flock_decl" >&6; }
10498if test "x${ac_cv_flock_decl}" = xyes; then
10499 for ac_func in flock
10500do :
10501 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010502if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010503 cat >>confdefs.h <<_ACEOF
10504#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010505_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010506
Antoine Pitroua3000072010-09-07 14:52:42 +000010507else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010509$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010510if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010511 $as_echo_n "(cached) " >&6
10512else
10513 ac_check_lib_save_LIBS=$LIBS
10514LIBS="-lbsd $LIBS"
10515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10516/* end confdefs.h. */
10517
10518/* Override any GCC internal prototype to avoid an error.
10519 Use char because int might match the return type of a GCC
10520 builtin and then its argument prototype would still apply. */
10521#ifdef __cplusplus
10522extern "C"
10523#endif
10524char flock ();
10525int
10526main ()
10527{
10528return flock ();
10529 ;
10530 return 0;
10531}
10532_ACEOF
10533if ac_fn_c_try_link "$LINENO"; then :
10534 ac_cv_lib_bsd_flock=yes
10535else
10536 ac_cv_lib_bsd_flock=no
10537fi
10538rm -f core conftest.err conftest.$ac_objext \
10539 conftest$ac_exeext conftest.$ac_ext
10540LIBS=$ac_check_lib_save_LIBS
10541fi
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10543$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010544if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010545 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010546
10547
10548$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10549
10550
10551fi
10552
10553
10554fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010555done
10556
Antoine Pitroua3000072010-09-07 14:52:42 +000010557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558
Matthias Kloseb9621712010-04-24 17:59:49 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10560$as_echo_n "checking for getpagesize... " >&6; }
10561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010562/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010563
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010564#include <unistd.h>
10565
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010566int
10567main ()
10568{
10569void* p = getpagesize
10570 ;
10571 return 0;
10572}
10573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010574if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010575
Matthias Kloseb9621712010-04-24 17:59:49 +000010576$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010577
Matthias Kloseb159a552010-04-25 21:00:44 +000010578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010579$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010580else
Matthias Kloseb9621712010-04-24 17:59:49 +000010581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10582$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010583
10584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010586
Victor Stinner984890f2011-11-24 13:53:38 +010010587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10588$as_echo_n "checking for broken unsetenv... " >&6; }
10589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10590/* end confdefs.h. */
10591
10592#include <stdlib.h>
10593
10594int
10595main ()
10596{
10597int res = unsetenv("DUMMY")
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602if ac_fn_c_try_compile "$LINENO"; then :
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
10605else
10606
10607$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10608
10609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10610$as_echo "yes" >&6; }
10611
10612fi
10613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10614
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615for ac_prog in true
10616do
10617 # Extract the first word of "$ac_prog", so it can be a program name with args.
10618set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10620$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010621if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010622 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010623else
10624 if test -n "$TRUE"; then
10625 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10626else
10627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10628for as_dir in $PATH
10629do
10630 IFS=$as_save_IFS
10631 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010633 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 +000010634 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $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 +000010636 break 2
10637 fi
10638done
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010641
10642fi
10643fi
10644TRUE=$ac_cv_prog_TRUE
10645if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10647$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648else
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651fi
10652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654 test -n "$TRUE" && break
10655done
10656test -n "$TRUE" || TRUE="/bin/true"
10657
10658
Matthias Kloseb9621712010-04-24 17:59:49 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10660$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010661if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010663else
10664 ac_check_lib_save_LIBS=$LIBS
10665LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669/* Override any GCC internal prototype to avoid an error.
10670 Use char because int might match the return type of a GCC
10671 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010672#ifdef __cplusplus
10673extern "C"
10674#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010675char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010676int
10677main ()
10678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010680 ;
10681 return 0;
10682}
10683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010685 ac_cv_lib_c_inet_aton=yes
10686else
Matthias Kloseb9621712010-04-24 17:59:49 +000010687 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010689rm -f core conftest.err conftest.$ac_objext \
10690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010691LIBS=$ac_check_lib_save_LIBS
10692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10694$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010695if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010696 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10699$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010700if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010702else
10703 ac_check_lib_save_LIBS=$LIBS
10704LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010706/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010708/* Override any GCC internal prototype to avoid an error.
10709 Use char because int might match the return type of a GCC
10710 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010711#ifdef __cplusplus
10712extern "C"
10713#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010714char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010715int
10716main ()
10717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010719 ;
10720 return 0;
10721}
10722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010723if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724 ac_cv_lib_resolv_inet_aton=yes
10725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010728rm -f core conftest.err conftest.$ac_objext \
10729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010730LIBS=$ac_check_lib_save_LIBS
10731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10733$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010734if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010735 cat >>confdefs.h <<_ACEOF
10736#define HAVE_LIBRESOLV 1
10737_ACEOF
10738
10739 LIBS="-lresolv $LIBS"
10740
10741fi
10742
10743
10744fi
10745
10746
Christian Heimesd0764e22007-12-04 15:00:33 +000010747# On Tru64, chflags seems to be present, but calling it will
10748# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10750$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010751if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010755 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010756else
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010758/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010759
Christian Heimesd0764e22007-12-04 15:00:33 +000010760#include <sys/stat.h>
10761#include <unistd.h>
10762int main(int argc, char*argv[])
10763{
10764 if(chflags(argv[0], 0) != 0)
10765 return 1;
10766 return 0;
10767}
Ned Deily3eb67d52011-06-28 00:00:28 -070010768
Christian Heimesd0764e22007-12-04 15:00:33 +000010769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010770if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010771 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010772else
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010775rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10776 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010777fi
10778
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10782$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010783if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010785if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010786 ac_cv_have_chflags="yes"
10787else
10788 ac_cv_have_chflags="no"
10789fi
10790
10791fi
10792if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010793
Matthias Kloseb9621712010-04-24 17:59:49 +000010794$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010795
10796fi
10797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10799$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010800if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010804 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010807/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010808
Christian Heimesd0764e22007-12-04 15:00:33 +000010809#include <sys/stat.h>
10810#include <unistd.h>
10811int main(int argc, char*argv[])
10812{
10813 if(lchflags(argv[0], 0) != 0)
10814 return 1;
10815 return 0;
10816}
Ned Deily3eb67d52011-06-28 00:00:28 -070010817
Christian Heimesd0764e22007-12-04 15:00:33 +000010818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010819if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010820 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010821else
Matthias Kloseb9621712010-04-24 17:59:49 +000010822 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010826fi
10827
10828
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10831$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010832if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010834if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010835 ac_cv_have_lchflags="yes"
10836else
10837 ac_cv_have_lchflags="no"
10838fi
10839
10840fi
10841if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010844
10845fi
10846
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010847case $ac_sys_system/$ac_sys_release in
10848Darwin/*)
10849 _CUR_CFLAGS="${CFLAGS}"
10850 _CUR_LDFLAGS="${LDFLAGS}"
10851 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10852 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10853 ;;
10854esac
10855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10857$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010858if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010860else
10861 ac_check_lib_save_LIBS=$LIBS
10862LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010864/* end confdefs.h. */
10865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866/* Override any GCC internal prototype to avoid an error.
10867 Use char because int might match the return type of a GCC
10868 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010869#ifdef __cplusplus
10870extern "C"
10871#endif
10872char inflateCopy ();
10873int
10874main ()
10875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010877 ;
10878 return 0;
10879}
10880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010882 ac_cv_lib_z_inflateCopy=yes
10883else
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010886rm -f core conftest.err conftest.$ac_objext \
10887 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010888LIBS=$ac_check_lib_save_LIBS
10889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10891$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010892if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010893
Matthias Kloseb9621712010-04-24 17:59:49 +000010894$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010895
10896fi
10897
10898
10899case $ac_sys_system/$ac_sys_release in
10900Darwin/*)
10901 CFLAGS="${_CUR_CFLAGS}"
10902 LDFLAGS="${_CUR_LDFLAGS}"
10903 ;;
10904esac
10905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10907$as_echo_n "checking for hstrerror... " >&6; }
10908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010909/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010910
Martin v. Löwise9416172003-05-03 10:12:45 +000010911#include <netdb.h>
10912
Martin v. Löwise9416172003-05-03 10:12:45 +000010913int
10914main ()
10915{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010916void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010917 ;
10918 return 0;
10919}
10920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010924
Matthias Kloseb159a552010-04-25 21:00:44 +000010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010927else
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010930
10931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010932rm -f core conftest.err conftest.$ac_objext \
10933 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10936$as_echo_n "checking for inet_aton... " >&6; }
10937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010938/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010939
Martin v. Löwis86d66262006-02-17 08:40:11 +000010940#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010941#include <sys/socket.h>
10942#include <netinet/in.h>
10943#include <arpa/inet.h>
10944
Martin v. Löwise9416172003-05-03 10:12:45 +000010945int
10946main ()
10947{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010948void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010949 ;
10950 return 0;
10951}
10952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010956
Matthias Kloseb159a552010-04-25 21:00:44 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010958$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010959else
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10961$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010962
10963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010964rm -f core conftest.err conftest.$ac_objext \
10965 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10968$as_echo_n "checking for inet_pton... " >&6; }
10969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010970/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010971
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010972#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010973#include <sys/socket.h>
10974#include <netinet/in.h>
10975#include <arpa/inet.h>
10976
Martin v. Löwise9416172003-05-03 10:12:45 +000010977int
10978main ()
10979{
10980void* p = inet_pton
10981 ;
10982 return 0;
10983}
10984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010988
Matthias Kloseb159a552010-04-25 21:00:44 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010991else
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10993$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010994
10995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010997
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010998# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11000$as_echo_n "checking for setgroups... " >&6; }
11001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011002/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011003
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011004#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011005#ifdef HAVE_GRP_H
11006#include <grp.h>
11007#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011008
Martin v. Löwisd5843682002-11-21 20:41:28 +000011009int
11010main ()
11011{
11012void* p = setgroups
11013 ;
11014 return 0;
11015}
11016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011020
Matthias Kloseb159a552010-04-25 21:00:44 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011023else
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011026
11027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011029
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011030# check for openpty and forkpty
11031
11032for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011033do :
11034 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011035if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011037#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011038_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011039
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011040else
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11042$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011043if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011045else
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011047LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011051/* Override any GCC internal prototype to avoid an error.
11052 Use char because int might match the return type of a GCC
11053 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011054#ifdef __cplusplus
11055extern "C"
11056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011057char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011058int
11059main ()
11060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011062 ;
11063 return 0;
11064}
11065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011066if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011067 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011071rm -f core conftest.err conftest.$ac_objext \
11072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011073LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011074fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11076$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011077if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011078 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011079 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011080else
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11082$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011083if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011085else
11086 ac_check_lib_save_LIBS=$LIBS
11087LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011089/* end confdefs.h. */
11090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091/* Override any GCC internal prototype to avoid an error.
11092 Use char because int might match the return type of a GCC
11093 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011094#ifdef __cplusplus
11095extern "C"
11096#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011097char openpty ();
11098int
11099main ()
11100{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011102 ;
11103 return 0;
11104}
11105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011107 ac_cv_lib_bsd_openpty=yes
11108else
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011111rm -f core conftest.err conftest.$ac_objext \
11112 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011113LIBS=$ac_check_lib_save_LIBS
11114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11116$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011117if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011119 LIBS="$LIBS -lbsd"
11120fi
11121
11122
11123fi
11124
Fred Drake8cef4cf2000-06-28 16:40:38 +000011125
11126fi
11127done
11128
11129for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011130do :
11131 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011132if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011134#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011135_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011136
Fred Drake8cef4cf2000-06-28 16:40:38 +000011137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11139$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011140if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011142else
Martin v. Löwis11437992002-04-12 09:54:03 +000011143 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011144LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011148/* Override any GCC internal prototype to avoid an error.
11149 Use char because int might match the return type of a GCC
11150 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011151#ifdef __cplusplus
11152extern "C"
11153#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011154char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011155int
11156main ()
11157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 ;
11160 return 0;
11161}
11162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011163if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011164 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011165else
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011168rm -f core conftest.err conftest.$ac_objext \
11169 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011170LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11173$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011174if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011176 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011177else
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11179$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011180if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011181 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011182else
11183 ac_check_lib_save_LIBS=$LIBS
11184LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011186/* end confdefs.h. */
11187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188/* Override any GCC internal prototype to avoid an error.
11189 Use char because int might match the return type of a GCC
11190 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011191#ifdef __cplusplus
11192extern "C"
11193#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011194char forkpty ();
11195int
11196main ()
11197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011199 ;
11200 return 0;
11201}
11202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011204 ac_cv_lib_bsd_forkpty=yes
11205else
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011208rm -f core conftest.err conftest.$ac_objext \
11209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011210LIBS=$ac_check_lib_save_LIBS
11211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11213$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011214if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011216 LIBS="$LIBS -lbsd"
11217fi
11218
11219
11220fi
11221
Fred Drake8cef4cf2000-06-28 16:40:38 +000011222
11223fi
11224done
11225
Jack Jansendd19cf82001-12-06 22:36:17 +000011226
Christian Heimesb186d002008-03-18 15:15:01 +000011227# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011228for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011229do :
11230 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011231if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011232 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011233#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011234_ACEOF
11235
11236fi
11237done
11238
11239
Michael W. Hudson54241132001-12-07 15:38:26 +000011240# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011241for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011242do :
11243 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11244ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011245if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011246 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011247#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011248_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011249
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011250fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011251done
11252
Michael W. Hudson54241132001-12-07 15:38:26 +000011253
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011254ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011256 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011257
Martin v. Löwis1142de32002-03-29 16:28:31 +000011258else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011260 *" dup2.$ac_objext "* ) ;;
11261 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011262 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011263esac
11264
Martin v. Löwis1142de32002-03-29 16:28:31 +000011265fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011266
11267ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011268if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011269 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11270
11271else
11272 case " $LIBOBJS " in
11273 *" getcwd.$ac_objext "* ) ;;
11274 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11275 ;;
11276esac
11277
11278fi
11279
11280ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011281if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011282 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11283
11284else
11285 case " $LIBOBJS " in
11286 *" strdup.$ac_objext "* ) ;;
11287 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11288 ;;
11289esac
11290
11291fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011292
11293
11294for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011295do :
11296 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011297if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011299#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011302/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011303#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011304int
11305main ()
11306{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011315
Guido van Rossum627b2d71993-12-24 10:39:16 +000011316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011318
Guido van Rossum627b2d71993-12-24 10:39:16 +000011319fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011320done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011321
Jack Jansen150753c2003-03-29 22:07:47 +000011322for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011323do :
11324 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011325if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011326 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011327#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011330/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011331#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011332int
11333main ()
11334{
11335setpgrp(0,0);
11336 ;
11337 return 0;
11338}
11339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011341
Matthias Kloseb9621712010-04-24 17:59:49 +000011342$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011343
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011346
11347fi
11348done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011349
Thomas Wouters3a584202000-08-05 23:28:51 +000011350for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011351do :
11352 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011353if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011355#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011358/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011359#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011360int
11361main ()
11362{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011363gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 ;
11365 return 0;
11366}
11367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368if ac_fn_c_try_compile "$LINENO"; then :
11369
Guido van Rossum627b2d71993-12-24 10:39:16 +000011370else
Skip Montanaro6dead952003-09-25 14:50:04 +000011371
Matthias Kloseb9621712010-04-24 17:59:49 +000011372$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011373
Martin v. Löwis11437992002-04-12 09:54:03 +000011374
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011377
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011379done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380
Michael W. Hudson54241132001-12-07 15:38:26 +000011381
Victor Stinnere0be4232011-10-25 13:06:09 +020011382for ac_func in clock_gettime
11383do :
11384 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11385if test "x$ac_cv_func_clock_gettime" = xyes; then :
11386 cat >>confdefs.h <<_ACEOF
11387#define HAVE_CLOCK_GETTIME 1
11388_ACEOF
11389
11390else
11391
11392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11393$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11394if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11395 $as_echo_n "(cached) " >&6
11396else
11397 ac_check_lib_save_LIBS=$LIBS
11398LIBS="-lrt $LIBS"
11399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400/* end confdefs.h. */
11401
11402/* Override any GCC internal prototype to avoid an error.
11403 Use char because int might match the return type of a GCC
11404 builtin and then its argument prototype would still apply. */
11405#ifdef __cplusplus
11406extern "C"
11407#endif
11408char clock_gettime ();
11409int
11410main ()
11411{
11412return clock_gettime ();
11413 ;
11414 return 0;
11415}
11416_ACEOF
11417if ac_fn_c_try_link "$LINENO"; then :
11418 ac_cv_lib_rt_clock_gettime=yes
11419else
11420 ac_cv_lib_rt_clock_gettime=no
11421fi
11422rm -f core conftest.err conftest.$ac_objext \
11423 conftest$ac_exeext conftest.$ac_ext
11424LIBS=$ac_check_lib_save_LIBS
11425fi
11426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11427$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11428if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11429
11430 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11431
11432
11433$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11434
11435
11436fi
11437
11438
11439fi
11440done
11441
11442
11443for ac_func in clock_getres
11444do :
11445 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11446if test "x$ac_cv_func_clock_getres" = xyes; then :
11447 cat >>confdefs.h <<_ACEOF
11448#define HAVE_CLOCK_GETRES 1
11449_ACEOF
11450
11451else
11452
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11454$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11455if ${ac_cv_lib_rt_clock_getres+:} false; then :
11456 $as_echo_n "(cached) " >&6
11457else
11458 ac_check_lib_save_LIBS=$LIBS
11459LIBS="-lrt $LIBS"
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461/* end confdefs.h. */
11462
11463/* Override any GCC internal prototype to avoid an error.
11464 Use char because int might match the return type of a GCC
11465 builtin and then its argument prototype would still apply. */
11466#ifdef __cplusplus
11467extern "C"
11468#endif
11469char clock_getres ();
11470int
11471main ()
11472{
11473return clock_getres ();
11474 ;
11475 return 0;
11476}
11477_ACEOF
11478if ac_fn_c_try_link "$LINENO"; then :
11479 ac_cv_lib_rt_clock_getres=yes
11480else
11481 ac_cv_lib_rt_clock_getres=no
11482fi
11483rm -f core conftest.err conftest.$ac_objext \
11484 conftest$ac_exeext conftest.$ac_ext
11485LIBS=$ac_check_lib_save_LIBS
11486fi
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11488$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11489if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11490
11491 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11492
11493
11494fi
11495
11496
11497fi
11498done
11499
11500
Matthias Kloseb9621712010-04-24 17:59:49 +000011501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11502$as_echo_n "checking for major... " >&6; }
11503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011504/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011505
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011506#if defined(MAJOR_IN_MKDEV)
11507#include <sys/mkdev.h>
11508#elif defined(MAJOR_IN_SYSMACROS)
11509#include <sys/sysmacros.h>
11510#else
11511#include <sys/types.h>
11512#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011513
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011514int
11515main ()
11516{
11517
11518 makedev(major(0),minor(0));
11519
11520 ;
11521 return 0;
11522}
11523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011524if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011525
11526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011528
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11530$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011531
11532else
Skip Montanaro6dead952003-09-25 14:50:04 +000011533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011536
11537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011538rm -f core conftest.err conftest.$ac_objext \
11539 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011540
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011541# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011542# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11544$as_echo_n "checking for getaddrinfo... " >&6; }
11545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011546/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011547
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011548#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011549#include <sys/socket.h>
11550#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011551#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011552
Martin v. Löwis11437992002-04-12 09:54:03 +000011553int
11554main ()
11555{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011556getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ;
11558 return 0;
11559}
11560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011561if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011562 have_getaddrinfo=yes
11563else
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011566rm -f core conftest.err conftest.$ac_objext \
11567 conftest$ac_exeext conftest.$ac_ext
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11569$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011570if test $have_getaddrinfo = yes
11571then
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11573$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011574 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011576else
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011578
11579if test "${enable_ipv6+set}" = set; then
11580 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11581else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011582 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011583fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011584else
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011586/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011587
11588#include <sys/types.h>
11589#include <netdb.h>
11590#include <string.h>
11591#include <sys/socket.h>
11592#include <netinet/in.h>
11593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011594int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011595{
11596 int passive, gaierr, inet4 = 0, inet6 = 0;
11597 struct addrinfo hints, *ai, *aitop;
11598 char straddr[INET6_ADDRSTRLEN], strport[16];
11599
11600 for (passive = 0; passive <= 1; passive++) {
11601 memset(&hints, 0, sizeof(hints));
11602 hints.ai_family = AF_UNSPEC;
11603 hints.ai_flags = passive ? AI_PASSIVE : 0;
11604 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011605 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011606 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11607 (void)gai_strerror(gaierr);
11608 goto bad;
11609 }
11610 for (ai = aitop; ai; ai = ai->ai_next) {
11611 if (ai->ai_addr == NULL ||
11612 ai->ai_addrlen == 0 ||
11613 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11614 straddr, sizeof(straddr), strport, sizeof(strport),
11615 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11616 goto bad;
11617 }
11618 switch (ai->ai_family) {
11619 case AF_INET:
11620 if (strcmp(strport, "54321") != 0) {
11621 goto bad;
11622 }
11623 if (passive) {
11624 if (strcmp(straddr, "0.0.0.0") != 0) {
11625 goto bad;
11626 }
11627 } else {
11628 if (strcmp(straddr, "127.0.0.1") != 0) {
11629 goto bad;
11630 }
11631 }
11632 inet4++;
11633 break;
11634 case AF_INET6:
11635 if (strcmp(strport, "54321") != 0) {
11636 goto bad;
11637 }
11638 if (passive) {
11639 if (strcmp(straddr, "::") != 0) {
11640 goto bad;
11641 }
11642 } else {
11643 if (strcmp(straddr, "::1") != 0) {
11644 goto bad;
11645 }
11646 }
11647 inet6++;
11648 break;
11649 case AF_UNSPEC:
11650 goto bad;
11651 break;
11652 default:
11653 /* another family support? */
11654 break;
11655 }
11656 }
11657 }
11658
11659 if (!(inet4 == 0 || inet4 == 2))
11660 goto bad;
11661 if (!(inet6 == 0 || inet6 == 2))
11662 goto bad;
11663
11664 if (aitop)
11665 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011666 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011667
11668 bad:
11669 if (aitop)
11670 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011671 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011672}
11673
Martin v. Löwis11437992002-04-12 09:54:03 +000011674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011675if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011676 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011677else
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011684fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011685
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011687
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11689$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11690
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011691if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011692then
11693 if test $ipv6 = yes
11694 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011695 echo 'Fatal: You must get working getaddrinfo() function.'
11696 echo ' or you can specify "--disable-ipv6"'.
11697 exit 1
11698 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011699else
Martin v. Löwis11437992002-04-12 09:54:03 +000011700
Matthias Kloseb9621712010-04-24 17:59:49 +000011701$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011702
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011703fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011704
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011705for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011706do :
11707 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011708if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011710#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011711_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011712
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011713fi
11714done
11715
Michael W. Hudson54241132001-12-07 15:38:26 +000011716
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011717# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11719$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011720if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011722else
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011725#include <sys/types.h>
11726#include <sys/time.h>
11727#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011728
Martin v. Löwis11437992002-04-12 09:54:03 +000011729int
11730main ()
11731{
11732if ((struct tm *) 0)
11733return 0;
11734 ;
11735 return 0;
11736}
11737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011738if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011739 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011742fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11746$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011747if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011748
Matthias Kloseb9621712010-04-24 17:59:49 +000011749$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011750
11751fi
11752
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11754$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011755if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011759/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760#include <sys/types.h>
11761#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011762
Martin v. Löwis11437992002-04-12 09:54:03 +000011763int
11764main ()
11765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011766struct tm tm;
11767 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011769 ;
11770 return 0;
11771}
11772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774 ac_cv_struct_tm=time.h
11775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11781$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011782if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785
11786fi
11787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788ac_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 +000011789#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791"
Victor Stinnere0be4232011-10-25 13:06:09 +020011792if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011793
11794cat >>confdefs.h <<_ACEOF
11795#define HAVE_STRUCT_TM_TM_ZONE 1
11796_ACEOF
11797
11798
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011799fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011800
Martin v. Löwis11437992002-04-12 09:54:03 +000011801if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11802
Matthias Kloseb9621712010-04-24 17:59:49 +000011803$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011804
11805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11807"
Victor Stinnere0be4232011-10-25 13:06:09 +020011808if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011812fi
11813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011815#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816_ACEOF
11817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11819$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011820if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822else
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011824/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011825#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826#if !HAVE_DECL_TZNAME
11827extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830int
11831main ()
11832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011834 ;
11835 return 0;
11836}
11837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011838if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011839 ac_cv_var_tzname=yes
11840else
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011843rm -f core conftest.err conftest.$ac_objext \
11844 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11847$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011848 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852 fi
11853fi
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855ac_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 +020011856if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
11858cat >>confdefs.h <<_ACEOF
11859#define HAVE_STRUCT_STAT_ST_RDEV 1
11860_ACEOF
11861
11862
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011863fi
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865ac_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 +020011866if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868cat >>confdefs.h <<_ACEOF
11869#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11870_ACEOF
11871
11872
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011873fi
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875ac_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 +020011876if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011877
11878cat >>confdefs.h <<_ACEOF
11879#define HAVE_STRUCT_STAT_ST_FLAGS 1
11880_ACEOF
11881
11882
11883fi
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885ac_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 +020011886if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011887
11888cat >>confdefs.h <<_ACEOF
11889#define HAVE_STRUCT_STAT_ST_GEN 1
11890_ACEOF
11891
11892
11893fi
11894
Matthias Kloseb9621712010-04-24 17:59:49 +000011895ac_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 +020011896if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011897
11898cat >>confdefs.h <<_ACEOF
11899#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11900_ACEOF
11901
11902
11903fi
11904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905ac_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 +020011906if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011907
Martin v. Löwis11437992002-04-12 09:54:03 +000011908cat >>confdefs.h <<_ACEOF
11909#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11910_ACEOF
11911
11912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011914
11915else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011916 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011917 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11919 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011920esac
11921
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011922fi
11923
Michael W. Hudson54241132001-12-07 15:38:26 +000011924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11927$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011928if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011929 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011930else
Matthias Kloseb159a552010-04-25 21:00:44 +000011931
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011933/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011934#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011935int
11936main ()
11937{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011938return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011939 ;
11940 return 0;
11941}
11942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011943if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011944 ac_cv_header_time_altzone=yes
11945else
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011950fi
11951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11953$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011954if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011955
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011957
11958fi
11959
Guido van Rossumda88dad1995-01-26 00:46:29 +000011960was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11962$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011964/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011965
11966#include <sys/types.h>
11967#include <sys/select.h>
11968#include <sys/time.h>
11969
Martin v. Löwis11437992002-04-12 09:54:03 +000011970int
11971main ()
11972{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973;
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 ;
11975 return 0;
11976}
11977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011982
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011983 was_it_defined=yes
11984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11988$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11991$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011992if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011997#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011998int
11999main ()
12000{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012001struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 ;
12003 return 0;
12004}
12005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012007 ac_cv_struct_addrinfo=yes
12008else
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12012fi
12013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12015$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012016if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Matthias Kloseb9621712010-04-24 17:59:49 +000012018$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012019
12020fi
12021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12023$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012024if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012026else
Matthias Kloseb9621712010-04-24 17:59:49 +000012027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012028/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029
12030# include <sys/types.h>
12031# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012032int
12033main ()
12034{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012035struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012036 ;
12037 return 0;
12038}
12039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012041 ac_cv_struct_sockaddr_storage=yes
12042else
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12046fi
12047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12049$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012050if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
Matthias Kloseb9621712010-04-24 17:59:49 +000012052$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012053
12054fi
12055
Guido van Rossum627b2d71993-12-24 10:39:16 +000012056# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12059$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012066int
12067main ()
12068{
12069static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012070test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000012071
12072 ;
12073 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012074}
Martin v. Löwis11437992002-04-12 09:54:03 +000012075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012077 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12084$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087
12088fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12091$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012097
Martin v. Löwis11437992002-04-12 09:54:03 +000012098int
12099main ()
12100{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012101/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012102#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012103 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012105 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107 char const *const *pcpcc;
12108 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 /* NEC SVR4.0.2 mips cc rejects this. */
12110 struct point {int x, y;};
12111 static struct point const zero = {0,0};
12112 /* AIX XL C 1.02.0.0 rejects this.
12113 It does not let you subtract one const X* pointer from another in
12114 an arm of an if-expression whose if-part is not a constant
12115 expression */
12116 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012118 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012119 ++pcpcc;
12120 ppc = (char**) pcpcc;
12121 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012122 { /* SCO 3.2v4 cc rejects this. */
12123 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012128 }
12129 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12130 int x[] = {25, 17};
12131 const int *foo = &x[0];
12132 ++foo;
12133 }
12134 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12135 typedef const int *iptr;
12136 iptr p = 0;
12137 ++p;
12138 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012139 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012141 struct s { int j; const int *ap[3]; };
12142 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 }
12144 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12145 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012149#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012150
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 ;
12152 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012153}
Martin v. Löwis11437992002-04-12 09:54:03 +000012154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156 ac_cv_c_const=yes
12157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12163$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012167
12168fi
12169
Michael W. Hudson54241132001-12-07 15:38:26 +000012170
Guido van Rossumda88dad1995-01-26 00:46:29 +000012171works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12173$as_echo_n "checking for working volatile... " >&6; }
12174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177int
12178main ()
12179{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012180volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 ;
12182 return 0;
12183}
12184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012185if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012186 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012187else
Skip Montanaro6dead952003-09-25 14:50:04 +000012188
Matthias Kloseb9621712010-04-24 17:59:49 +000012189$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012191
Guido van Rossum627b2d71993-12-24 10:39:16 +000012192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12195$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012196
Guido van Rossumda88dad1995-01-26 00:46:29 +000012197works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12199$as_echo_n "checking for working signed char... " >&6; }
12200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012201/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012202
Martin v. Löwis11437992002-04-12 09:54:03 +000012203int
12204main ()
12205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012206signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 ;
12208 return 0;
12209}
12210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012212 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012213else
Skip Montanaro6dead952003-09-25 14:50:04 +000012214
Matthias Kloseb9621712010-04-24 17:59:49 +000012215$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012216
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012217
Guido van Rossum7f43da71994-08-01 12:15:30 +000012218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12221$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012222
Guido van Rossumda88dad1995-01-26 00:46:29 +000012223have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12225$as_echo_n "checking for prototypes... " >&6; }
12226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012227/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012228int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012229int
12230main ()
12231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012233 ;
12234 return 0;
12235}
12236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Matthias Kloseb9621712010-04-24 17:59:49 +000012239$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Matthias Kloseb159a552010-04-25 21:00:44 +000012241 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12245$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012246
Guido van Rossumda88dad1995-01-26 00:46:29 +000012247works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12249$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012252
12253#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012254int foo(int x, ...) {
12255 va_list va;
12256 va_start(va, x);
12257 va_arg(va, int);
12258 va_arg(va, char *);
12259 va_arg(va, double);
12260 return 0;
12261}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012262
Martin v. Löwis11437992002-04-12 09:54:03 +000012263int
12264main ()
12265{
Guido van Rossum90eea071996-08-30 20:58:57 +000012266return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012272
12273
Matthias Kloseb9621712010-04-24 17:59:49 +000012274$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012275
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012276 works=yes
12277
Guido van Rossum627b2d71993-12-24 10:39:16 +000012278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12281$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282
Martin v. Löwisd6320502004-08-12 13:45:08 +000012283# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12285$as_echo_n "checking for socketpair... " >&6; }
12286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012287/* end confdefs.h. */
12288
12289#include <sys/types.h>
12290#include <sys/socket.h>
12291
12292int
12293main ()
12294{
12295void *x=socketpair
12296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012301
Matthias Kloseb9621712010-04-24 17:59:49 +000012302$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012303
Matthias Kloseb159a552010-04-25 21:00:44 +000012304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012306else
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12308$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012309
12310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012312
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012313# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12315$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012317/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012318#include <sys/types.h>
12319#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012320int
12321main ()
12322{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323struct sockaddr x;
12324x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_compile "$LINENO"; then :
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12331$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334
12335else
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012338
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341
Guido van Rossumda88dad1995-01-26 00:46:29 +000012342va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12344$as_echo_n "checking whether va_list is an array... " >&6; }
12345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012347
12348#ifdef HAVE_STDARG_PROTOTYPES
12349#include <stdarg.h>
12350#else
12351#include <varargs.h>
12352#endif
12353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354int
12355main ()
12356{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 ;
12359 return 0;
12360}
12361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362if ac_fn_c_try_compile "$LINENO"; then :
12363
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364else
Skip Montanaro6dead952003-09-25 14:50:04 +000012365
Martin v. Löwis11437992002-04-12 09:54:03 +000012366
Matthias Kloseb9621712010-04-24 17:59:49 +000012367$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012368
Guido van Rossumda88dad1995-01-26 00:46:29 +000012369 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12374$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012375
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012376# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
12378
Matthias Kloseb9621712010-04-24 17:59:49 +000012379ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012380if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012383
Matthias Kloseb9621712010-04-24 17:59:49 +000012384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12385$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012386 OLD_CFLAGS=$CFLAGS
12387 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012389/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012390
12391# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393int
12394main ()
12395{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012396
12397 char *name;
12398 struct hostent *he, *res;
12399 char buffer[2048];
12400 int buflen = 2048;
12401 int h_errnop;
12402
12403 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
12405 ;
12406 return 0;
12407}
12408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012412
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
Matthias Kloseb9621712010-04-24 17:59:49 +000012414$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12417$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012419else
Skip Montanaro6dead952003-09-25 14:50:04 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422$as_echo "no" >&6; }
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12424$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012428# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Martin v. Löwis11437992002-04-12 09:54:03 +000012430int
12431main ()
12432{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012433
12434 char *name;
12435 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012436 char buffer[2048];
12437 int buflen = 2048;
12438 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012439
Matthias Kloseb159a552010-04-25 21:00:44 +000012440 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012449
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Kloseb159a552010-04-25 21:00:44 +000012451$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12454$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012456else
Skip Montanaro6dead952003-09-25 14:50:04 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12461$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12463/* end confdefs.h. */
12464
12465# include <netdb.h>
12466
12467int
12468main ()
12469{
12470
12471 char *name;
12472 struct hostent *he;
12473 struct hostent_data data;
12474
12475 (void) gethostbyname_r(name, he, &data);
12476
12477 ;
12478 return 0;
12479}
12480_ACEOF
12481if ac_fn_c_try_compile "$LINENO"; then :
12482
12483 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12484
12485
12486$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12487
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12489$as_echo "yes" >&6; }
12490
12491else
12492
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012504 CFLAGS=$OLD_CFLAGS
12505
12506else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 for ac_func in gethostbyname
12509do :
12510 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012511if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012512 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012514_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012515
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012516fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012517done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012518
Michael W. Hudson54241132001-12-07 15:38:26 +000012519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520fi
12521
Michael W. Hudson54241132001-12-07 15:38:26 +000012522
12523
12524
12525
12526
12527
Guido van Rossum627b2d71993-12-24 10:39:16 +000012528# checks for system services
12529# (none yet)
12530
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012531# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012532ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012533if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012534
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12537$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012540else
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012542LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012546/* Override any GCC internal prototype to avoid an error.
12547 Use char because int might match the return type of a GCC
12548 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012549#ifdef __cplusplus
12550extern "C"
12551#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012552char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012553int
12554main ()
12555{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012556return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 ;
12558 return 0;
12559}
12560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012561if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012562 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012563else
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012566rm -f core conftest.err conftest.$ac_objext \
12567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012568LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12571$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012572if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012573 cat >>confdefs.h <<_ACEOF
12574#define HAVE_LIBIEEE 1
12575_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012577 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578
Guido van Rossum627b2d71993-12-24 10:39:16 +000012579fi
12580
Michael W. Hudson54241132001-12-07 15:38:26 +000012581
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012582fi
12583
Michael W. Hudson54241132001-12-07 15:38:26 +000012584
Guido van Rossum7f253911997-05-09 02:42:48 +000012585# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12587$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012590if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012592if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012593then
12594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Matthias Kloseb9621712010-04-24 17:59:49 +000012597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12598$as_echo "yes" >&6; }
12599else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012601fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012602else
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012605fi
12606
Guido van Rossum7f253911997-05-09 02:42:48 +000012607
Guido van Rossum7f43da71994-08-01 12:15:30 +000012608# check for --with-libm=...
12609
Guido van Rossum563e7081996-09-10 18:20:48 +000012610case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012611Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012612*) LIBM=-lm
12613esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12615$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012618if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012620if test "$withval" = no
12621then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12623$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012624elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012625then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12627$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012628else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012629fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012630else
Matthias Kloseb9621712010-04-24 17:59:49 +000012631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12632$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633fi
12634
Guido van Rossum7f43da71994-08-01 12:15:30 +000012635
12636# check for --with-libc=...
12637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12639$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012642if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012644if test "$withval" = no
12645then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12647$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012648elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012649then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12651$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012652else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012653fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012654else
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12656$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657fi
12658
Guido van Rossum7f43da71994-08-01 12:15:30 +000012659
Stefan Krah1919b7e2012-03-21 18:25:23 +010012660# **************************************
12661# * Check for gcc x64 inline assembler *
12662# **************************************
12663
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12665$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12667/* end confdefs.h. */
12668
12669int
12670main ()
12671{
12672
12673 __asm__ __volatile__ ("movq %rcx, %rax");
12674
12675 ;
12676 return 0;
12677}
12678_ACEOF
12679if ac_fn_c_try_compile "$LINENO"; then :
12680 have_gcc_asm_for_x64=yes
12681else
12682 have_gcc_asm_for_x64=no
12683fi
12684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12686$as_echo "$have_gcc_asm_for_x64" >&6; }
12687if test "$have_gcc_asm_for_x64" = yes
12688then
12689
12690$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12691
12692fi
12693
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012694# **************************************************
12695# * Check for various properties of floating point *
12696# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12699$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012700if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012702else
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012705 ac_cv_little_endian_double=no
12706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012708/* end confdefs.h. */
12709
12710#include <string.h>
12711int main() {
12712 double x = 9006104071832581.0;
12713 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12714 return 0;
12715 else
12716 return 1;
12717}
12718
12719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012720if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012721 ac_cv_little_endian_double=yes
12722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012727fi
12728
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012729fi
12730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12732$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012733if test "$ac_cv_little_endian_double" = yes
12734then
12735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012737
12738fi
12739
Matthias Kloseb9621712010-04-24 17:59:49 +000012740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12741$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012742if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012743 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012744else
12745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012747 ac_cv_big_endian_double=no
12748else
Matthias Kloseb9621712010-04-24 17:59:49 +000012749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012750/* end confdefs.h. */
12751
12752#include <string.h>
12753int main() {
12754 double x = 9006104071832581.0;
12755 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12756 return 0;
12757 else
12758 return 1;
12759}
12760
12761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012762if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012763 ac_cv_big_endian_double=yes
12764else
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012769fi
12770
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012771fi
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12774$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012775if test "$ac_cv_big_endian_double" = yes
12776then
12777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012779
12780fi
12781
12782# Some ARM platforms use a mixed-endian representation for doubles.
12783# While Python doesn't currently have full support for these platforms
12784# (see e.g., issue 1762561), we can at least make sure that float <-> string
12785# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12787$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012788if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790else
12791
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793 ac_cv_mixed_endian_double=no
12794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012796/* end confdefs.h. */
12797
12798#include <string.h>
12799int main() {
12800 double x = 9006104071832581.0;
12801 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12802 return 0;
12803 else
12804 return 1;
12805}
12806
12807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012808if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012809 ac_cv_mixed_endian_double=yes
12810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012815fi
12816
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817fi
12818
Matthias Kloseb9621712010-04-24 17:59:49 +000012819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12820$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012821if test "$ac_cv_mixed_endian_double" = yes
12822then
12823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012825
12826fi
12827
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012828# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012829# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012830# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012831# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012832# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012833# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012834
12835# This inline assembler syntax may also work for suncc and icc,
12836# so we try it on all platforms.
12837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12839$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012841/* end confdefs.h. */
12842
12843int
12844main ()
12845{
12846
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012847 unsigned short cw;
12848 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12849 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012850
12851 ;
12852 return 0;
12853}
12854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012856 have_gcc_asm_for_x87=yes
12857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012859fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12862$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012863if test "$have_gcc_asm_for_x87" = yes
12864then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012867
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012868fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012869
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012870# Detect whether system arithmetic is subject to x87-style double
12871# rounding issues. The result of this test has little meaning on non
12872# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12873# mode is round-to-nearest and double rounding issues are present, and
12874# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12876$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012877# $BASECFLAGS may affect the result
12878ac_save_cc="$CC"
12879CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012880if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012881 ac_cv_x87_double_rounding=no
12882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012884/* end confdefs.h. */
12885
12886#include <stdlib.h>
12887#include <math.h>
12888int main() {
12889 volatile double x, y, z;
12890 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12891 x = 0.99999999999999989; /* 1-2**-53 */
12892 y = 1./x;
12893 if (y != 1.)
12894 exit(0);
12895 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12896 x = 1e16;
12897 y = 2.99999;
12898 z = x + y;
12899 if (z != 1e16+4.)
12900 exit(0);
12901 /* both tests show evidence of double rounding */
12902 exit(1);
12903}
12904
12905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012906if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012907 ac_cv_x87_double_rounding=no
12908else
Matthias Kloseb9621712010-04-24 17:59:49 +000012909 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012913fi
12914
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012915CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12917$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012918if test "$ac_cv_x87_double_rounding" = yes
12919then
12920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012922
12923fi
12924
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012925# ************************************
12926# * Check for mathematical functions *
12927# ************************************
12928
12929LIBS_SAVE=$LIBS
12930LIBS="$LIBS $LIBM"
12931
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012932for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12933do :
12934 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12935ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012936if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012937 cat >>confdefs.h <<_ACEOF
12938#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12939_ACEOF
12940
12941fi
12942done
12943
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012944for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012945do :
12946 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12947ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012948if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012949 cat >>confdefs.h <<_ACEOF
12950#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12951_ACEOF
12952
12953fi
12954done
12955
12956ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12957"
Victor Stinnere0be4232011-10-25 13:06:09 +020012958if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012959 ac_have_decl=1
12960else
12961 ac_have_decl=0
12962fi
12963
12964cat >>confdefs.h <<_ACEOF
12965#define HAVE_DECL_ISINF $ac_have_decl
12966_ACEOF
12967ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12968"
Victor Stinnere0be4232011-10-25 13:06:09 +020012969if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012970 ac_have_decl=1
12971else
12972 ac_have_decl=0
12973fi
12974
12975cat >>confdefs.h <<_ACEOF
12976#define HAVE_DECL_ISNAN $ac_have_decl
12977_ACEOF
12978ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12979"
Victor Stinnere0be4232011-10-25 13:06:09 +020012980if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012981 ac_have_decl=1
12982else
12983 ac_have_decl=0
12984fi
12985
12986cat >>confdefs.h <<_ACEOF
12987#define HAVE_DECL_ISFINITE $ac_have_decl
12988_ACEOF
12989
12990
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012991# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12992# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12994$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012995if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012997else
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013000 ac_cv_tanh_preserves_zero_sign=no
13001else
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013003/* end confdefs.h. */
13004
13005#include <math.h>
13006#include <stdlib.h>
13007int main() {
13008 /* return 0 if either negative zeros don't exist
13009 on this platform or if negative zeros exist
13010 and tanh(-0.) == -0. */
13011 if (atan2(0., -1.) == atan2(-0., -1.) ||
13012 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13013 else exit(1);
13014}
13015
13016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013017if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013018 ac_cv_tanh_preserves_zero_sign=yes
13019else
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013021fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013022rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013024fi
13025
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013026fi
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13029$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013030if test "$ac_cv_tanh_preserves_zero_sign" = yes
13031then
13032
Matthias Kloseb9621712010-04-24 17:59:49 +000013033$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013034
13035fi
13036
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013037if test "$ac_cv_func_log1p" = yes
13038then
13039 # On some versions of AIX, log1p(-0.) returns 0. instead of
13040 # -0. See issue #9920.
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13042$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013043 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013044 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013045else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013046
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013047 if test "$cross_compiling" = yes; then :
13048 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013049else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013052
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013053 #include <math.h>
13054 #include <stdlib.h>
13055 int main() {
13056 /* Fail if the signs of log1p(-0.) and -0. can be
13057 distinguished. */
13058 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13059 return 0;
13060 else
13061 return 1;
13062 }
13063
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013064_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013065if ac_fn_c_try_run "$LINENO"; then :
13066 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013067else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013068 ac_cv_log1p_drops_zero_sign=yes
13069fi
13070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013072fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013073
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013074fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013075
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13077$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13078fi
13079if test "$ac_cv_log1p_drops_zero_sign" = yes
13080then
13081
13082$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13083
13084fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013085
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013086LIBS=$LIBS_SAVE
13087
Mark Dickinsona614f042009-11-28 12:48:43 +000013088# For multiprocessing module, check that sem_open
13089# actually works. For FreeBSD versions <= 7.2,
13090# the kernel module that provides POSIX semaphores
13091# isn't loaded by default, so an attempt to call
13092# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13094$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013095if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013099 ac_cv_posix_semaphores_enabled=yes
13100else
Matthias Kloseb9621712010-04-24 17:59:49 +000013101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013102/* end confdefs.h. */
13103
13104#include <unistd.h>
13105#include <fcntl.h>
13106#include <stdio.h>
13107#include <semaphore.h>
13108#include <sys/stat.h>
13109
13110int main(void) {
13111 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13112 if (a == SEM_FAILED) {
13113 perror("sem_open");
13114 return 1;
13115 }
13116 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013117 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013118 return 0;
13119}
13120
13121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013122if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013123 ac_cv_posix_semaphores_enabled=yes
13124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013129fi
13130
13131
Mark Dickinsona614f042009-11-28 12:48:43 +000013132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13135$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013136if test $ac_cv_posix_semaphores_enabled = no
13137then
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013140
13141fi
13142
Mark Dickinson10683072009-04-18 21:18:19 +000013143# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13145$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013146if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013148else
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013150 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013151else
Matthias Kloseb9621712010-04-24 17:59:49 +000013152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013153/* end confdefs.h. */
13154
13155#include <unistd.h>
13156#include <fcntl.h>
13157#include <stdio.h>
13158#include <semaphore.h>
13159#include <sys/stat.h>
13160
13161int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013162 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013163 int count;
13164 int res;
13165 if(a==SEM_FAILED){
13166 perror("sem_open");
13167 return 1;
13168
13169 }
13170 res = sem_getvalue(a, &count);
13171 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013172 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013173 return res==-1 ? 1 : 0;
13174}
13175
Mark Dickinson10683072009-04-18 21:18:19 +000013176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013177if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013178 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13183 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013184fi
13185
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013186
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013187fi
13188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13190$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013191if test $ac_cv_broken_sem_getvalue = yes
13192then
13193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013195
13196fi
13197
Mark Dickinsonbd792642009-03-18 20:06:12 +000013198# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13200$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013201# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013203 enableval=$enable_big_digits; case $enable_big_digits in
13204yes)
13205 enable_big_digits=30 ;;
13206no)
13207 enable_big_digits=15 ;;
1320815|30)
13209 ;;
13210*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013211 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 +000013212esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13214$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013215
13216cat >>confdefs.h <<_ACEOF
13217#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13218_ACEOF
13219
13220
13221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13223$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013224fi
13225
13226
Guido van Rossumef2255b2000-03-10 22:30:29 +000013227# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013228ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013229if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013233
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013234 wchar_h="yes"
13235
Guido van Rossumef2255b2000-03-10 22:30:29 +000013236else
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013238
13239fi
13240
Michael W. Hudson54241132001-12-07 15:38:26 +000013241
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013243# determine wchar_t size
13244if test "$wchar_h" = yes
13245then
Matthias Kloseb9621712010-04-24 17:59:49 +000013246 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13249# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13251$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013252if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013254else
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13256"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
Martin v. Löwis11437992002-04-12 09:54:03 +000013258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 if test "$ac_cv_type_wchar_t" = yes; then
13260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013262as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013263See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264 else
13265 ac_cv_sizeof_wchar_t=0
13266 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13271$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013272
13273
13274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013276#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013277_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013278
Michael W. Hudson54241132001-12-07 15:38:26 +000013279
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013280fi
13281
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13283$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013284have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013286/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013287
13288#include <tcl.h>
13289#if TCL_UTF_MAX != 6
13290# error "NOT UCS4_TCL"
13291#endif
13292int
13293main ()
13294{
13295
13296 ;
13297 return 0;
13298}
13299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013301
13302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013304
13305 have_ucs4_tcl=yes
13306
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13310$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013311
Skip Montanaro6dead952003-09-25 14:50:04 +000013312# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013313if test "$wchar_h" = yes
13314then
13315 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13317$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013318 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013320else
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013323 ac_cv_wchar_t_signed=yes
13324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013326/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013327
13328 #include <wchar.h>
13329 int main()
13330 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013331 /* Success: exit code 0 */
13332 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013333 }
13334
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013337 ac_cv_wchar_t_signed=yes
13338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013343fi
13344
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013345fi
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13348$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349fi
13350
Georg Brandl52d168a2008-01-07 18:10:24 +000013351# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013352if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013353 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013354then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013355 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
Georg Brandl52d168a2008-01-07 18:10:24 +000013359else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013360 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013361fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13363$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013364
13365# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13367$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013368if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 ac_cv_c_bigendian=unknown
13372 # See if we're dealing with a universal compiler.
13373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13374/* end confdefs.h. */
13375#ifndef __APPLE_CC__
13376 not a universal capable compiler
13377 #endif
13378 typedef int dummy;
13379
Skip Montanaro6dead952003-09-25 14:50:04 +000013380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013381if ac_fn_c_try_compile "$LINENO"; then :
13382
13383 # Check for potential -arch flags. It is not universal unless
13384 # there are at least two -arch flags with different values.
13385 ac_arch=
13386 ac_prev=
13387 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13388 if test -n "$ac_prev"; then
13389 case $ac_word in
13390 i?86 | x86_64 | ppc | ppc64)
13391 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13392 ac_arch=$ac_word
13393 else
13394 ac_cv_c_bigendian=universal
13395 break
13396 fi
13397 ;;
13398 esac
13399 ac_prev=
13400 elif test "x$ac_word" = "x-arch"; then
13401 ac_prev=arch
13402 fi
13403 done
13404fi
13405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13406 if test $ac_cv_c_bigendian = unknown; then
13407 # See if sys/param.h defines the BYTE_ORDER macro.
13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013409/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013410#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413int
13414main ()
13415{
Matthias Kloseb9621712010-04-24 17:59:49 +000013416#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13417 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13418 && LITTLE_ENDIAN)
13419 bogus endian macros
13420 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
13422 ;
13423 return 0;
13424}
13425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013426if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013427 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013430#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433int
13434main ()
13435{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013436#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013437 not big endian
13438 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
13440 ;
13441 return 0;
13442}
13443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013444if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013445 ac_cv_c_bigendian=yes
13446else
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013450fi
13451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13452 fi
13453 if test $ac_cv_c_bigendian = unknown; then
13454 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013456/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013457#include <limits.h>
13458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
Matthias Kloseb9621712010-04-24 17:59:49 +000013462#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13463 bogus endian macros
13464 #endif
13465
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
13471 # It does; now see whether it defined to _BIG_ENDIAN or not.
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13473/* end confdefs.h. */
13474#include <limits.h>
13475
13476int
13477main ()
13478{
13479#ifndef _BIG_ENDIAN
13480 not big endian
13481 #endif
13482
13483 ;
13484 return 0;
13485}
13486_ACEOF
13487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013488 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13493fi
13494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13495 fi
13496 if test $ac_cv_c_bigendian = unknown; then
13497 # Compile a test program.
13498 if test "$cross_compiling" = yes; then :
13499 # Try to guess by grepping values from an object file.
13500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13501/* end confdefs.h. */
13502short int ascii_mm[] =
13503 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13504 short int ascii_ii[] =
13505 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13506 int use_ascii (int i) {
13507 return ascii_mm[i] + ascii_ii[i];
13508 }
13509 short int ebcdic_ii[] =
13510 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13511 short int ebcdic_mm[] =
13512 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13513 int use_ebcdic (int i) {
13514 return ebcdic_mm[i] + ebcdic_ii[i];
13515 }
13516 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518int
13519main ()
13520{
13521return use_ascii (foo) == use_ebcdic (foo);
13522 ;
13523 return 0;
13524}
13525_ACEOF
13526if ac_fn_c_try_compile "$LINENO"; then :
13527 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13528 ac_cv_c_bigendian=yes
13529 fi
13530 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13531 if test "$ac_cv_c_bigendian" = unknown; then
13532 ac_cv_c_bigendian=no
13533 else
13534 # finding both strings is unlikely to happen, but who knows?
13535 ac_cv_c_bigendian=unknown
13536 fi
13537 fi
13538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013540else
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013542/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013544int
13545main ()
13546{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 /* Are we little or big endian? From Harbison&Steele. */
13549 union
13550 {
13551 long int l;
13552 char c[sizeof (long int)];
13553 } u;
13554 u.l = 1;
13555 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556
13557 ;
13558 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013559}
Martin v. Löwis11437992002-04-12 09:54:03 +000013560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013562 ac_cv_c_bigendian=no
13563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13573$as_echo "$ac_cv_c_bigendian" >&6; }
13574 case $ac_cv_c_bigendian in #(
13575 yes)
13576 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13577;; #(
13578 no)
13579 ;; #(
13580 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 ;; #(
13585 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013586 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013587 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013589
Michael W. Hudson54241132001-12-07 15:38:26 +000013590
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013591# ABI version string for Python extension modules. This appears between the
13592# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13593# from the following attributes which affect the ABI of this Python build (in
13594# this order):
13595#
13596# * The Python implementation (always 'cpython-' for us)
13597# * The major and minor version numbers
13598# * --with-pydebug (adds a 'd')
13599# * --with-pymalloc (adds a 'm')
13600# * --with-wide-unicode (adds a 'u')
13601#
13602# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013603# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13604# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013605
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13607$as_echo_n "checking ABIFLAGS... " >&6; }
13608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13609$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13611$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013612SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13614$as_echo "$SOABI" >&6; }
13615
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13617$as_echo_n "checking LDVERSION... " >&6; }
13618LDVERSION='$(VERSION)$(ABIFLAGS)'
13619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13620$as_echo "$LDVERSION" >&6; }
13621
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013622# SO is the extension of shared libraries `(including the dot!)
13623# -- usually .so, .sl on HP-UX, .dll on Cygwin
13624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13625$as_echo_n "checking SO... " >&6; }
13626if test -z "$SO"
13627then
13628 case $ac_sys_system in
13629 hp*|HP*)
13630 case `uname -m` in
13631 ia64) SO=.so;;
13632 *) SO=.sl;;
13633 esac
13634 ;;
13635 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013636 Linux*|GNU*)
13637 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013638 *) SO=.so;;
13639 esac
13640else
13641 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013642 echo
13643 echo '====================================================================='
13644 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013645 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013646 echo '+ Do you really mean to change the extension for shared libraries? +'
13647 echo '+ Continuing in 10 seconds to let you to ponder. +'
13648 echo '+ +'
13649 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013650 sleep 10
13651fi
13652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13653$as_echo "$SO" >&6; }
13654
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013655# Check whether right shifting a negative integer extends the sign bit
13656# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13658$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013659if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013661else
Martin v. Löwis11437992002-04-12 09:54:03 +000013662
Matthias Kloseb9621712010-04-24 17:59:49 +000013663if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013664 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013668
13669int main()
13670{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013671 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013672}
13673
Martin v. Löwis11437992002-04-12 09:54:03 +000013674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013675if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013676 ac_cv_rshift_extends_sign=yes
13677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013679fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013682fi
13683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013684fi
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13687$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013688if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013689then
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
Matthias Kloseb9621712010-04-24 17:59:49 +000013691$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013692
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013693fi
13694
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013695# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13697$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013698if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013700else
Martin v. Löwis11437992002-04-12 09:54:03 +000013701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013703/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013704#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013705int
13706main ()
13707{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013708
13709 FILE *f = fopen("/dev/null", "r");
13710 flockfile(f);
13711 getc_unlocked(f);
13712 funlockfile(f);
13713
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 ;
13715 return 0;
13716}
13717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013719 ac_cv_have_getc_unlocked=yes
13720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 ac_cv_have_getc_unlocked=no
13722fi
13723rm -f core conftest.err conftest.$ac_objext \
13724 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13728$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013729if test "$ac_cv_have_getc_unlocked" = yes
13730then
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013733
13734fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013735
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013736# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013737# save the value of LIBS so we don't actually link Python with readline
13738LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013739
Gregory P. Smith18820942008-09-07 06:24:49 +000013740# On some systems we need to link readline to a termcap compatible
13741# library. NOTE: Keep the precedence of listed libraries synchronised
13742# with setup.py.
13743py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13745$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013746for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013747 if test -z "$py_libtermcap"; then
13748 READLINE_LIBS="-lreadline"
13749 else
13750 READLINE_LIBS="-lreadline -l$py_libtermcap"
13751 fi
13752 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013754/* end confdefs.h. */
13755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756/* Override any GCC internal prototype to avoid an error.
13757 Use char because int might match the return type of a GCC
13758 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013759#ifdef __cplusplus
13760extern "C"
13761#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013762char readline ();
13763int
13764main ()
13765{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013767 ;
13768 return 0;
13769}
13770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013771if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013772 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013773fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013774rm -f core conftest.err conftest.$ac_objext \
13775 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013776 if test $py_cv_lib_readline = yes; then
13777 break
13778 fi
13779done
13780# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13781#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013782if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13784$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13787$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013790
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013791fi
13792
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013793# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13795$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013796if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013798else
13799 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013800LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013802/* end confdefs.h. */
13803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804/* Override any GCC internal prototype to avoid an error.
13805 Use char because int might match the return type of a GCC
13806 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013807#ifdef __cplusplus
13808extern "C"
13809#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013810char rl_callback_handler_install ();
13811int
13812main ()
13813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013815 ;
13816 return 0;
13817}
13818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013819if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013820 ac_cv_lib_readline_rl_callback_handler_install=yes
13821else
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013824rm -f core conftest.err conftest.$ac_objext \
13825 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013826LIBS=$ac_check_lib_save_LIBS
13827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13829$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013830if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013831
Matthias Kloseb9621712010-04-24 17:59:49 +000013832$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013833
13834fi
13835
13836
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013837# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013839/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013840#include <readline/readline.h>
13841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013842if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013843 have_readline=yes
13844else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013845 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013846
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013847fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013848rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013849if test $have_readline = yes
13850then
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013852/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013853#include <readline/readline.h>
13854
13855_ACEOF
13856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013860
13861fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013862rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013865/* end confdefs.h. */
13866#include <readline/readline.h>
13867
13868_ACEOF
13869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013873
13874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013875rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013876
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013877fi
13878
Martin v. Löwis0daad592001-09-30 21:09:59 +000013879# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13881$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013882if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013883 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013884else
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013886LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890/* Override any GCC internal prototype to avoid an error.
13891 Use char because int might match the return type of a GCC
13892 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013893#ifdef __cplusplus
13894extern "C"
13895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013896char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013897int
13898main ()
13899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013901 ;
13902 return 0;
13903}
13904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013905if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013906 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013910rm -f core conftest.err conftest.$ac_objext \
13911 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013912LIBS=$ac_check_lib_save_LIBS
13913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13915$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013916if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013919
Martin v. Löwis0daad592001-09-30 21:09:59 +000013920fi
13921
Michael W. Hudson54241132001-12-07 15:38:26 +000013922
Thomas Wouters89d996e2007-09-08 17:39:28 +000013923# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13925$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013926if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013928else
13929 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013930LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013932/* end confdefs.h. */
13933
13934/* Override any GCC internal prototype to avoid an error.
13935 Use char because int might match the return type of a GCC
13936 builtin and then its argument prototype would still apply. */
13937#ifdef __cplusplus
13938extern "C"
13939#endif
13940char rl_completion_display_matches_hook ();
13941int
13942main ()
13943{
13944return rl_completion_display_matches_hook ();
13945 ;
13946 return 0;
13947}
13948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013949if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013950 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13951else
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013954rm -f core conftest.err conftest.$ac_objext \
13955 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013956LIBS=$ac_check_lib_save_LIBS
13957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13959$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013960if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013963
13964fi
13965
13966
Martin v. Löwis0daad592001-09-30 21:09:59 +000013967# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13969$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013970if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013972else
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013974LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978/* Override any GCC internal prototype to avoid an error.
13979 Use char because int might match the return type of a GCC
13980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013981#ifdef __cplusplus
13982extern "C"
13983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013984char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013985int
13986main ()
13987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ;
13990 return 0;
13991}
13992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013994 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013995else
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013998rm -f core conftest.err conftest.$ac_objext \
13999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014000LIBS=$ac_check_lib_save_LIBS
14001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14003$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014007
Guido van Rossum353ae582001-07-10 16:45:32 +000014008fi
14009
Jack Jansendd19cf82001-12-06 22:36:17 +000014010
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014011# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014013/* end confdefs.h. */
14014#include <readline/readline.h>
14015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014017 have_readline=yes
14018else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014019 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014020
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014021fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014022rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014023if test $have_readline = yes
14024then
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014026/* end confdefs.h. */
14027#include <readline/readline.h>
14028
14029_ACEOF
14030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014031 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014034
14035fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014036rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014037
14038fi
14039
Martin v. Löwis82bca632006-02-10 20:49:30 +000014040# End of readline checks: restore LIBS
14041LIBS=$LIBS_no_readline
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14044$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014045if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014047else
Martin v. Löwis11437992002-04-12 09:54:03 +000014048
Matthias Kloseb9621712010-04-24 17:59:49 +000014049if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014050 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014053/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014054
14055int main()
14056{
14057 int val1 = nice(1);
14058 if (val1 != -1 && val1 == nice(2))
14059 exit(0);
14060 exit(1);
14061}
14062
Martin v. Löwis11437992002-04-12 09:54:03 +000014063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014064if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014065 ac_cv_broken_nice=yes
14066else
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14070 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014071fi
14072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014073fi
14074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14076$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014077if test "$ac_cv_broken_nice" = yes
14078then
Martin v. Löwis11437992002-04-12 09:54:03 +000014079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014081
14082fi
14083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14085$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014086if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014087 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014090 ac_cv_broken_poll=no
14091else
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014093/* end confdefs.h. */
14094
14095#include <poll.h>
14096
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014097int main()
14098{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014099 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014100 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014101
14102 close (42);
14103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014105 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014106 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014107 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014108 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014109 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014110 return 1;
14111}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014112
14113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014114if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014115 ac_cv_broken_poll=yes
14116else
Matthias Kloseb9621712010-04-24 17:59:49 +000014117 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14120 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014123fi
14124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14126$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014127if test "$ac_cv_broken_poll" = yes
14128then
14129
Matthias Kloseb9621712010-04-24 17:59:49 +000014130$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014131
14132fi
14133
Brett Cannon43802422005-02-10 20:48:03 +000014134# 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 +000014135# (which is not required by ISO C or UNIX spec) and/or if we support
14136# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014137ac_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 +000014138#include <$ac_cv_struct_tm>
14139
Matthias Kloseb9621712010-04-24 17:59:49 +000014140"
Victor Stinnere0be4232011-10-25 13:06:09 +020014141if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014142
14143cat >>confdefs.h <<_ACEOF
14144#define HAVE_STRUCT_TM_TM_ZONE 1
14145_ACEOF
14146
14147
14148fi
14149
14150if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14151
Matthias Kloseb9621712010-04-24 17:59:49 +000014152$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014153
14154else
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14156"
Victor Stinnere0be4232011-10-25 13:06:09 +020014157if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159else
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161fi
14162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014164#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165_ACEOF
14166
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14168$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014169if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171else
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014173/* end confdefs.h. */
14174#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014175#if !HAVE_DECL_TZNAME
14176extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014177#endif
14178
14179int
14180main ()
14181{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014182return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014183 ;
14184 return 0;
14185}
14186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014187if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014188 ac_cv_var_tzname=yes
14189else
Matthias Kloseb9621712010-04-24 17:59:49 +000014190 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014192rm -f core conftest.err conftest.$ac_objext \
14193 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14196$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014197 if test $ac_cv_var_tzname = yes; then
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014200
14201 fi
14202fi
14203
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014204
Martin v. Löwis1d459062005-03-14 21:23:33 +000014205# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14207$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014208if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014210else
14211
Matthias Kloseb9621712010-04-24 17:59:49 +000014212if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014213 ac_cv_working_tzset=no
14214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014216/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014217
14218#include <stdlib.h>
14219#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014220#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014221
14222#if HAVE_TZNAME
14223extern char *tzname[];
14224#endif
14225
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014226int main()
14227{
Brett Cannon18367812003-09-19 00:59:16 +000014228 /* Note that we need to ensure that not only does tzset(3)
14229 do 'something' with localtime, but it works as documented
14230 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014231 This includes making sure that tzname is set properly if
14232 tm->tm_zone does not exist since it is the alternative way
14233 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014234
14235 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014236 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014237 */
14238
Martin v. Löwis1d459062005-03-14 21:23:33 +000014239 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014240 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14241
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014242 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014243 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014244 if (localtime(&groundhogday)->tm_hour != 0)
14245 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014246#if HAVE_TZNAME
14247 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14248 if (strcmp(tzname[0], "UTC") ||
14249 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14250 exit(1);
14251#endif
Brett Cannon18367812003-09-19 00:59:16 +000014252
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014253 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014254 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014255 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014256 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014257#if HAVE_TZNAME
14258 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14259 exit(1);
14260#endif
Brett Cannon18367812003-09-19 00:59:16 +000014261
14262 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14263 tzset();
14264 if (localtime(&groundhogday)->tm_hour != 11)
14265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014266#if HAVE_TZNAME
14267 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14268 exit(1);
14269#endif
14270
14271#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014272 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14273 exit(1);
14274 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14275 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014276#endif
Brett Cannon18367812003-09-19 00:59:16 +000014277
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014278 exit(0);
14279}
14280
14281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014282if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014283 ac_cv_working_tzset=yes
14284else
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14288 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014289fi
14290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291fi
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14294$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014295if test "$ac_cv_working_tzset" = yes
14296then
14297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014299
14300fi
14301
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014302# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14304$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014305if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014306 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014307else
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014309/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014310#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014311int
14312main ()
14313{
14314
14315struct stat st;
14316st.st_mtim.tv_nsec = 1;
14317
14318 ;
14319 return 0;
14320}
14321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014323 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014324else
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14328fi
14329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14331$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014332if test "$ac_cv_stat_tv_nsec" = yes
14333then
14334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014336
14337fi
14338
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014339# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14341$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014342if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014344else
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014346/* end confdefs.h. */
14347#include <sys/stat.h>
14348int
14349main ()
14350{
14351
14352struct stat st;
14353st.st_mtimespec.tv_nsec = 1;
14354
14355 ;
14356 return 0;
14357}
14358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014360 ac_cv_stat_tv_nsec2=yes
14361else
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14365fi
14366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14368$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014369if test "$ac_cv_stat_tv_nsec2" = yes
14370then
14371
Matthias Kloseb9621712010-04-24 17:59:49 +000014372$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014373
14374fi
14375
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014376ac_save_cppflags="$CPPFLAGS"
14377CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014378# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14380$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014381if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014383else
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014385/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014386#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014387int
14388main ()
14389{
Jack Jansen666b1e72001-10-31 12:11:48 +000014390
14391 int rtn;
14392 rtn = mvwdelch(0,0,0);
14393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 ;
14395 return 0;
14396}
14397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014399 ac_cv_mvwdelch_is_expression=yes
14400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14404fi
14405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14407$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014408
14409if test "$ac_cv_mvwdelch_is_expression" = yes
14410then
Martin v. Löwis11437992002-04-12 09:54:03 +000014411
Matthias Kloseb9621712010-04-24 17:59:49 +000014412$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014413
14414fi
14415
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14417$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014420else
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014422/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014423#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014424int
14425main ()
14426{
Jack Jansen666b1e72001-10-31 12:11:48 +000014427
14428 WINDOW *w;
14429 w->_flags = 0;
14430
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 ;
14432 return 0;
14433}
14434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014436 ac_cv_window_has_flags=yes
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441fi
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14444$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014445
Jack Jansen666b1e72001-10-31 12:11:48 +000014446
14447if test "$ac_cv_window_has_flags" = yes
14448then
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014451
14452fi
14453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14455$as_echo_n "checking for is_term_resized... " >&6; }
14456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014457/* end confdefs.h. */
14458#include <curses.h>
14459int
14460main ()
14461{
14462void *x=is_term_resized
14463 ;
14464 return 0;
14465}
14466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014470
Matthias Kloseb159a552010-04-25 21:00:44 +000014471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014472$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14475$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014476
14477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14481$as_echo_n "checking for resize_term... " >&6; }
14482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014483/* end confdefs.h. */
14484#include <curses.h>
14485int
14486main ()
14487{
14488void *x=resize_term
14489 ;
14490 return 0;
14491}
14492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014493if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014496
Matthias Kloseb159a552010-04-25 21:00:44 +000014497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014499else
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14501$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014502
14503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14507$as_echo_n "checking for resizeterm... " >&6; }
14508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014509/* end confdefs.h. */
14510#include <curses.h>
14511int
14512main ()
14513{
14514void *x=resizeterm
14515 ;
14516 return 0;
14517}
14518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014519if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014522
Matthias Kloseb159a552010-04-25 21:00:44 +000014523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014525else
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14527$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014528
14529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014531# last curses configure check
14532CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14535$as_echo "$as_me: checking for device files" >&6;}
14536
14537if test "x$cross_compiling" = xyes; then
14538 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14540$as_echo_n "checking for /dev/ptmx... " >&6; }
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14542$as_echo "not set" >&6; }
14543 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14544 fi
14545 if test "${ac_cv_file__dev_ptc+set}" != set; then
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14547$as_echo_n "checking for /dev/ptc... " >&6; }
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14549$as_echo "not set" >&6; }
14550 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14551 fi
14552fi
14553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14555$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014556if ${ac_cv_file__dev_ptmx+:} false; then :
14557 $as_echo_n "(cached) " >&6
14558else
14559 test "$cross_compiling" = yes &&
14560 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14561if test -r "/dev/ptmx"; then
14562 ac_cv_file__dev_ptmx=yes
14563else
14564 ac_cv_file__dev_ptmx=no
14565fi
14566fi
14567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14568$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14569if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014570
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014571fi
14572
14573if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014576
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14579$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014580if ${ac_cv_file__dev_ptc+:} false; then :
14581 $as_echo_n "(cached) " >&6
14582else
14583 test "$cross_compiling" = yes &&
14584 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14585if test -r "/dev/ptc"; then
14586 ac_cv_file__dev_ptc=yes
14587else
14588 ac_cv_file__dev_ptc=no
14589fi
14590fi
14591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14592$as_echo "$ac_cv_file__dev_ptc" >&6; }
14593if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014594
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014595fi
14596
14597if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014600
Neal Norwitz865400f2003-03-21 01:42:58 +000014601fi
14602
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014603if test "$have_long_long" = yes
14604then
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14606$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014607 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014611 ac_cv_have_long_long_format="cross -- assuming no"
14612 if test x$GCC = xyes; then
14613 save_CFLAGS=$CFLAGS
14614 CFLAGS="$CFLAGS -Werror -Wformat"
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616/* end confdefs.h. */
14617
14618 #include <stdio.h>
14619 #include <stddef.h>
14620
14621int
14622main ()
14623{
14624
14625 char *buffer;
14626 sprintf(buffer, "%lld", (long long)123);
14627 sprintf(buffer, "%lld", (long long)-123);
14628 sprintf(buffer, "%llu", (unsigned long long)123);
14629
14630 ;
14631 return 0;
14632}
14633_ACEOF
14634if ac_fn_c_try_compile "$LINENO"; then :
14635 ac_cv_have_long_long_format=yes
14636
14637fi
14638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14639 CFLAGS=$save_CFLAGS
14640 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014643/* end confdefs.h. */
14644
14645 #include <stdio.h>
14646 #include <stddef.h>
14647 #include <string.h>
14648
14649 #ifdef HAVE_SYS_TYPES_H
14650 #include <sys/types.h>
14651 #endif
14652
14653 int main()
14654 {
14655 char buffer[256];
14656
14657 if (sprintf(buffer, "%lld", (long long)123) < 0)
14658 return 1;
14659 if (strcmp(buffer, "123"))
14660 return 1;
14661
14662 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14663 return 1;
14664 if (strcmp(buffer, "-123"))
14665 return 1;
14666
14667 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14668 return 1;
14669 if (strcmp(buffer, "123"))
14670 return 1;
14671
14672 return 0;
14673 }
14674
14675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014676if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014677 ac_cv_have_long_long_format=yes
14678else
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014681rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14682 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014683fi
14684
14685
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014686fi
14687
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14689$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014690fi
14691
Mark Dickinson89d7d412009-12-31 20:50:59 +000014692if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014693then
14694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014696
14697fi
14698
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014699if test $ac_sys_system = Darwin
14700then
14701 LIBS="$LIBS -framework CoreFoundation"
14702fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14705$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014706if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014708else
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014710 ac_cv_have_size_t_format="cross -- assuming yes"
14711
Thomas Wouters477c8d52006-05-27 19:21:47 +000014712else
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014714/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014715
Thomas Wouters477c8d52006-05-27 19:21:47 +000014716#include <stdio.h>
14717#include <stddef.h>
14718#include <string.h>
14719
Christian Heimes2c181612007-12-17 20:04:13 +000014720#ifdef HAVE_SYS_TYPES_H
14721#include <sys/types.h>
14722#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014723
14724#ifdef HAVE_SSIZE_T
14725typedef ssize_t Py_ssize_t;
14726#elif SIZEOF_VOID_P == SIZEOF_LONG
14727typedef long Py_ssize_t;
14728#else
14729typedef int Py_ssize_t;
14730#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014731
Christian Heimes2c181612007-12-17 20:04:13 +000014732int main()
14733{
14734 char buffer[256];
14735
Thomas Wouters477c8d52006-05-27 19:21:47 +000014736 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14737 return 1;
14738
Thomas Wouters89f507f2006-12-13 04:49:30 +000014739 if (strcmp(buffer, "123"))
14740 return 1;
14741
14742 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14743 return 1;
14744
14745 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014746 return 1;
14747
14748 return 0;
14749}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014750
Thomas Wouters477c8d52006-05-27 19:21:47 +000014751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014752if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014753 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014754else
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014759fi
14760
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14763$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014764if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014767
14768fi
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014771#ifdef HAVE_SYS_TYPES_H
14772#include <sys/types.h>
14773#endif
14774#ifdef HAVE_SYS_SOCKET_H
14775#include <sys/socket.h>
14776#endif
14777
Matthias Kloseb9621712010-04-24 17:59:49 +000014778"
Victor Stinnere0be4232011-10-25 13:06:09 +020014779if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014784
14785fi
14786
Michael W. Hudson54241132001-12-07 15:38:26 +000014787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14789$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014790if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014794 ac_cv_broken_mbstowcs=no
14795else
Matthias Kloseb9621712010-04-24 17:59:49 +000014796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014797/* end confdefs.h. */
14798
14799#include<stdlib.h>
14800int main() {
14801 size_t len = -1;
14802 const char *str = "text";
14803 len = mbstowcs(NULL, str, 0);
14804 return (len != 4);
14805}
14806
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014809 ac_cv_broken_mbstowcs=no
14810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014815fi
14816
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014817fi
14818
Matthias Kloseb9621712010-04-24 17:59:49 +000014819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14820$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014821if test "$ac_cv_broken_mbstowcs" = yes
14822then
14823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014825
14826fi
14827
Antoine Pitroub52ec782009-01-25 16:34:23 +000014828# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14830$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014831
14832# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014833if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014834 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014835if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014836then
14837
Matthias Kloseb9621712010-04-24 17:59:49 +000014838$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14841$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014842fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014843if test "$withval" = no
14844then
14845
14846$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14849$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014850fi
14851
Antoine Pitrou042b1282010-08-13 21:15:58 +000014852else
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14854$as_echo "no value specified" >&6; }
14855fi
14856
Antoine Pitroub52ec782009-01-25 16:34:23 +000014857
Matthias Kloseb17289e2012-03-15 19:51:34 +010014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14859$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14860if ${ac_cv_computed_gotos+:} false; then :
14861 $as_echo_n "(cached) " >&6
14862else
14863 if test "$cross_compiling" = yes; then :
14864 if test "${with_computed_gotos+set}" = set; then
14865 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14866 else
14867 ac_cv_computed_gotos=no
14868 fi
14869else
14870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14871/* end confdefs.h. */
14872
14873int main(int argc, char **argv)
14874{
14875 static void *targets[1] = { &&LABEL1 };
14876 goto LABEL2;
14877LABEL1:
14878 return 0;
14879LABEL2:
14880 goto *targets[0];
14881 return 1;
14882}
14883
14884_ACEOF
14885if ac_fn_c_try_run "$LINENO"; then :
14886 ac_cv_computed_gotos=yes
14887else
14888 ac_cv_computed_gotos=no
14889fi
14890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14891 conftest.$ac_objext conftest.beam conftest.$ac_ext
14892fi
14893
14894fi
14895
14896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14897$as_echo "$ac_cv_computed_gotos" >&6; }
14898case "$ac_cv_computed_gotos" in yes*)
14899
14900$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14901
14902esac
14903
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014904case $ac_sys_system in
14905AIX*)
14906
14907$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14908 ;;
14909esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910
Michael W. Hudson54241132001-12-07 15:38:26 +000014911
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014912
14913
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014914for h in `(cd $srcdir;echo Python/thread_*.h)`
14915do
14916 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14917done
14918
Michael W. Hudson54241132001-12-07 15:38:26 +000014919
Neal Norwitzd24499d2005-12-18 21:36:39 +000014920SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14922$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014923for dir in $SRCDIRS; do
14924 if test ! -d $dir; then
14925 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014926 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014927done
Matthias Kloseb9621712010-04-24 17:59:49 +000014928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14929$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014930
Stefan Krah1919b7e2012-03-21 18:25:23 +010014931# Availability of -O2:
14932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14933$as_echo_n "checking for -O2... " >&6; }
14934saved_cflags="$CFLAGS"
14935CFLAGS="-O2"
14936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14937/* end confdefs.h. */
14938
14939int
14940main ()
14941{
14942
14943
14944 ;
14945 return 0;
14946}
14947_ACEOF
14948if ac_fn_c_try_compile "$LINENO"; then :
14949 have_O2=yes
14950else
14951 have_O2=no
14952fi
14953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14955$as_echo "$have_O2" >&6; }
14956CFLAGS="$saved_cflags"
14957
14958# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14959# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14961$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14962saved_cflags="$CFLAGS"
14963CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14964if test "$have_O2" = no; then
14965 CFLAGS=""
14966fi
14967if test "$cross_compiling" = yes; then :
14968 have_glibc_memmove_bug=undefined
14969else
14970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14971/* end confdefs.h. */
14972
14973#include <stdio.h>
14974#include <stdlib.h>
14975#include <string.h>
14976void foo(void *p, void *q) { memmove(p, q, 19); }
14977int main() {
14978 char a[32] = "123456789000000000";
14979 foo(&a[9], a);
14980 if (strcmp(a, "123456789123456789000000000") != 0)
14981 return 1;
14982 foo(a, &a[9]);
14983 if (strcmp(a, "123456789000000000") != 0)
14984 return 1;
14985 return 0;
14986}
14987
14988_ACEOF
14989if ac_fn_c_try_run "$LINENO"; then :
14990 have_glibc_memmove_bug=no
14991else
14992 have_glibc_memmove_bug=yes
14993fi
14994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14995 conftest.$ac_objext conftest.beam conftest.$ac_ext
14996fi
14997
14998CFLAGS="$saved_cflags"
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15000$as_echo "$have_glibc_memmove_bug" >&6; }
15001if test "$have_glibc_memmove_bug" = yes; then
15002
15003$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15004
15005fi
15006
15007if test "$have_gcc_asm_for_x87" = yes; then
15008 # Some versions of gcc miscompile inline asm:
15009 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15010 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15011 case $CC in
15012 *gcc*)
15013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15014$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15015 saved_cflags="$CFLAGS"
15016 CFLAGS="-O2"
15017 if test "$cross_compiling" = yes; then :
15018 have_ipa_pure_const_bug=undefined
15019else
15020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15021/* end confdefs.h. */
15022
15023 __attribute__((noinline)) int
15024 foo(int *p) {
15025 int r;
15026 asm ( "movl \$6, (%1)\n\t"
15027 "xorl %0, %0\n\t"
15028 : "=r" (r) : "r" (p) : "memory"
15029 );
15030 return r;
15031 }
15032 int main() {
15033 int p = 8;
15034 if ((foo(&p) ? : p) != 6)
15035 return 1;
15036 return 0;
15037 }
15038
15039_ACEOF
15040if ac_fn_c_try_run "$LINENO"; then :
15041 have_ipa_pure_const_bug=no
15042else
15043 have_ipa_pure_const_bug=yes
15044fi
15045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15046 conftest.$ac_objext conftest.beam conftest.$ac_ext
15047fi
15048
15049 CFLAGS="$saved_cflags"
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15051$as_echo "$have_ipa_pure_const_bug" >&6; }
15052 if test "$have_ipa_pure_const_bug" = yes; then
15053
15054$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15055
15056 fi
15057 ;;
15058 esac
15059fi
15060
Guido van Rossum627b2d71993-12-24 10:39:16 +000015061# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015062ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015063
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015064ac_config_files="$ac_config_files Modules/ld_so_aix"
15065
Martin v. Löwis11437992002-04-12 09:54:03 +000015066cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015067# This file is a shell script that caches the results of configure
15068# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015069# scripts and configure runs, see configure's option --config-cache.
15070# It is not useful on other systems. If it contains results you don't
15071# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015072#
Martin v. Löwis11437992002-04-12 09:54:03 +000015073# config.status only pays attention to the cache file if you give it
15074# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075#
Skip Montanaro6dead952003-09-25 14:50:04 +000015076# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015077# loading this file, other *unset* `ac_cv_foo' will be assigned the
15078# following values.
15079
15080_ACEOF
15081
Guido van Rossumf78abae1997-01-21 22:02:36 +000015082# The following way of writing the cache mishandles newlines in values,
15083# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015085# Ultrix sh set writes to stderr and can't be redirected directly,
15086# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087(
15088 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15089 eval ac_val=\$$ac_var
15090 case $ac_val in #(
15091 *${as_nl}*)
15092 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15094$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095 esac
15096 case $ac_var in #(
15097 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15099 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100 esac ;;
15101 esac
15102 done
15103
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15106 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 # `set' does not quote correctly, so add quotes: double-quote
15108 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015110 "s/'/'\\\\''/g;
15111 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015113 *)
15114 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015115 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015116 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015117 esac |
15118 sort
15119) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15125 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15127 :end' >>confcache
15128if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15129 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015130 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15132$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015133 if test ! -f "$cache_file" || test -h "$cache_file"; then
15134 cat confcache >"$cache_file"
15135 else
15136 case $cache_file in #(
15137 */* | ?:*)
15138 mv -f confcache "$cache_file"$$ &&
15139 mv -f "$cache_file"$$ "$cache_file" ;; #(
15140 *)
15141 mv -f confcache "$cache_file" ;;
15142 esac
15143 fi
15144 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015145 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15147$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015148 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015149fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015150rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015151
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152test "x$prefix" = xNONE && prefix=$ac_default_prefix
15153# Let make expand exec_prefix.
15154test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015155
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015156DEFS=-DHAVE_CONFIG_H
15157
Skip Montanaro6dead952003-09-25 14:50:04 +000015158ac_libobjs=
15159ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015160U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015161for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15162 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15166 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15168 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015169done
15170LIBOBJS=$ac_libobjs
15171
15172LTLIBOBJS=$ac_ltlibobjs
15173
15174
Martin v. Löwis11437992002-04-12 09:54:03 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176
Victor Stinnere0be4232011-10-25 13:06:09 +020015177: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015178ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015179ac_clean_files_save=$ac_clean_files
15180ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015181{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15182$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15183as_write_fail=0
15184cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015185#! $SHELL
15186# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015187# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015188# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015189# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015190
Martin v. Löwis11437992002-04-12 09:54:03 +000015191debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015192ac_cs_recheck=false
15193ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195SHELL=\${CONFIG_SHELL-$SHELL}
15196export SHELL
15197_ASEOF
15198cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15199## -------------------- ##
15200## M4sh Initialization. ##
15201## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203# Be more Bourne compatible
15204DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015205if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 emulate sh
15207 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015209 # is contrary to our usage. Disable this feature.
15210 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015212else
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 case `(set -o) 2>/dev/null` in #(
15214 *posix*) :
15215 set -o posix ;; #(
15216 *) :
15217 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015219fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015220
15221
Matthias Kloseb9621712010-04-24 17:59:49 +000015222as_nl='
15223'
15224export as_nl
15225# Printing a long string crashes Solaris 7 /usr/bin/printf.
15226as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15227as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15228as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15229# Prefer a ksh shell builtin over an external printf program on Solaris,
15230# but without wasting forks for bash or zsh.
15231if test -z "$BASH_VERSION$ZSH_VERSION" \
15232 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15233 as_echo='print -r --'
15234 as_echo_n='print -rn --'
15235elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15236 as_echo='printf %s\n'
15237 as_echo_n='printf %s'
15238else
15239 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15240 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15241 as_echo_n='/usr/ucb/echo -n'
15242 else
15243 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15244 as_echo_n_body='eval
15245 arg=$1;
15246 case $arg in #(
15247 *"$as_nl"*)
15248 expr "X$arg" : "X\\(.*\\)$as_nl";
15249 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15250 esac;
15251 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15252 '
15253 export as_echo_n_body
15254 as_echo_n='sh -c $as_echo_n_body as_echo'
15255 fi
15256 export as_echo_body
15257 as_echo='sh -c $as_echo_body as_echo'
15258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
15260# The user is always right.
15261if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 PATH_SEPARATOR=:
15263 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15264 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15265 PATH_SEPARATOR=';'
15266 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015268
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269
15270# IFS
15271# We need space, tab and new line, in precisely that order. Quoting is
15272# there to prevent editors from complaining about space-tab.
15273# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15274# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275IFS=" "" $as_nl"
15276
15277# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015278as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015279case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280 *[\\/]* ) as_myself=$0 ;;
15281 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015282for as_dir in $PATH
15283do
15284 IFS=$as_save_IFS
15285 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15287 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 ;;
15291esac
15292# We did not find ourselves, most probably we were run as `sh COMMAND'
15293# in which case we are not to be found in the path.
15294if test "x$as_myself" = x; then
15295 as_myself=$0
15296fi
15297if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15299 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300fi
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302# Unset variables that we do not need and which cause bugs (e.g. in
15303# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15304# suppresses any "Segmentation fault" message there. '((' could
15305# trigger a bug in pdksh 5.2.14.
15306for as_var in BASH_ENV ENV MAIL MAILPATH
15307do eval test x\${$as_var+set} = xset \
15308 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309done
15310PS1='$ '
15311PS2='> '
15312PS4='+ '
15313
15314# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015315LC_ALL=C
15316export LC_ALL
15317LANGUAGE=C
15318export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320# CDPATH.
15321(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15322
15323
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015324# as_fn_error STATUS ERROR [LINENO LOG_FD]
15325# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015326# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15327# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015328# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015329as_fn_error ()
15330{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015331 as_status=$1; test $as_status -eq 0 && as_status=1
15332 if test "$4"; then
15333 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15334 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015336 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 as_fn_exit $as_status
15338} # as_fn_error
15339
15340
15341# as_fn_set_status STATUS
15342# -----------------------
15343# Set $? to STATUS, without forking.
15344as_fn_set_status ()
15345{
15346 return $1
15347} # as_fn_set_status
15348
15349# as_fn_exit STATUS
15350# -----------------
15351# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15352as_fn_exit ()
15353{
15354 set +e
15355 as_fn_set_status $1
15356 exit $1
15357} # as_fn_exit
15358
15359# as_fn_unset VAR
15360# ---------------
15361# Portably unset VAR.
15362as_fn_unset ()
15363{
15364 { eval $1=; unset $1;}
15365}
15366as_unset=as_fn_unset
15367# as_fn_append VAR VALUE
15368# ----------------------
15369# Append the text in VALUE to the end of the definition contained in VAR. Take
15370# advantage of any shell optimizations that allow amortized linear growth over
15371# repeated appends, instead of the typical quadratic growth present in naive
15372# implementations.
15373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15374 eval 'as_fn_append ()
15375 {
15376 eval $1+=\$2
15377 }'
15378else
15379 as_fn_append ()
15380 {
15381 eval $1=\$$1\$2
15382 }
15383fi # as_fn_append
15384
15385# as_fn_arith ARG...
15386# ------------------
15387# Perform arithmetic evaluation on the ARGs, and store the result in the
15388# global $as_val. Take advantage of shells that can avoid forks. The arguments
15389# must be portable across $(()) and expr.
15390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15391 eval 'as_fn_arith ()
15392 {
15393 as_val=$(( $* ))
15394 }'
15395else
15396 as_fn_arith ()
15397 {
15398 as_val=`expr "$@" || test $? -eq 1`
15399 }
15400fi # as_fn_arith
15401
15402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015403if expr a : '\(a\)' >/dev/null 2>&1 &&
15404 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15405 as_expr=expr
15406else
15407 as_expr=false
15408fi
15409
15410if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15411 as_basename=basename
15412else
15413 as_basename=false
15414fi
15415
Matthias Kloseb9621712010-04-24 17:59:49 +000015416if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15417 as_dirname=dirname
15418else
15419 as_dirname=false
15420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015422as_me=`$as_basename -- "$0" ||
15423$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15424 X"$0" : 'X\(//\)$' \| \
15425 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015426$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427 sed '/^.*\/\([^/][^/]*\)\/*$/{
15428 s//\1/
15429 q
15430 }
15431 /^X\/\(\/\/\)$/{
15432 s//\1/
15433 q
15434 }
15435 /^X\/\(\/\).*/{
15436 s//\1/
15437 q
15438 }
15439 s/.*/./; q'`
15440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441# Avoid depending upon Character Ranges.
15442as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15443as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15444as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15445as_cr_digits='0123456789'
15446as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447
15448ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015449case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 xy) ECHO_C='\c';;
15454 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15455 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456 esac;;
15457*)
15458 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015459esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015460
Martin v. Löwis11437992002-04-12 09:54:03 +000015461rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462if test -d conf$$.dir; then
15463 rm -f conf$$.dir/conf$$.file
15464else
15465 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015468if (echo >conf$$.file) 2>/dev/null; then
15469 if ln -s conf$$.file conf$$ 2>/dev/null; then
15470 as_ln_s='ln -s'
15471 # ... but there are two gotchas:
15472 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15473 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015474 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015476 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 elif ln conf$$.file conf$$ 2>/dev/null; then
15478 as_ln_s=ln
15479 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015480 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015482else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015483 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15486rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488
15489# as_fn_mkdir_p
15490# -------------
15491# Create "$as_dir" as a directory, including parents if necessary.
15492as_fn_mkdir_p ()
15493{
15494
15495 case $as_dir in #(
15496 -*) as_dir=./$as_dir;;
15497 esac
15498 test -d "$as_dir" || eval $as_mkdir_p || {
15499 as_dirs=
15500 while :; do
15501 case $as_dir in #(
15502 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15503 *) as_qdir=$as_dir;;
15504 esac
15505 as_dirs="'$as_qdir' $as_dirs"
15506 as_dir=`$as_dirname -- "$as_dir" ||
15507$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15508 X"$as_dir" : 'X\(//\)[^/]' \| \
15509 X"$as_dir" : 'X\(//\)$' \| \
15510 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15511$as_echo X"$as_dir" |
15512 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15513 s//\1/
15514 q
15515 }
15516 /^X\(\/\/\)[^/].*/{
15517 s//\1/
15518 q
15519 }
15520 /^X\(\/\/\)$/{
15521 s//\1/
15522 q
15523 }
15524 /^X\(\/\).*/{
15525 s//\1/
15526 q
15527 }
15528 s/.*/./; q'`
15529 test -d "$as_dir" && break
15530 done
15531 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015532 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015533
15534
15535} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015536if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015538else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015539 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015540 as_mkdir_p=false
15541fi
15542
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015543if test -x / >/dev/null 2>&1; then
15544 as_test_x='test -x'
15545else
15546 if ls -dL / >/dev/null 2>&1; then
15547 as_ls_L_option=L
15548 else
15549 as_ls_L_option=
15550 fi
15551 as_test_x='
15552 eval sh -c '\''
15553 if test -d "$1"; then
15554 test -d "$1/.";
15555 else
15556 case $1 in #(
15557 -*)set "./$1";;
15558 esac;
15559 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15560 ???[sx]*):;;*)false;;esac;fi
15561 '\'' sh
15562 '
15563fi
15564as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015565
15566# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015567as_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 +000015568
15569# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015570as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015571
15572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015574## ----------------------------------- ##
15575## Main body of $CONFIG_STATUS script. ##
15576## ----------------------------------- ##
15577_ASEOF
15578test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
Matthias Kloseb9621712010-04-24 17:59:49 +000015580cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15581# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015582# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583# values after options handling.
15584ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015585This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015586generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015587
15588 CONFIG_FILES = $CONFIG_FILES
15589 CONFIG_HEADERS = $CONFIG_HEADERS
15590 CONFIG_LINKS = $CONFIG_LINKS
15591 CONFIG_COMMANDS = $CONFIG_COMMANDS
15592 $ $0 $@
15593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594on `(hostname || uname -n) 2>/dev/null | sed 1q`
15595"
15596
Martin v. Löwis11437992002-04-12 09:54:03 +000015597_ACEOF
15598
Matthias Kloseb9621712010-04-24 17:59:49 +000015599case $ac_config_files in *"
15600"*) set x $ac_config_files; shift; ac_config_files=$*;;
15601esac
15602
15603case $ac_config_headers in *"
15604"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15605esac
15606
15607
15608cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015609# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015610config_files="$ac_config_files"
15611config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015613_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015616ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015617\`$as_me' instantiates files and other configuration actions
15618from templates according to the current configuration. Unless the files
15619and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015622
15623 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 --config print configuration, then exit
15626 -q, --quiet, --silent
15627 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015628 -d, --debug don't remove temporary files
15629 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 --file=FILE[:TEMPLATE]
15631 instantiate the configuration file FILE
15632 --header=FILE[:TEMPLATE]
15633 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
15635Configuration files:
15636$config_files
15637
15638Configuration headers:
15639$config_headers
15640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15645ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015646ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015647python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015648configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015650
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015651Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015652This config.status script is free software; the Free Software Foundation
15653gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015654
15655ac_pwd='$ac_pwd'
15656srcdir='$srcdir'
15657INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015658MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015659test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
15661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15663# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015664ac_need_defaults=:
15665while test $# != 0
15666do
15667 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015668 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15670 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015671 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015673 --*=)
15674 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15675 ac_optarg=
15676 ac_shift=:
15677 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015679 ac_option=$1
15680 ac_optarg=$2
15681 ac_shift=shift
15682 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 esac
15684
Skip Montanaro6dead952003-09-25 14:50:04 +000015685 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015687 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15688 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015689 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 $as_echo "$ac_cs_version"; exit ;;
15691 --config | --confi | --conf | --con | --co | --c )
15692 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015694 debug=: ;;
15695 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015696 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 case $ac_optarg in
15698 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015699 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015700 esac
15701 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015702 ac_need_defaults=false;;
15703 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015704 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 case $ac_optarg in
15706 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15707 esac
15708 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710 --he | --h)
15711 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015712 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015713Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015716 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15717 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15718 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
15720 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015721 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015722Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015726
15727 esac
15728 shift
15729done
15730
Skip Montanaro6dead952003-09-25 14:50:04 +000015731ac_configure_extra_args=
15732
15733if $ac_cs_silent; then
15734 exec 6>/dev/null
15735 ac_configure_extra_args="$ac_configure_extra_args --silent"
15736fi
15737
15738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015740if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015741 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 shift
15743 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15744 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015746 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015747fi
15748
Martin v. Löwis11437992002-04-12 09:54:03 +000015749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015750cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751exec 5>>config.log
15752{
15753 echo
15754 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15755## Running $as_me. ##
15756_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015761cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765
15766# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015767for ac_config_target in $ac_config_targets
15768do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 case $ac_config_target in
15770 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15771 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15772 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015773 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15774 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15776 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015777 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015778 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779
Victor Stinnere0be4232011-10-25 13:06:09 +020015780 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 esac
15782done
15783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784
Martin v. Löwis11437992002-04-12 09:54:03 +000015785# If the user did not use the arguments to specify the items to instantiate,
15786# then the envvar interface is used. Set only those that are not.
15787# We use the long form for the default assignment because of an extremely
15788# bizarre bug on SunOS 4.1.3.
15789if $ac_need_defaults; then
15790 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15791 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15792fi
15793
Skip Montanaro6dead952003-09-25 14:50:04 +000015794# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015796# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797# Hook for its removal unless debugging.
15798# Note that there is a small window in which the directory will not be cleaned:
15799# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015800$debug ||
15801{
Victor Stinnere0be4232011-10-25 13:06:09 +020015802 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015804 : "${ac_tmp:=$tmp}"
15805 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015808}
Martin v. Löwis11437992002-04-12 09:54:03 +000015809# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015810
Martin v. Löwis11437992002-04-12 09:54:03 +000015811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015813 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015814} ||
15815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816 tmp=./conf$$-$RANDOM
15817 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015818} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015819ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821# Set up the scripts for CONFIG_FILES section.
15822# No need to generate them if there are no CONFIG_FILES.
15823# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015825
Matthias Kloseb9621712010-04-24 17:59:49 +000015826
15827ac_cr=`echo X | tr X '\015'`
15828# On cygwin, bash can eat \r inside `` if the user requested igncr.
15829# But we know of no other shell where ac_cr would be empty at this
15830# point, so we can use a bashism as a fallback.
15831if test "x$ac_cr" = x; then
15832 eval ac_cr=\$\'\\r\'
15833fi
15834ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15835if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015836 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015837else
15838 ac_cs_awk_cr=$ac_cr
15839fi
15840
Victor Stinnere0be4232011-10-25 13:06:09 +020015841echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015842_ACEOF
15843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845{
15846 echo "cat >conf$$subs.awk <<_ACEOF" &&
15847 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15848 echo "_ACEOF"
15849} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015850 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15851ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852ac_delim='%!_!# '
15853for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015854 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015855 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015856
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15858 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859 break
15860 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015861 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862 else
15863 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865done
Matthias Kloseb9621712010-04-24 17:59:49 +000015866rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015869cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015871sed -n '
15872h
15873s/^/S["/; s/!.*/"]=/
15874p
15875g
15876s/^[^!]*!//
15877:repl
15878t repl
15879s/'"$ac_delim"'$//
15880t delim
15881:nl
15882h
15883s/\(.\{148\}\)..*/\1/
15884t more1
15885s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15886p
15887n
15888b repl
15889:more1
15890s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15891p
15892g
15893s/.\{148\}//
15894t nl
15895:delim
15896h
15897s/\(.\{148\}\)..*/\1/
15898t more2
15899s/["\\]/\\&/g; s/^/"/; s/$/"/
15900p
15901b
15902:more2
15903s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15904p
15905g
15906s/.\{148\}//
15907t delim
15908' <conf$$subs.awk | sed '
15909/^[^""]/{
15910 N
15911 s/\n//
15912}
15913' >>$CONFIG_STATUS || ac_write_fail=1
15914rm -f conf$$subs.awk
15915cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15916_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015917cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 for (key in S) S_is_set[key] = 1
15919 FS = ""
15920
15921}
15922{
15923 line = $ 0
15924 nfields = split(line, field, "@")
15925 substed = 0
15926 len = length(field[1])
15927 for (i = 2; i < nfields; i++) {
15928 key = field[i]
15929 keylen = length(key)
15930 if (S_is_set[key]) {
15931 value = S[key]
15932 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15933 len += length(value) + length(field[++i])
15934 substed = 1
15935 } else
15936 len += 1 + keylen
15937 }
15938
15939 print line
15940}
15941
15942_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15945if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15946 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15947else
15948 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015949fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015950 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015951_ACEOF
15952
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015953# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15954# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955# trailing colons and then remove the whole line if VPATH becomes empty
15956# (actually we leave an empty line to preserve line numbers).
15957if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015958 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15959h
15960s///
15961s/^/:/
15962s/[ ]*$/:/
15963s/:\$(srcdir):/:/g
15964s/:\${srcdir}:/:/g
15965s/:@srcdir@:/:/g
15966s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015968x
15969s/\(=[ ]*\).*/\1/
15970G
15971s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972s/^[^=]*=[ ]*$//
15973}'
15974fi
15975
Matthias Kloseb9621712010-04-24 17:59:49 +000015976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015977fi # test -n "$CONFIG_FILES"
15978
Matthias Kloseb9621712010-04-24 17:59:49 +000015979# Set up the scripts for CONFIG_HEADERS section.
15980# No need to generate them if there are no CONFIG_HEADERS.
15981# This happens for instance with `./config.status Makefile'.
15982if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015983cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015984BEGIN {
15985_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987# Transform confdefs.h into an awk script `defines.awk', embedded as
15988# here-document in config.status, that substitutes the proper values into
15989# config.h.in to produce config.h.
15990
15991# Create a delimiter string that does not exist in confdefs.h, to ease
15992# handling of long lines.
15993ac_delim='%!_!# '
15994for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015995 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15996 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015997 break
15998 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015999 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 else
16001 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16002 fi
16003done
16004
16005# For the awk script, D is an array of macro values keyed by name,
16006# likewise P contains macro parameters if any. Preserve backslash
16007# newline sequences.
16008
16009ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16010sed -n '
16011s/.\{148\}/&'"$ac_delim"'/g
16012t rset
16013:rset
16014s/^[ ]*#[ ]*define[ ][ ]*/ /
16015t def
16016d
16017:def
16018s/\\$//
16019t bsnl
16020s/["\\]/\\&/g
16021s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16022D["\1"]=" \3"/p
16023s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16024d
16025:bsnl
16026s/["\\]/\\&/g
16027s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16028D["\1"]=" \3\\\\\\n"\\/p
16029t cont
16030s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16031t cont
16032d
16033:cont
16034n
16035s/.\{148\}/&'"$ac_delim"'/g
16036t clear
16037:clear
16038s/\\$//
16039t bsnlc
16040s/["\\]/\\&/g; s/^/"/; s/$/"/p
16041d
16042:bsnlc
16043s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16044b cont
16045' <confdefs.h | sed '
16046s/'"$ac_delim"'/"\\\
16047"/g' >>$CONFIG_STATUS || ac_write_fail=1
16048
16049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16050 for (key in D) D_is_set[key] = 1
16051 FS = ""
16052}
16053/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16054 line = \$ 0
16055 split(line, arg, " ")
16056 if (arg[1] == "#") {
16057 defundef = arg[2]
16058 mac1 = arg[3]
16059 } else {
16060 defundef = substr(arg[1], 2)
16061 mac1 = arg[2]
16062 }
16063 split(mac1, mac2, "(") #)
16064 macro = mac2[1]
16065 prefix = substr(line, 1, index(line, defundef) - 1)
16066 if (D_is_set[macro]) {
16067 # Preserve the white space surrounding the "#".
16068 print prefix "define", macro P[macro] D[macro]
16069 next
16070 } else {
16071 # Replace #undef with comments. This is necessary, for example,
16072 # in the case of _POSIX_SOURCE, which is predefined and required
16073 # on some systems where configure will not decide to define it.
16074 if (defundef == "undef") {
16075 print "/*", prefix defundef, macro, "*/"
16076 next
16077 }
16078 }
16079}
16080{ print }
16081_ACAWK
16082_ACEOF
16083cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016084 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016085fi # test -n "$CONFIG_HEADERS"
16086
16087
16088eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16089shift
16090for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091do
16092 case $ac_tag in
16093 :[FHLC]) ac_mode=$ac_tag; continue;;
16094 esac
16095 case $ac_mode$ac_tag in
16096 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016097 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 :[FH]-) ac_tag=-:-;;
16099 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16100 esac
16101 ac_save_IFS=$IFS
16102 IFS=:
16103 set x $ac_tag
16104 IFS=$ac_save_IFS
16105 shift
16106 ac_file=$1
16107 shift
16108
16109 case $ac_mode in
16110 :L) ac_source=$1;;
16111 :[FH])
16112 ac_file_inputs=
16113 for ac_f
16114 do
16115 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016116 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117 *) # Look for the file first in the build tree, then in the source tree
16118 # (if the path is not absolute). The absolute path cannot be DOS-style,
16119 # because $ac_f cannot contain `:'.
16120 test -f "$ac_f" ||
16121 case $ac_f in
16122 [\\/$]*) false;;
16123 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16124 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016125 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016126 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16128 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129 done
16130
16131 # Let's still pretend it is `configure' which instantiates (i.e., don't
16132 # use $as_me), people would be surprised to read:
16133 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016134 configure_input='Generated from '`
16135 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16136 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137 if test x"$ac_file" != x-; then
16138 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16140$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016142 # Neutralize special characters interpreted by sed in replacement strings.
16143 case $configure_input in #(
16144 *\&* | *\|* | *\\* )
16145 ac_sed_conf_input=`$as_echo "$configure_input" |
16146 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16147 *) ac_sed_conf_input=$configure_input;;
16148 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149
16150 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016151 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16152 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153 esac
16154 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 esac
16156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016158$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016159 X"$ac_file" : 'X\(//\)[^/]' \| \
16160 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016162$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16164 s//\1/
16165 q
16166 }
16167 /^X\(\/\/\)[^/].*/{
16168 s//\1/
16169 q
16170 }
16171 /^X\(\/\/\)$/{
16172 s//\1/
16173 q
16174 }
16175 /^X\(\/\).*/{
16176 s//\1/
16177 q
16178 }
16179 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016180 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016181 ac_builddir=.
16182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016183case "$ac_dir" in
16184.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16185*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016186 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016188 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016189 case $ac_top_builddir_sub in
16190 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16191 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16192 esac ;;
16193esac
16194ac_abs_top_builddir=$ac_pwd
16195ac_abs_builddir=$ac_pwd$ac_dir_suffix
16196# for backward compatibility:
16197ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016198
16199case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016201 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 ac_top_srcdir=$ac_top_builddir_sub
16203 ac_abs_top_srcdir=$ac_pwd ;;
16204 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 ac_top_srcdir=$srcdir
16207 ac_abs_top_srcdir=$srcdir ;;
16208 *) # Relative name.
16209 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16210 ac_top_srcdir=$ac_top_build_prefix$srcdir
16211 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016212esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016214
Martin v. Löwis11437992002-04-12 09:54:03 +000016215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 case $ac_mode in
16217 :F)
16218 #
16219 # CONFIG_FILE
16220 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016221
16222 case $INSTALL in
16223 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016225 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016226 ac_MKDIR_P=$MKDIR_P
16227 case $MKDIR_P in
16228 [\\/$]* | ?:[\\/]* ) ;;
16229 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16230 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232
Matthias Kloseb9621712010-04-24 17:59:49 +000016233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234# If the template does not know about datarootdir, expand it.
16235# FIXME: This hack should be removed a few years after 2.60.
16236ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016237ac_sed_dataroot='
16238/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 p
16240 q
16241}
16242/@datadir@/p
16243/@docdir@/p
16244/@infodir@/p
16245/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016246/@mandir@/p'
16247case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248*datarootdir*) ac_datarootdir_seen=yes;;
16249*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16251$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016253cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 ac_datarootdir_hack='
16255 s&@datadir@&$datadir&g
16256 s&@docdir@&$docdir&g
16257 s&@infodir@&$infodir&g
16258 s&@localedir@&$localedir&g
16259 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016260 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261esac
16262_ACEOF
16263
16264# Neutralize VPATH when `$srcdir' = `.'.
16265# Shell code in configure.ac might set extrasub.
16266# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16268ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016269$extrasub
16270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016271cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016272:t
16273/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016274s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016276s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277s&@srcdir@&$ac_srcdir&;t t
16278s&@abs_srcdir@&$ac_abs_srcdir&;t t
16279s&@top_srcdir@&$ac_top_srcdir&;t t
16280s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16281s&@builddir@&$ac_builddir&;t t
16282s&@abs_builddir@&$ac_abs_builddir&;t t
16283s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16284s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016285s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016287"
Victor Stinnere0be4232011-10-25 13:06:09 +020016288eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16289 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016292 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16293 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16294 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016297$as_echo "$as_me: 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" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016299
Victor Stinnere0be4232011-10-25 13:06:09 +020016300 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016302 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16303 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016304 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016305 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 ;;
16307 :H)
16308 #
16309 # CONFIG_HEADER
16310 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016312 {
16313 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016314 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16315 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016316 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016317 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016318 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16319$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016321 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016322 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016323 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 fi
16325 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016326 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016327 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016328 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016329 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016332
16333 esac
16334
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016335
16336 case $ac_file$ac_mode in
16337 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16338
16339 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340done # for ac_tag
16341
Guido van Rossum627b2d71993-12-24 10:39:16 +000016342
Matthias Kloseb9621712010-04-24 17:59:49 +000016343as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016344_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016345ac_clean_files=$ac_clean_files_save
16346
Matthias Kloseb9621712010-04-24 17:59:49 +000016347test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016348 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016349
Martin v. Löwis11437992002-04-12 09:54:03 +000016350
16351# configure is writing to config.log, and then calls config.status.
16352# config.status does its own redirection, appending to config.log.
16353# Unfortunately, on DOS this fails, as config.log is still kept open
16354# by configure, so config.status won't be able to write to it; its
16355# output is simply discarded. So we exec the FD to /dev/null,
16356# effectively closing config.log, so it can be properly (re)opened and
16357# appended to by config.status. When coming back to configure, we
16358# need to make the FD available again.
16359if test "$no_create" != yes; then
16360 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016361 ac_config_status_args=
16362 test "$silent" = yes &&
16363 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016364 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016365 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 exec 5>>config.log
16367 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16368 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016369 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016370fi
16371if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16372 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16373$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016374fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016375
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016376
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016377echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016378if test ! -f Modules/Setup
16379then
16380 cp $srcdir/Modules/Setup.dist Modules/Setup
16381fi
16382
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016383echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016384if test ! -f Modules/Setup.local
16385then
16386 echo "# Edit this file for local setup changes" >Modules/Setup.local
16387fi
16388
16389echo "creating Makefile"
16390$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16391 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016392 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016393mv config.c Modules