blob: c61546680ce1a7513136f7e60ad863c88481351f [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
685MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000686FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000687FRAMEWORKUNIXTOOLSPREFIX
688FRAMEWORKALTINSTALLLAST
689FRAMEWORKALTINSTALLFIRST
690FRAMEWORKINSTALLLAST
691FRAMEWORKINSTALLFIRST
692PYTHONFRAMEWORKINSTALLDIR
693PYTHONFRAMEWORKPREFIX
694PYTHONFRAMEWORKDIR
695PYTHONFRAMEWORKIDENTIFIER
696PYTHONFRAMEWORK
697LIPO_32BIT_FLAGS
698ARCH_RUN_32BIT
699UNIVERSALSDK
700CONFIG_ARGS
701SOVERSION
702VERSION
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100703host_os
704host_vendor
705host_cpu
706host
707build_os
708build_vendor
709build_cpu
710build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500711HAS_HG
712HGBRANCH
713HGTAG
714HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000715target_alias
716host_alias
717build_alias
718LIBS
719ECHO_T
720ECHO_N
721ECHO_C
722DEFS
723mandir
724localedir
725libdir
726psdir
727pdfdir
728dvidir
729htmldir
730infodir
731docdir
732oldincludedir
733includedir
734localstatedir
735sharedstatedir
736sysconfdir
737datadir
738datarootdir
739libexecdir
740sbindir
741bindir
742program_transform_name
743prefix
744exec_prefix
745PACKAGE_URL
746PACKAGE_BUGREPORT
747PACKAGE_STRING
748PACKAGE_VERSION
749PACKAGE_TARNAME
750PACKAGE_NAME
751PATH_SEPARATOR
752SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000753ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000754ac_user_opts='
755enable_option_checking
756enable_universalsdk
757with_universal_archs
758with_framework_name
759enable_framework
760with_gcc
761with_cxx_main
762with_suffix
763enable_shared
764enable_profiling
765with_pydebug
766with_libs
767with_system_expat
768with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100769with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000770enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000771with_dbmliborder
772with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000773with_threads
774with_thread
775enable_ipv6
776with_doc_strings
777with_tsc
778with_pymalloc
779with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000780with_fpectl
781with_libm
782with_libc
783enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000784with_computed_gotos
785'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000786 ac_precious_vars='build_alias
787host_alias
788target_alias
789CC
790CFLAGS
791LDFLAGS
792LIBS
793CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200794CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000795
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000798ac_init_help=
799ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000800ac_unrecognized_opts=
801ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802# The variables have the same names as the options, with
803# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000804cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807no_recursion=
808prefix=NONE
809program_prefix=NONE
810program_suffix=NONE
811program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000816x_includes=NONE
817x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000818
819# Installation directory options.
820# These are left unexpanded so users can "make install exec_prefix=/foo"
821# and all the variables that are supposed to be based on exec_prefix
822# by default will actually change.
823# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000824# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825bindir='${exec_prefix}/bin'
826sbindir='${exec_prefix}/sbin'
827libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828datarootdir='${prefix}/share'
829datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000830sysconfdir='${prefix}/etc'
831sharedstatedir='${prefix}/com'
832localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833includedir='${prefix}/include'
834oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000835docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
836infodir='${datarootdir}/info'
837htmldir='${docdir}'
838dvidir='${docdir}'
839pdfdir='${docdir}'
840psdir='${docdir}'
841libdir='${exec_prefix}/lib'
842localedir='${datarootdir}/locale'
843mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000848do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849 # If the previous option needs an argument, assign it.
850 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 ac_prev=
853 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200857 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
858 *=) ac_optarg= ;;
859 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862 # Accept the important Cygnus configure options, so we can diagnose typos.
863
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 case $ac_dashdash$ac_option in
865 --)
866 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868 -bindir | --bindir | --bindi | --bind | --bin | --bi)
869 ac_prev=bindir ;;
870 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872
873 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000874 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878 -cache-file | --cache-file | --cache-fil | --cache-fi \
879 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
880 ac_prev=cache_file ;;
881 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
882 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 cache_file=$ac_optarg ;;
884
885 --config-cache | -C)
886 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
894 | --dataroo | --dataro | --datar)
895 ac_prev=datarootdir ;;
896 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
897 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
898 datarootdir=$ac_optarg ;;
899
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000901 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200904 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 ac_useropt_orig=$ac_useropt
906 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
907 case $ac_user_opts in
908 *"
909"enable_$ac_useropt"
910"*) ;;
911 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
912 ac_unrecognized_sep=', ';;
913 esac
914 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915
916 -docdir | --docdir | --docdi | --doc | --do)
917 ac_prev=docdir ;;
918 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
919 docdir=$ac_optarg ;;
920
921 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
922 ac_prev=dvidir ;;
923 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
924 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
926 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200930 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 ac_useropt_orig=$ac_useropt
932 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
933 case $ac_user_opts in
934 *"
935"enable_$ac_useropt"
936"*) ;;
937 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
938 ac_unrecognized_sep=', ';;
939 esac
940 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
943 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
944 | --exec | --exe | --ex)
945 ac_prev=exec_prefix ;;
946 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
947 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
948 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Obsolete; use --with-gas.
953 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 -help | --help | --hel | --he | -h)
956 ac_init_help=long ;;
957 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
958 ac_init_help=recursive ;;
959 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
960 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
962 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000967 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
968 ac_prev=htmldir ;;
969 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
970 | --ht=*)
971 htmldir=$ac_optarg ;;
972
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000973 -includedir | --includedir | --includedi | --included | --include \
974 | --includ | --inclu | --incl | --inc)
975 ac_prev=includedir ;;
976 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
977 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000979
980 -infodir | --infodir | --infodi | --infod | --info | --inf)
981 ac_prev=infodir ;;
982 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000984
985 -libdir | --libdir | --libdi | --libd)
986 ac_prev=libdir ;;
987 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989
990 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
991 | --libexe | --libex | --libe)
992 ac_prev=libexecdir ;;
993 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
994 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000997 -localedir | --localedir | --localedi | --localed | --locale)
998 ac_prev=localedir ;;
999 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1000 localedir=$ac_optarg ;;
1001
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001003 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 ac_prev=localstatedir ;;
1005 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
1009 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1010 ac_prev=mandir ;;
1011 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 # Obsolete; use --without-fp.
1016 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 no_create=yes ;;
1021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1023 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1024 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1027 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1028 | --oldin | --oldi | --old | --ol | --o)
1029 ac_prev=oldincludedir ;;
1030 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1031 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1032 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1036 ac_prev=prefix ;;
1037 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039
1040 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1041 | --program-pre | --program-pr | --program-p)
1042 ac_prev=program_prefix ;;
1043 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1044 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1048 | --program-suf | --program-su | --program-s)
1049 ac_prev=program_suffix ;;
1050 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1051 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -program-transform-name | --program-transform-name \
1055 | --program-transform-nam | --program-transform-na \
1056 | --program-transform-n | --program-transform- \
1057 | --program-transform | --program-transfor \
1058 | --program-transfo | --program-transf \
1059 | --program-trans | --program-tran \
1060 | --progr-tra | --program-tr | --program-t)
1061 ac_prev=program_transform_name ;;
1062 -program-transform-name=* | --program-transform-name=* \
1063 | --program-transform-nam=* | --program-transform-na=* \
1064 | --program-transform-n=* | --program-transform-=* \
1065 | --program-transform=* | --program-transfor=* \
1066 | --program-transfo=* | --program-transf=* \
1067 | --program-trans=* | --program-tran=* \
1068 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1072 ac_prev=pdfdir ;;
1073 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1074 pdfdir=$ac_optarg ;;
1075
1076 -psdir | --psdir | --psdi | --psd | --ps)
1077 ac_prev=psdir ;;
1078 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1079 psdir=$ac_optarg ;;
1080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1082 | -silent | --silent | --silen | --sile | --sil)
1083 silent=yes ;;
1084
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1086 ac_prev=sbindir ;;
1087 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1088 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
1091 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1092 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1093 | --sharedst | --shareds | --shared | --share | --shar \
1094 | --sha | --sh)
1095 ac_prev=sharedstatedir ;;
1096 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1097 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1098 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1099 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001102 -site | --site | --sit)
1103 ac_prev=site ;;
1104 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1108 ac_prev=srcdir ;;
1109 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001112 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1113 | --syscon | --sysco | --sysc | --sys | --sy)
1114 ac_prev=sysconfdir ;;
1115 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1116 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
1124 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1125 verbose=yes ;;
1126
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 -version | --version | --versio | --versi | --vers | -V)
1128 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129
1130 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001131 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001134 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 ac_useropt_orig=$ac_useropt
1136 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1137 case $ac_user_opts in
1138 *"
1139"with_$ac_useropt"
1140"*) ;;
1141 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1142 ac_unrecognized_sep=', ';;
1143 esac
1144 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001150 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001151 ac_useropt_orig=$ac_useropt
1152 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1153 case $ac_user_opts in
1154 *"
1155"with_$ac_useropt"
1156"*) ;;
1157 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1158 ac_unrecognized_sep=', ';;
1159 esac
1160 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162 --x)
1163 # Obsolete; use --with-x.
1164 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1167 | --x-incl | --x-inc | --x-in | --x-i)
1168 ac_prev=x_includes ;;
1169 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1170 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
1173 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1174 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1175 ac_prev=x_libraries ;;
1176 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1177 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001180 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1181Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ;;
1183
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 *=*)
1185 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1186 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 case $ac_envvar in #(
1188 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001191 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 export $ac_envvar ;;
1193
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001194 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001199 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200 ;;
1201
1202 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001203done
1204
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001207 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208fi
1209
Matthias Kloseb9621712010-04-24 17:59:49 +00001210if test -n "$ac_unrecognized_opts"; then
1211 case $enable_option_checking in
1212 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1215 esac
1216fi
1217
1218# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001219for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1220 datadir sysconfdir sharedstatedir localstatedir includedir \
1221 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1222 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001224 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 # Remove trailing slashes.
1226 case $ac_val in
1227 */ )
1228 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1229 eval $ac_var=\$ac_val;;
1230 esac
1231 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001233 [\\/$]* | ?:[\\/]* ) continue;;
1234 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001237done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239# There might be people who depend on the old broken behavior: `$host'
1240# used to hold the argument of --host etc.
1241# FIXME: To remove some day.
1242build=$build_alias
1243host=$host_alias
1244target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246# FIXME: To remove some day.
1247if test "x$host_alias" != x; then
1248 if test "x$build_alias" = x; then
1249 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001250 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1251 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 elif test "x$build_alias" != "x$host_alias"; then
1253 cross_compiling=yes
1254 fi
1255fi
1256
1257ac_tool_prefix=
1258test -n "$host_alias" && ac_tool_prefix=$host_alias-
1259
1260test "$silent" = yes && exec 6>/dev/null
1261
Guido van Rossum627b2d71993-12-24 10:39:16 +00001262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263ac_pwd=`pwd` && test -n "$ac_pwd" &&
1264ac_ls_di=`ls -di .` &&
1265ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269
1270
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271# Find the source files, if location was not specified.
1272if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001275 ac_confdir=`$as_dirname -- "$as_myself" ||
1276$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1277 X"$as_myself" : 'X\(//\)[^/]' \| \
1278 X"$as_myself" : 'X\(//\)$' \| \
1279 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1280$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1282 s//\1/
1283 q
1284 }
1285 /^X\(\/\/\)[^/].*/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\/\)$/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\).*/{
1294 s//\1/
1295 q
1296 }
1297 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300 srcdir=..
1301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302else
1303 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305if test ! -r "$srcdir/$ac_unique_file"; then
1306 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1310ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312 pwd)`
1313# When building in place, set srcdir=.
1314if test "$ac_abs_confdir" = "$ac_pwd"; then
1315 srcdir=.
1316fi
1317# Remove unnecessary trailing slashes from srcdir.
1318# Double slashes in file names in object file debugging info
1319# mess up M-x gdb in Emacs.
1320case $srcdir in
1321*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1322esac
1323for ac_var in $ac_precious_vars; do
1324 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1325 eval ac_env_${ac_var}_value=\$${ac_var}
1326 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1327 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1328done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329
Martin v. Löwis11437992002-04-12 09:54:03 +00001330#
1331# Report the --help message.
1332#
1333if test "$ac_init_help" = "long"; then
1334 # Omit some internal or obsolete options to make the list less imposing.
1335 # This message is too long to be a string in the A/UX 3.1 sh.
1336 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001337\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001338
1339Usage: $0 [OPTION]... [VAR=VALUE]...
1340
1341To assign environment variables (e.g., CC, CFLAGS...), specify them as
1342VAR=VALUE. See below for descriptions of some of the useful variables.
1343
1344Defaults for the options are specified in brackets.
1345
1346Configuration:
1347 -h, --help display this help and exit
1348 --help=short display options specific to this package
1349 --help=recursive display the short help of all the included packages
1350 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001352 --cache-file=FILE cache test results in FILE [disabled]
1353 -C, --config-cache alias for \`--cache-file=config.cache'
1354 -n, --no-create do not create output files
1355 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1356
Martin v. Löwis11437992002-04-12 09:54:03 +00001357Installation directories:
1358 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001359 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001360 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001361 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001362
1363By default, \`make install' will install all the files in
1364\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1365an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1366for instance \`--prefix=\$HOME'.
1367
1368For better control, use the options below.
1369
1370Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001371 --bindir=DIR user executables [EPREFIX/bin]
1372 --sbindir=DIR system admin executables [EPREFIX/sbin]
1373 --libexecdir=DIR program executables [EPREFIX/libexec]
1374 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1375 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1376 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1377 --libdir=DIR object code libraries [EPREFIX/lib]
1378 --includedir=DIR C header files [PREFIX/include]
1379 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1380 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1381 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1382 --infodir=DIR info documentation [DATAROOTDIR/info]
1383 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1384 --mandir=DIR man documentation [DATAROOTDIR/man]
1385 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1386 --htmldir=DIR html documentation [DOCDIR]
1387 --dvidir=DIR dvi documentation [DOCDIR]
1388 --pdfdir=DIR pdf documentation [DOCDIR]
1389 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390_ACEOF
1391
1392 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001393
1394System types:
1395 --build=BUILD configure for building on BUILD [guessed]
1396 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397_ACEOF
1398fi
1399
1400if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001401 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001402 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001403 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 cat <<\_ACEOF
1405
1406Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1409 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001410 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001411 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001412 --enable-framework[=INSTALLDIR]
1413 Build (MacOSX|Darwin) framework
1414 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001415 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001416 --enable-loadable-sqlite-extensions
1417 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001418 --enable-ipv6 Enable ipv6 (with ipv4) support
1419 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001420 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423Optional Packages:
1424 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1425 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001426 --with-universal-archs=ARCH
1427 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001428 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001429 --with-framework-name=FRAMEWORK
1430 specify an alternate name of the framework built
1431 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001433 --with-cxx-main=<compiler>
1434 compile main() and link python executable with C++
1435 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --with-suffix=.exe set executable suffix
1437 --with-pydebug build with Py_DEBUG defined
1438 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001439 --with-system-expat build pyexpat module using an installed expat
1440 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001441 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001442 --with-system-libmpdec build _decimal module using an installed libmpdec
1443 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001444 --with-dbmliborder=db1:db2:...
1445 order to check db backends for dbm. Valid value is a
1446 colon separated string with the backend names
1447 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001449 --with(out)-threads[=DIRECTORY]
1450 disable/enable thread support
1451 --with(out)-thread[=DIRECTORY]
1452 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001454 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001456 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with-fpectl enable SIGFPE catching
1458 --with-libm=STRING math library
1459 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001460 --with(out)-computed-gotos
1461 Use computed gotos in evaluation loop (enabled by
1462 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001463
1464Some influential environment variables:
1465 CC C compiler command
1466 CFLAGS C compiler flags
1467 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1468 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001469 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 CPP C preprocessor
1473
1474Use these variables to override the choices made by `configure' or to help
1475it to find libraries and programs with nonstandard names/locations.
1476
Georg Brandle2e15612009-05-20 18:25:10 +00001477Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001478_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001480fi
1481
1482if test "$ac_init_help" = "recursive"; then
1483 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001484 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 test -d "$ac_dir" ||
1486 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1487 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001488 ac_builddir=.
1489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490case "$ac_dir" in
1491.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1492*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 case $ac_top_builddir_sub in
1497 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1498 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1499 esac ;;
1500esac
1501ac_abs_top_builddir=$ac_pwd
1502ac_abs_builddir=$ac_pwd$ac_dir_suffix
1503# for backward compatibility:
1504ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 ac_top_srcdir=$ac_top_builddir_sub
1510 ac_abs_top_srcdir=$ac_pwd ;;
1511 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 ac_top_srcdir=$srcdir
1514 ac_abs_top_srcdir=$srcdir ;;
1515 *) # Relative name.
1516 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1517 ac_top_srcdir=$ac_top_build_prefix$srcdir
1518 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001519esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522 cd "$ac_dir" || { ac_status=$?; continue; }
1523 # Check for guested configure.
1524 if test -f "$ac_srcdir/configure.gnu"; then
1525 echo &&
1526 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1527 elif test -f "$ac_srcdir/configure"; then
1528 echo &&
1529 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001531 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 fi || ac_status=$?
1533 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 done
1535fi
1536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001538if $ac_init_version; then
1539 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001540python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001541generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001542
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001543Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001544This configure script is free software; the Free Software Foundation
1545gives unlimited permission to copy, distribute and modify it.
1546_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001549
1550## ------------------------ ##
1551## Autoconf initialization. ##
1552## ------------------------ ##
1553
1554# ac_fn_c_try_compile LINENO
1555# --------------------------
1556# Try to compile conftest.$ac_ext, and return whether this succeeded.
1557ac_fn_c_try_compile ()
1558{
1559 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1560 rm -f conftest.$ac_objext
1561 if { { ac_try="$ac_compile"
1562case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565esac
1566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567$as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_compile") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } && {
1577 test -z "$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 } && test -s conftest.$ac_objext; then :
1580 ac_retval=0
1581else
1582 $as_echo "$as_me: failed program was:" >&5
1583sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001587 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 as_fn_set_status $ac_retval
1589
1590} # ac_fn_c_try_compile
1591
Matthias Kloseb9621712010-04-24 17:59:49 +00001592# ac_fn_c_try_link LINENO
1593# -----------------------
1594# Try to link conftest.$ac_ext, and return whether this succeeded.
1595ac_fn_c_try_link ()
1596{
1597 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1598 rm -f conftest.$ac_objext conftest$ac_exeext
1599 if { { ac_try="$ac_link"
1600case "(($ac_try" in
1601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1602 *) ac_try_echo=$ac_try;;
1603esac
1604eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1605$as_echo "$ac_try_echo"; } >&5
1606 (eval "$ac_link") 2>conftest.err
1607 ac_status=$?
1608 if test -s conftest.err; then
1609 grep -v '^ *+' conftest.err >conftest.er1
1610 cat conftest.er1 >&5
1611 mv -f conftest.er1 conftest.err
1612 fi
1613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1614 test $ac_status = 0; } && {
1615 test -z "$ac_c_werror_flag" ||
1616 test ! -s conftest.err
1617 } && test -s conftest$ac_exeext && {
1618 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001619 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 }; then :
1621 ac_retval=0
1622else
1623 $as_echo "$as_me: failed program was:" >&5
1624sed 's/^/| /' conftest.$ac_ext >&5
1625
1626 ac_retval=1
1627fi
1628 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1629 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1630 # interfere with the next link command; also delete a directory that is
1631 # left behind by Apple's compiler. We do this before executing the actions.
1632 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001633 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 as_fn_set_status $ac_retval
1635
1636} # ac_fn_c_try_link
1637
Matthias Kloseb9621712010-04-24 17:59:49 +00001638# ac_fn_c_try_cpp LINENO
1639# ----------------------
1640# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_cpp ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 if { { ac_try="$ac_cpp conftest.$ac_ext"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001659 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 }; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_cpp
1674
1675# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1676# -------------------------------------------------------
1677# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1678# the include files in INCLUDES and setting the cache variable VAR
1679# accordingly.
1680ac_fn_c_check_header_mongrel ()
1681{
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001683 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1685$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001686if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001687 $as_echo_n "(cached) " >&6
1688fi
1689eval ac_res=\$$3
1690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1691$as_echo "$ac_res" >&6; }
1692else
1693 # Is the header compilable?
1694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1695$as_echo_n "checking $2 usability... " >&6; }
1696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1697/* end confdefs.h. */
1698$4
1699#include <$2>
1700_ACEOF
1701if ac_fn_c_try_compile "$LINENO"; then :
1702 ac_header_compiler=yes
1703else
1704 ac_header_compiler=no
1705fi
1706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1708$as_echo "$ac_header_compiler" >&6; }
1709
1710# Is the header present?
1711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1712$as_echo_n "checking $2 presence... " >&6; }
1713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1714/* end confdefs.h. */
1715#include <$2>
1716_ACEOF
1717if ac_fn_c_try_cpp "$LINENO"; then :
1718 ac_header_preproc=yes
1719else
1720 ac_header_preproc=no
1721fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001722rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1724$as_echo "$ac_header_preproc" >&6; }
1725
1726# So? What about this header?
1727case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1728 yes:no: )
1729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1730$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1732$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1733 ;;
1734 no:yes:* )
1735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1736$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1738$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1740$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1742$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1744$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001745( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001746## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001747## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 ) | sed "s/^/$as_me: WARNING: /" >&2
1749 ;;
1750esac
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1752$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001753if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 $as_echo_n "(cached) " >&6
1755else
1756 eval "$3=\$ac_header_compiler"
1757fi
1758eval ac_res=\$$3
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1760$as_echo "$ac_res" >&6; }
1761fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001762 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001763
1764} # ac_fn_c_check_header_mongrel
1765
1766# ac_fn_c_try_run LINENO
1767# ----------------------
1768# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1769# that executables *can* be run.
1770ac_fn_c_try_run ()
1771{
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773 if { { ac_try="$ac_link"
1774case "(($ac_try" in
1775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1776 *) ac_try_echo=$ac_try;;
1777esac
1778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1779$as_echo "$ac_try_echo"; } >&5
1780 (eval "$ac_link") 2>&5
1781 ac_status=$?
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1784 { { case "(($ac_try" in
1785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1786 *) ac_try_echo=$ac_try;;
1787esac
1788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1789$as_echo "$ac_try_echo"; } >&5
1790 (eval "$ac_try") 2>&5
1791 ac_status=$?
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; }; }; then :
1794 ac_retval=0
1795else
1796 $as_echo "$as_me: program exited with status $ac_status" >&5
1797 $as_echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800 ac_retval=$ac_status
1801fi
1802 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001804 as_fn_set_status $ac_retval
1805
1806} # ac_fn_c_try_run
1807
1808# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists and can be compiled using the include files in
1811# INCLUDES, setting the cache variable VAR accordingly.
1812ac_fn_c_check_header_compile ()
1813{
1814 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1816$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001817if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 $as_echo_n "(cached) " >&6
1819else
1820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h. */
1822$4
1823#include <$2>
1824_ACEOF
1825if ac_fn_c_try_compile "$LINENO"; then :
1826 eval "$3=yes"
1827else
1828 eval "$3=no"
1829fi
1830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1831fi
1832eval ac_res=\$$3
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1834$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001836
1837} # ac_fn_c_check_header_compile
1838
Matthias Kloseb9621712010-04-24 17:59:49 +00001839# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1840# -------------------------------------------
1841# Tests whether TYPE exists after having included INCLUDES, setting cache
1842# variable VAR accordingly.
1843ac_fn_c_check_type ()
1844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=no"
1852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1853/* end confdefs.h. */
1854$4
1855int
1856main ()
1857{
1858if (sizeof ($2))
1859 return 0;
1860 ;
1861 return 0;
1862}
1863_ACEOF
1864if ac_fn_c_try_compile "$LINENO"; then :
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866/* end confdefs.h. */
1867$4
1868int
1869main ()
1870{
1871if (sizeof (($2)))
1872 return 0;
1873 ;
1874 return 0;
1875}
1876_ACEOF
1877if ac_fn_c_try_compile "$LINENO"; then :
1878
1879else
1880 eval "$3=yes"
1881fi
1882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885fi
1886eval ac_res=\$$3
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1888$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001890
1891} # ac_fn_c_check_type
1892
1893# ac_fn_c_find_uintX_t LINENO BITS VAR
1894# ------------------------------------
1895# Finds an unsigned integer type with width BITS, setting cache variable VAR
1896# accordingly.
1897ac_fn_c_find_uintX_t ()
1898{
1899 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1901$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001902if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001903 $as_echo_n "(cached) " >&6
1904else
1905 eval "$3=no"
1906 # Order is important - never check a type that is potentially smaller
1907 # than half of the expected target width.
1908 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1909 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$ac_includes_default
1913int
1914main ()
1915{
1916static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001917test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001918
1919 ;
1920 return 0;
1921}
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 case $ac_type in #(
1925 uint$2_t) :
1926 eval "$3=yes" ;; #(
1927 *) :
1928 eval "$3=\$ac_type" ;;
1929esac
1930fi
1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001932 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933
1934else
1935 break
1936fi
1937 done
1938fi
1939eval ac_res=\$$3
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1941$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001943
1944} # ac_fn_c_find_uintX_t
1945
1946# ac_fn_c_find_intX_t LINENO BITS VAR
1947# -----------------------------------
1948# Finds a signed integer type with width BITS, setting cache variable VAR
1949# accordingly.
1950ac_fn_c_find_intX_t ()
1951{
1952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1954$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001955if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001956 $as_echo_n "(cached) " >&6
1957else
1958 eval "$3=no"
1959 # Order is important - never check a type that is potentially smaller
1960 # than half of the expected target width.
1961 for ac_type in int$2_t 'int' 'long int' \
1962 'long long int' 'short int' 'signed char'; do
1963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1964/* end confdefs.h. */
1965$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001966 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001967int
1968main ()
1969{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001970static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001971test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001972
1973 ;
1974 return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_compile "$LINENO"; then :
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001981 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001982int
1983main ()
1984{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001985static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001986 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001987test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994
1995else
1996 case $ac_type in #(
1997 int$2_t) :
1998 eval "$3=yes" ;; #(
1999 *) :
2000 eval "$3=\$ac_type" ;;
2001esac
2002fi
2003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002006 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008else
2009 break
2010fi
2011 done
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018} # ac_fn_c_find_intX_t
2019
2020# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2021# --------------------------------------------
2022# Tries to find the compile-time value of EXPR in a program that includes
2023# INCLUDES, setting VAR accordingly. Returns whether the value could be
2024# computed
2025ac_fn_c_compute_int ()
2026{
2027 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028 if test "$cross_compiling" = yes; then
2029 # Depending upon the size, compute the lo and hi bounds.
2030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002037test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044 ac_lo=0 ac_mid=0
2045 while :; do
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$4
2049int
2050main ()
2051{
2052static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002053test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055 ;
2056 return 0;
2057}
2058_ACEOF
2059if ac_fn_c_try_compile "$LINENO"; then :
2060 ac_hi=$ac_mid; break
2061else
2062 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2063 if test $ac_lo -le $ac_mid; then
2064 ac_lo= ac_hi=
2065 break
2066 fi
2067 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2068fi
2069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2070 done
2071else
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002079test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_hi=-1 ac_mid=-1
2087 while :; do
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002095test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002096
2097 ;
2098 return 0;
2099}
2100_ACEOF
2101if ac_fn_c_try_compile "$LINENO"; then :
2102 ac_lo=$ac_mid; break
2103else
2104 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2105 if test $ac_mid -le $ac_hi; then
2106 ac_lo= ac_hi=
2107 break
2108 fi
2109 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112 done
2113else
2114 ac_lo= ac_hi=
2115fi
2116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119# Binary search between lo and hi bounds.
2120while test "x$ac_lo" != "x$ac_hi"; do
2121 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002129test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=$ac_mid
2137else
2138 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141done
2142case $ac_lo in #((
2143?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2144'') ac_retval=1 ;;
2145esac
2146 else
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h. */
2149$4
2150static long int longval () { return $2; }
2151static unsigned long int ulongval () { return $2; }
2152#include <stdio.h>
2153#include <stdlib.h>
2154int
2155main ()
2156{
2157
2158 FILE *f = fopen ("conftest.val", "w");
2159 if (! f)
2160 return 1;
2161 if (($2) < 0)
2162 {
2163 long int i = longval ();
2164 if (i != ($2))
2165 return 1;
2166 fprintf (f, "%ld", i);
2167 }
2168 else
2169 {
2170 unsigned long int i = ulongval ();
2171 if (i != ($2))
2172 return 1;
2173 fprintf (f, "%lu", i);
2174 }
2175 /* Do not output a trailing newline, as this causes \r\n confusion
2176 on some platforms. */
2177 return ferror (f) || fclose (f) != 0;
2178
2179 ;
2180 return 0;
2181}
2182_ACEOF
2183if ac_fn_c_try_run "$LINENO"; then :
2184 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2185else
2186 ac_retval=1
2187fi
2188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2189 conftest.$ac_objext conftest.beam conftest.$ac_ext
2190rm -f conftest.val
2191
2192 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002193 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002194 as_fn_set_status $ac_retval
2195
2196} # ac_fn_c_compute_int
2197
2198# ac_fn_c_check_func LINENO FUNC VAR
2199# ----------------------------------
2200# Tests whether FUNC exists, setting the cache variable VAR accordingly
2201ac_fn_c_check_func ()
2202{
2203 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002206if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002207 $as_echo_n "(cached) " >&6
2208else
2209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h. */
2211/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2212 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2213#define $2 innocuous_$2
2214
2215/* System header to define __stub macros and hopefully few prototypes,
2216 which can conflict with char $2 (); below.
2217 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2218 <limits.h> exists even on freestanding compilers. */
2219
2220#ifdef __STDC__
2221# include <limits.h>
2222#else
2223# include <assert.h>
2224#endif
2225
2226#undef $2
2227
2228/* Override any GCC internal prototype to avoid an error.
2229 Use char because int might match the return type of a GCC
2230 builtin and then its argument prototype would still apply. */
2231#ifdef __cplusplus
2232extern "C"
2233#endif
2234char $2 ();
2235/* The GNU C library defines this for functions which it implements
2236 to always fail with ENOSYS. Some functions are actually named
2237 something starting with __ and the normal name is an alias. */
2238#if defined __stub_$2 || defined __stub___$2
2239choke me
2240#endif
2241
2242int
2243main ()
2244{
2245return $2 ();
2246 ;
2247 return 0;
2248}
2249_ACEOF
2250if ac_fn_c_try_link "$LINENO"; then :
2251 eval "$3=yes"
2252else
2253 eval "$3=no"
2254fi
2255rm -f core conftest.err conftest.$ac_objext \
2256 conftest$ac_exeext conftest.$ac_ext
2257fi
2258eval ac_res=\$$3
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002262
2263} # ac_fn_c_check_func
2264
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002265# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2266# ---------------------------------------------
2267# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2268# accordingly.
2269ac_fn_c_check_decl ()
2270{
2271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272 as_decl_name=`echo $2|sed 's/ *(.*//'`
2273 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2275$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2276if eval \${$3+:} false; then :
2277 $as_echo_n "(cached) " >&6
2278else
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h. */
2281$4
2282int
2283main ()
2284{
2285#ifndef $as_decl_name
2286#ifdef __cplusplus
2287 (void) $as_decl_use;
2288#else
2289 (void) $as_decl_name;
2290#endif
2291#endif
2292
2293 ;
2294 return 0;
2295}
2296_ACEOF
2297if ac_fn_c_try_compile "$LINENO"; then :
2298 eval "$3=yes"
2299else
2300 eval "$3=no"
2301fi
2302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2303fi
2304eval ac_res=\$$3
2305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2306$as_echo "$ac_res" >&6; }
2307 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2308
2309} # ac_fn_c_check_decl
2310
Matthias Kloseb9621712010-04-24 17:59:49 +00002311# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2312# ----------------------------------------------------
2313# Tries to find if the field MEMBER exists in type AGGR, after including
2314# INCLUDES, setting cache variable VAR accordingly.
2315ac_fn_c_check_member ()
2316{
2317 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2319$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002320if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002321 $as_echo_n "(cached) " >&6
2322else
2323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324/* end confdefs.h. */
2325$5
2326int
2327main ()
2328{
2329static $2 ac_aggr;
2330if (ac_aggr.$3)
2331return 0;
2332 ;
2333 return 0;
2334}
2335_ACEOF
2336if ac_fn_c_try_compile "$LINENO"; then :
2337 eval "$4=yes"
2338else
2339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2340/* end confdefs.h. */
2341$5
2342int
2343main ()
2344{
2345static $2 ac_aggr;
2346if (sizeof ac_aggr.$3)
2347return 0;
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$4=yes"
2354else
2355 eval "$4=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360fi
2361eval ac_res=\$$4
2362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2363$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002364 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002365
2366} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002368This file contains any messages produced by compilers while
2369running configure, to aid debugging if configure makes a mistake.
2370
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002371It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002372generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002373
2374 $ $0 $@
2375
2376_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002378{
2379cat <<_ASUNAME
2380## --------- ##
2381## Platform. ##
2382## --------- ##
2383
2384hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2385uname -m = `(uname -m) 2>/dev/null || echo unknown`
2386uname -r = `(uname -r) 2>/dev/null || echo unknown`
2387uname -s = `(uname -s) 2>/dev/null || echo unknown`
2388uname -v = `(uname -v) 2>/dev/null || echo unknown`
2389
2390/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2391/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2392
2393/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2394/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2395/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002397/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2398/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2399/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2400
2401_ASUNAME
2402
2403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2404for as_dir in $PATH
2405do
2406 IFS=$as_save_IFS
2407 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002408 $as_echo "PATH: $as_dir"
2409 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002411
2412} >&5
2413
2414cat >&5 <<_ACEOF
2415
2416
2417## ----------- ##
2418## Core tests. ##
2419## ----------- ##
2420
2421_ACEOF
2422
2423
2424# Keep a trace of the command line.
2425# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002426# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002427# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002428# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002429ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002430ac_configure_args0=
2431ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002432ac_must_keep_next=false
2433for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002434do
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 for ac_arg
2436 do
2437 case $ac_arg in
2438 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2439 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2440 | -silent | --silent | --silen | --sile | --sil)
2441 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002443 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002444 esac
2445 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002446 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002447 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002450 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002452 case $ac_arg in
2453 *=* | --config-cache | -C | -disable-* | --disable-* \
2454 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2455 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2456 | -with-* | --with-* | -without-* | --without-* | --x)
2457 case "$ac_configure_args0 " in
2458 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2459 esac
2460 ;;
2461 -* ) ac_must_keep_next=true ;;
2462 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002463 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 ;;
2466 esac
2467 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002468done
Matthias Kloseb9621712010-04-24 17:59:49 +00002469{ ac_configure_args0=; unset ac_configure_args0;}
2470{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002471
2472# When interrupted or exit'd, cleanup temporary files, and complete
2473# config.log. We remove comments because anyway the quotes in there
2474# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475# WARNING: Use '\'' to represent an apostrophe within the trap.
2476# 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 +00002477trap 'exit_status=$?
2478 # Save into config.log some information that might help in debugging.
2479 {
2480 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002481
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002482 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002483## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002484## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002485 echo
2486 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487(
2488 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2489 eval ac_val=\$$ac_var
2490 case $ac_val in #(
2491 *${as_nl}*)
2492 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2494$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac
2496 case $ac_var in #(
2497 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2499 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac ;;
2501 esac
2502 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2505 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 "s/'\''/'\''\\\\'\'''\''/g;
2508 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2509 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002510 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002512 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac |
2514 sort
2515)
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002517
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002519## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 echo
2522 for ac_var in $ac_subst_vars
2523 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 eval ac_val=\$$ac_var
2525 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 done | sort
2530 echo
2531
2532 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 echo
2537 for ac_var in $ac_subst_files
2538 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 eval ac_val=\$$ac_var
2540 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 done | sort
2545 echo
2546 fi
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002550## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 echo
2555 fi
2556 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$as_me: caught signal $ac_signal"
2558 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 rm -f core *.core core.conftest.* &&
2561 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002564for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002565 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002566done
2567ac_signal=0
2568
2569# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
Matthias Kloseb9621712010-04-24 17:59:49 +00002572$as_echo "/* confdefs.h */" > confdefs.h
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574# Predefined preprocessor variables.
2575
2576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_NAME "$PACKAGE_NAME"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580cat >>confdefs.h <<_ACEOF
2581#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2582_ACEOF
2583
Martin v. Löwis11437992002-04-12 09:54:03 +00002584cat >>confdefs.h <<_ACEOF
2585#define PACKAGE_VERSION "$PACKAGE_VERSION"
2586_ACEOF
2587
Martin v. Löwis11437992002-04-12 09:54:03 +00002588cat >>confdefs.h <<_ACEOF
2589#define PACKAGE_STRING "$PACKAGE_STRING"
2590_ACEOF
2591
Martin v. Löwis11437992002-04-12 09:54:03 +00002592cat >>confdefs.h <<_ACEOF
2593#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2594_ACEOF
2595
Matthias Kloseb9621712010-04-24 17:59:49 +00002596cat >>confdefs.h <<_ACEOF
2597#define PACKAGE_URL "$PACKAGE_URL"
2598_ACEOF
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600
2601# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002602# Prefer an explicitly selected file to automatically selected ones.
2603ac_site_file1=NONE
2604ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606 # We do not want a PATH search for config.site.
2607 case $CONFIG_SITE in #((
2608 -*) ac_site_file1=./$CONFIG_SITE;;
2609 */*) ac_site_file1=$CONFIG_SITE;;
2610 *) ac_site_file1=./$CONFIG_SITE;;
2611 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 ac_site_file1=$prefix/share/config.site
2614 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615else
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 ac_site_file1=$ac_default_prefix/share/config.site
2617 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002619for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620do
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 test "x$ac_site_file" = xNONE && continue
2622 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2623 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2624$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002626 . "$ac_site_file" \
2627 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2628$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2629as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002630See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631 fi
2632done
2633
2634if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 # Some versions of bash will fail to source /dev/null (special files
2636 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2637 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2639$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2642 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 esac
2644 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645else
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2647$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 >$cache_file
2649fi
2650
2651# Check that the precious variables saved in the cache have kept the same
2652# value.
2653ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2656 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2658 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 case $ac_old_set,$ac_new_set in
2660 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002661 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2662$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 +00002663 ac_cache_corrupted=: ;;
2664 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2666$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 ac_cache_corrupted=: ;;
2668 ,);;
2669 *)
2670 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 # differences in whitespace do not lead to failure.
2672 ac_old_val_w=`echo x $ac_old_val`
2673 ac_new_val_w=`echo x $ac_new_val`
2674 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2676$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2677 ac_cache_corrupted=:
2678 else
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2680$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2681 eval $ac_var=\$ac_old_val
2682 fi
2683 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2684$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2686$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 fi;;
2688 esac
2689 # Pass precious variables to config.status.
2690 if test "$ac_new_set" = set; then
2691 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002692 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 *) ac_arg=$ac_var=$ac_new_val ;;
2694 esac
2695 case " $ac_configure_args " in
2696 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 esac
2699 fi
2700done
2701if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2705$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002706 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002708## -------------------- ##
2709## Main body of script. ##
2710## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711
Guido van Rossum7f43da71994-08-01 12:15:30 +00002712ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002714ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2715ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2716ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002717
Guido van Rossum627b2d71993-12-24 10:39:16 +00002718
Michael W. Hudson54241132001-12-07 15:38:26 +00002719
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720
2721
2722
2723
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002724if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725then
2726# Extract the first word of "hg", so it can be a program name with args.
2727set dummy hg; ac_word=$2
2728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002730if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002731 $as_echo_n "(cached) " >&6
2732else
2733 if test -n "$HAS_HG"; then
2734 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2735else
2736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2737for as_dir in $PATH
2738do
2739 IFS=$as_save_IFS
2740 test -z "$as_dir" && as_dir=.
2741 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002742 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 -05002743 ac_cv_prog_HAS_HG="found"
2744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2745 break 2
2746 fi
2747done
2748 done
2749IFS=$as_save_IFS
2750
2751 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2752fi
2753fi
2754HAS_HG=$ac_cv_prog_HAS_HG
2755if test -n "$HAS_HG"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2757$as_echo "$HAS_HG" >&6; }
2758else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2760$as_echo "no" >&6; }
2761fi
2762
2763
2764else
2765HAS_HG=no-repository
2766fi
2767if test $HAS_HG = found
2768then
2769 HGVERSION="hg id -i \$(srcdir)"
2770 HGTAG="hg id -t \$(srcdir)"
2771 HGBRANCH="hg id -b \$(srcdir)"
2772else
2773 HGVERSION=""
2774 HGTAG=""
2775 HGBRANCH=""
2776fi
2777
2778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002780
2781
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002782ac_aux_dir=
2783for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2784 if test -f "$ac_dir/install-sh"; then
2785 ac_aux_dir=$ac_dir
2786 ac_install_sh="$ac_aux_dir/install-sh -c"
2787 break
2788 elif test -f "$ac_dir/install.sh"; then
2789 ac_aux_dir=$ac_dir
2790 ac_install_sh="$ac_aux_dir/install.sh -c"
2791 break
2792 elif test -f "$ac_dir/shtool"; then
2793 ac_aux_dir=$ac_dir
2794 ac_install_sh="$ac_aux_dir/shtool install -c"
2795 break
2796 fi
2797done
2798if test -z "$ac_aux_dir"; then
2799 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2800fi
2801
2802# These three variables are undocumented and unsupported,
2803# and are intended to be withdrawn in a future Autoconf release.
2804# They can cause serious problems if a builder's source tree is in a directory
2805# whose full name contains unusual characters.
2806ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2807ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2808ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2809
2810
2811# Make sure we can run config.sub.
2812$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2813 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2814
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2816$as_echo_n "checking build system type... " >&6; }
2817if ${ac_cv_build+:} false; then :
2818 $as_echo_n "(cached) " >&6
2819else
2820 ac_build_alias=$build_alias
2821test "x$ac_build_alias" = x &&
2822 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2823test "x$ac_build_alias" = x &&
2824 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2825ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2826 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2827
2828fi
2829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2830$as_echo "$ac_cv_build" >&6; }
2831case $ac_cv_build in
2832*-*-*) ;;
2833*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2834esac
2835build=$ac_cv_build
2836ac_save_IFS=$IFS; IFS='-'
2837set x $ac_cv_build
2838shift
2839build_cpu=$1
2840build_vendor=$2
2841shift; shift
2842# Remember, the first character of IFS is used to create $*,
2843# except with old shells:
2844build_os=$*
2845IFS=$ac_save_IFS
2846case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2847
2848
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2850$as_echo_n "checking host system type... " >&6; }
2851if ${ac_cv_host+:} false; then :
2852 $as_echo_n "(cached) " >&6
2853else
2854 if test "x$host_alias" = x; then
2855 ac_cv_host=$ac_cv_build
2856else
2857 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2858 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2859fi
2860
2861fi
2862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2863$as_echo "$ac_cv_host" >&6; }
2864case $ac_cv_host in
2865*-*-*) ;;
2866*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2867esac
2868host=$ac_cv_host
2869ac_save_IFS=$IFS; IFS='-'
2870set x $ac_cv_host
2871shift
2872host_cpu=$1
2873host_vendor=$2
2874shift; shift
2875# Remember, the first character of IFS is used to create $*,
2876# except with old shells:
2877host_os=$*
2878IFS=$ac_save_IFS
2879case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2880
2881
2882
Martin v. Löwis11437992002-04-12 09:54:03 +00002883
Benjamin Petersond23f8222009-04-05 19:13:16 +00002884if test "$prefix" != "/"; then
2885 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2886fi
2887
2888
Martin v. Löwis11437992002-04-12 09:54:03 +00002889
2890
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002891# We don't use PACKAGE_ variables, and they cause conflicts
2892# with other autoconf-based packages that include Python.h
2893grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2894rm confdefs.h
2895mv confdefs.h.new confdefs.h
2896
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002897
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002898VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002899
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002900# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002901
2902SOVERSION=1.0
2903
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002904# The later defininition of _XOPEN_SOURCE disables certain features
2905# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2906
Matthias Kloseb9621712010-04-24 17:59:49 +00002907$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002908
2909
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002910# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2911# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2912# them.
2913
Matthias Kloseb9621712010-04-24 17:59:49 +00002914$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002915
2916
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002917# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2918# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2919# them.
2920
Matthias Kloseb9621712010-04-24 17:59:49 +00002921$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002922
2923
Martin v. Löwisd6320502004-08-12 13:45:08 +00002924# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2925# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2926
Matthias Kloseb9621712010-04-24 17:59:49 +00002927$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002928
2929
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002930# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2931# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2932# them.
2933
Matthias Kloseb9621712010-04-24 17:59:49 +00002934$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002935
2936
2937
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002938define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002939
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002940# Arguments passed to configure.
2941
2942CONFIG_ARGS="$ac_configure_args"
2943
Matthias Kloseb9621712010-04-24 17:59:49 +00002944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2945$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002946# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002947if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002948 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002949 case $enableval in
2950 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002951 # Locate the best usable SDK, see Mac/README.txt for more
2952 # information
2953 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2954 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002955 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002956 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2957 if test ! -d "${enableval}"
2958 then
2959 enableval=/
2960 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002961 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002962 ;;
2963 esac
2964 case $enableval in
2965 no)
2966 UNIVERSALSDK=
2967 enable_universalsdk=
2968 ;;
2969 *)
2970 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002971 if test ! -d "${UNIVERSALSDK}"
2972 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002973 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002974 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002975 ;;
2976 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002978
Thomas Wouters477c8d52006-05-27 19:21:47 +00002979else
2980
2981 UNIVERSALSDK=
2982 enable_universalsdk=
2983
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002984fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002985
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002986if test -n "${UNIVERSALSDK}"
2987then
Matthias Kloseb9621712010-04-24 17:59:49 +00002988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
2989$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002990else
Matthias Kloseb9621712010-04-24 17:59:49 +00002991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2992$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002993fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002996
2997
Ned Deilycbfb9a52012-06-23 16:02:19 -07002998# For backward compatibility reasons we prefer to select '32-bit' if available,
2999# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003000UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003001if test "`uname -s`" = "Darwin"
3002then
3003 if test -n "${UNIVERSALSDK}"
3004 then
3005 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3006 then
3007 UNIVERSAL_ARCHS="intel"
3008 fi
3009 fi
3010fi
3011
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3014$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003015
3016# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003018 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3020$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003021 UNIVERSAL_ARCHS="$withval"
3022
3023else
3024
Ned Deilycbfb9a52012-06-23 16:02:19 -07003025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3026$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003027
3028fi
3029
3030
3031
3032
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003033
3034# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003035if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003036 withval=$with_framework_name;
3037 PYTHONFRAMEWORK=${withval}
3038 PYTHONFRAMEWORKDIR=${withval}.framework
3039 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3040
3041else
3042
3043 PYTHONFRAMEWORK=Python
3044 PYTHONFRAMEWORKDIR=Python.framework
3045 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3046
3047fi
3048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003049# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003050if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003052 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003053 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003054 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003055 esac
3056 case $enableval in
3057 no)
3058 PYTHONFRAMEWORK=
3059 PYTHONFRAMEWORKDIR=no-framework
3060 PYTHONFRAMEWORKPREFIX=
3061 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062 FRAMEWORKINSTALLFIRST=
3063 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003064 FRAMEWORKALTINSTALLFIRST=
3065 FRAMEWORKALTINSTALLLAST=
3066 if test "x${prefix}" = "xNONE"; then
3067 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3068 else
3069 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3070 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003071 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003072 ;;
3073 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003074 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003075 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003077 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003078 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3079 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003080 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003082 if test "x${prefix}" = "xNONE" ; then
3083 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003084
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003085 else
3086 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3087 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003088
3089 case "${enableval}" in
3090 /System*)
3091 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3092 if test "${prefix}" = "NONE" ; then
3093 # See below
3094 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3095 fi
3096 ;;
3097
3098 /Library*)
3099 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3100 ;;
3101
3102 */Library/Frameworks)
3103 MDIR="`dirname "${enableval}"`"
3104 MDIR="`dirname "${MDIR}"`"
3105 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3106
3107 if test "${prefix}" = "NONE"; then
3108 # User hasn't specified the
3109 # --prefix option, but wants to install
3110 # the framework in a non-default location,
3111 # ensure that the compatibility links get
3112 # installed relative to that prefix as well
3113 # instead of in /usr/local.
3114 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3115 fi
3116 ;;
3117
3118 *)
3119 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3120 ;;
3121 esac
3122
Jack Jansen127e56e2001-09-11 14:41:54 +00003123 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003124
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003125 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003126 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3132
3133 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3134
Jack Jansene578a632001-08-15 01:27:14 +00003135 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003136
Guido van Rossum563e7081996-09-10 18:20:48 +00003137else
Martin v. Löwis11437992002-04-12 09:54:03 +00003138
Jack Jansene578a632001-08-15 01:27:14 +00003139 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003140 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003141 PYTHONFRAMEWORKPREFIX=
3142 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003143 FRAMEWORKINSTALLFIRST=
3144 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 FRAMEWORKALTINSTALLFIRST=
3146 FRAMEWORKALTINSTALLLAST=
3147 if test "x${prefix}" = "xNONE" ; then
3148 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3149 else
3150 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3151 fi
Jack Jansene578a632001-08-15 01:27:14 +00003152 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003153
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003155fi
3156
Thomas Wouters477c8d52006-05-27 19:21:47 +00003157
3158
Michael W. Hudson54241132001-12-07 15:38:26 +00003159
3160
3161
3162
Jack Jansene578a632001-08-15 01:27:14 +00003163
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003164
3165
3166
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003167
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003168
Jack Jansene578a632001-08-15 01:27:14 +00003169##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003170## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003171## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003172##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003173# Set name for machine-dependent library files
3174
Matthias Kloseb9621712010-04-24 17:59:49 +00003175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3176$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003177if test -z "$MACHDEP"
3178then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003179 # avoid using uname for cross builds
3180 if test "$cross_compiling" = yes; then
3181 # ac_sys_system and ac_sys_release are only used for setting
3182 # `define_xopen_source' in the case statement below. For the
3183 # current supported cross builds, this macro is not adjusted.
3184 case "$host" in
3185 *-*-linux*)
3186 ac_sys_system=Linux
3187 ;;
3188 *-*-cygwin*)
3189 ac_sys_system=Cygwin
3190 ;;
3191 *)
3192 # for now, limit cross builds to known configurations
3193 MACHDEP="unknown"
3194 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3195 esac
3196 ac_sys_release=
3197 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003198 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003199 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003200 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003201 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003203 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003204 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003205 fi
3206 ac_md_system=`echo $ac_sys_system |
3207 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3208 ac_md_release=`echo $ac_sys_release |
3209 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3210 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003211
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003212 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003213 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003214 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003215 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003216 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003217 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003218 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003219fi
Guido van Rossum91922671997-10-09 20:24:13 +00003220
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003221# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3222# disable features if it is defined, without any means to access these
3223# features as extensions. For these systems, we skip the definition of
3224# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3225# some feature, make sure there is no alternative way to access this
3226# feature. Also, when using wildcards, make sure you have verified the
3227# need for not defining _XOPEN_SOURCE on all systems matching the
3228# wildcard, and that the wildcard does not include future systems
3229# (which may remove their limitations).
3230case $ac_sys_system/$ac_sys_release in
3231 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3232 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003233 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003234 # In addition, Stefan Krah confirms that issue #1244610 exists through
3235 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003236 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003237 define_xopen_source=no
3238 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3239 # also defined. This can be overridden by defining _BSD_SOURCE
3240 # As this has a different meaning on Linux, only define it on OpenBSD
3241
Matthias Kloseb9621712010-04-24 17:59:49 +00003242$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003243
3244 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003245 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003246 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3247 # also defined. This can be overridden by defining _BSD_SOURCE
3248 # As this has a different meaning on Linux, only define it on OpenBSD
3249
Matthias Kloseb9621712010-04-24 17:59:49 +00003250$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003251
3252 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003253 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3254 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3255 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003256 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 +00003257 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003258 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3259 # request to enable features supported by the standard as a request
3260 # to disable features not supported by the standard. The best way
3261 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3262 # entirely and define __EXTENSIONS__ instead.
3263 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003264 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003265 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3266 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003267 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003268 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003269 define_xopen_source=no;;
3270 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003271 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003272 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003273 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003274 # On FreeBSD 4, the math functions C89 does not cover are never defined
3275 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3276 FreeBSD/4.*)
3277 define_xopen_source=no;;
3278 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3279 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3280 # identifies itself as Darwin/7.*
3281 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3282 # disables platform specific features beyond repair.
3283 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3284 # has no effect, don't bother defining them
3285 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003286 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003287 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003288 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003289 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3290 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3291 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003292 AIX/4)
3293 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003294 AIX/5)
3295 if test `uname -r` -eq 1; then
3296 define_xopen_source=no
3297 fi
3298 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003299 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3300 # defining NI_NUMERICHOST.
3301 QNX/6.3.2)
3302 define_xopen_source=no
3303 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003304
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003305esac
3306
3307if test $define_xopen_source = yes
3308then
Victor Stinner14d098d2011-09-07 22:29:43 +02003309 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003310
Victor Stinner14d098d2011-09-07 22:29:43 +02003311$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003313
3314 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3315 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3316 # several APIs are not declared. Since this is also needed in some
3317 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003318
Matthias Kloseb9621712010-04-24 17:59:49 +00003319$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003320
3321
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003322
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003323$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003324
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003325fi
3326
Guido van Rossum91922671997-10-09 20:24:13 +00003327#
3328# SGI compilers allow the specification of the both the ABI and the
3329# ISA on the command line. Depending on the values of these switches,
3330# different and often incompatable code will be generated.
3331#
3332# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3333# thus supply support for various ABI/ISA combinations. The MACHDEP
3334# variable is also adjusted.
3335#
3336
3337if test ! -z "$SGI_ABI"
3338then
3339 CC="cc $SGI_ABI"
3340 LDFLAGS="$SGI_ABI $LDFLAGS"
3341 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3342fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3344$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003345
Jack Jansen6b08a402004-06-03 12:41:45 +00003346# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3347# it may influence the way we can build extensions, so distutils
3348# needs to check it
3349
Thomas Wouters477c8d52006-05-27 19:21:47 +00003350
Jack Jansen6b08a402004-06-03 12:41:45 +00003351CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003352EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003353
Guido van Rossum627b2d71993-12-24 10:39:16 +00003354# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003355
3356# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3357# for debug/optimization stuff. BASECFLAGS is for flags that are required
3358# just to get things to compile and link. Users are free to override OPT
3359# when running configure or make. The build should not break if they do.
3360# BASECFLAGS should generally not be messed with, however.
3361
3362# XXX shouldn't some/most/all of this code be merged with the stuff later
3363# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3365$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003367# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003368if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003369 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003370 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003371 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003372 without_gcc=yes;;
3373 yes) CC=gcc
3374 without_gcc=no;;
3375 *) CC=$withval
3376 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003377 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003378else
Martin v. Löwis11437992002-04-12 09:54:03 +00003379
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003380 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003381 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003382 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003383 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003384 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385fi
3386
Matthias Kloseb9621712010-04-24 17:59:49 +00003387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3388$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003389
Guido van Rossum8b131c51995-03-09 14:10:13 +00003390# If the user switches compilers, we can't believe the cache
3391if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3392then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003393 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003394(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003395fi
3396
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003397# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3398# when the compiler supports them, but we don't always want -O2, and
3399# we set -g later.
3400if test -z "$CFLAGS"; then
3401 CFLAGS=
3402fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003403
3404if test "$ac_sys_system" = "Darwin"
3405then
3406 # Compiler selection on MacOSX is more complicated than
3407 # AC_PROG_CC can handle, see Mac/README.txt for more
3408 # information
3409 if test -z "${CC}"
3410 then
3411 found_gcc=
3412 found_clang=
3413 as_save_IFS=$IFS; IFS=:
3414 for as_dir in $PATH
3415 do
3416 IFS=$as_save_IFS
3417 if test -x $as_dir/gcc; then
3418 if test -z "${found_gcc}"; then
3419 found_gcc=$as_dir/gcc
3420 fi
3421 fi
3422 if test -x $as_dir/clang; then
3423 if test -z "${found_clang}"; then
3424 found_clang=$as_dir/clang
3425 fi
3426 fi
3427 done
3428 IFS=$as_save_IFS
3429
3430 if test -n "$found_gcc" -a -n "$found_clang"
3431 then
3432 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3433 then
3434 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3435$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3436 CC="$found_clang"
3437 CXX="$found_clang++"
3438 fi
3439
3440
3441 elif test -z "$found_gcc" -a -n "$found_clang"
3442 then
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3444$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3445 CC="$found_clang"
3446 CXX="$found_clang++"
3447
3448 elif test -z "$found_gcc" -a -z "$found_clang"
3449 then
3450 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3451 if test -n "${found_clang}"
3452 then
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3454$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3455 CC="${found_clang}"
3456 CXX="`/usr/bin/xcrun -find clang++`"
3457
3458 # else: use default behaviour
3459 fi
3460 fi
3461 fi
3462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_ext=c
3464ac_cpp='$CPP $CPPFLAGS'
3465ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3466ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3467ac_compiler_gnu=$ac_cv_c_compiler_gnu
3468if test -n "$ac_tool_prefix"; then
3469 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3470set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3472$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003473if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003474 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003475else
3476 if test -n "$CC"; then
3477 ac_cv_prog_CC="$CC" # Let the user override the test.
3478else
Martin v. Löwis11437992002-04-12 09:54:03 +00003479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480for as_dir in $PATH
3481do
3482 IFS=$as_save_IFS
3483 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003484 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003485 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 +00003486 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003487 $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 +00003488 break 2
3489 fi
3490done
Matthias Kloseb9621712010-04-24 17:59:49 +00003491 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003493
Jack Jansendd19cf82001-12-06 22:36:17 +00003494fi
3495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003496CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003497if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3499$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003500else
Matthias Kloseb9621712010-04-24 17:59:49 +00003501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503fi
3504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506fi
3507if test -z "$ac_cv_prog_CC"; then
3508 ac_ct_CC=$CC
3509 # Extract the first word of "gcc", so it can be a program name with args.
3510set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3512$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003513if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003514 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003515else
3516 if test -n "$ac_ct_CC"; then
3517 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3518else
3519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3520for as_dir in $PATH
3521do
3522 IFS=$as_save_IFS
3523 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003525 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 +00003526 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003527 $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 +00003528 break 2
3529 fi
3530done
Matthias Kloseb9621712010-04-24 17:59:49 +00003531 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003532IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003533
3534fi
3535fi
3536ac_ct_CC=$ac_cv_prog_ac_ct_CC
3537if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3539$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003540else
Matthias Kloseb9621712010-04-24 17:59:49 +00003541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3542$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003543fi
3544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003545 if test "x$ac_ct_CC" = x; then
3546 CC=""
3547 else
3548 case $cross_compiling:$ac_tool_warned in
3549yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003550{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3551$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552ac_tool_warned=yes ;;
3553esac
3554 CC=$ac_ct_CC
3555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003556else
3557 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003558fi
3559
Jack Jansendd19cf82001-12-06 22:36:17 +00003560if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561 if test -n "$ac_tool_prefix"; then
3562 # 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 +00003563set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003566if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003578 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 +00003579 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
3587fi
3588fi
3589CC=$ac_cv_prog_CC
3590if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3592$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003593else
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600fi
3601if test -z "$CC"; then
3602 # Extract the first word of "cc", so it can be a program name with args.
3603set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003606if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
3609 if test -n "$CC"; then
3610 ac_cv_prog_CC="$CC" # Let the user override the test.
3611else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003612 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003619 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 +00003620 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3621 ac_prog_rejected=yes
3622 continue
3623 fi
3624 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $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 +00003626 break 2
3627 fi
3628done
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003632if test $ac_prog_rejected = yes; then
3633 # We found a bogon in the path, so make sure we never use it.
3634 set dummy $ac_cv_prog_CC
3635 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003637 # We chose a different compiler from the bogus one.
3638 # However, it has the same basename, so the bogon will be chosen
3639 # first if we set CC to just the basename; use the full file name.
3640 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003641 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003642 fi
3643fi
3644fi
3645fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003646CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003647if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3649$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003650else
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003653fi
3654
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
3657if test -z "$CC"; then
3658 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003660 do
3661 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Martin v. Löwis11437992002-04-12 09:54:03 +00003671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003677 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 +00003678 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $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 +00003680 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003681 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003682done
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003685
3686fi
3687fi
3688CC=$ac_cv_prog_CC
3689if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3691$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003692else
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003695fi
3696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 test -n "$CC" && break
3699 done
3700fi
3701if test -z "$CC"; then
3702 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003704do
3705 # Extract the first word of "$ac_prog", so it can be a program name with args.
3706set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3708$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003709if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003711else
3712 if test -n "$ac_ct_CC"; then
3713 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3714else
3715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3716for as_dir in $PATH
3717do
3718 IFS=$as_save_IFS
3719 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003721 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 +00003722 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $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 +00003724 break 2
3725 fi
3726done
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003729
Martin v. Löwis11437992002-04-12 09:54:03 +00003730fi
3731fi
3732ac_ct_CC=$ac_cv_prog_ac_ct_CC
3733if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3735$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736else
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3738$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003739fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 test -n "$ac_ct_CC" && break
3743done
Michael W. Hudson54241132001-12-07 15:38:26 +00003744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745 if test "x$ac_ct_CC" = x; then
3746 CC=""
3747 else
3748 case $cross_compiling:$ac_tool_warned in
3749yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752ac_tool_warned=yes ;;
3753esac
3754 CC=$ac_ct_CC
3755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
3757
3758fi
3759
3760
Matthias Kloseb9621712010-04-24 17:59:49 +00003761test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003763as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003764See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003765
3766# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3768set X $ac_compile
3769ac_compiler=$2
3770for ac_option in --version -v -V -qversion; do
3771 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772case "(($ac_try" in
3773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3774 *) ac_try_echo=$ac_try;;
3775esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003776eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3777$as_echo "$ac_try_echo"; } >&5
3778 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 if test -s conftest.err; then
3781 sed '10a\
3782... rest of stderr output deleted ...
3783 10q' conftest.err >conftest.er1
3784 cat conftest.er1 >&5
3785 fi
3786 rm -f conftest.er1 conftest.err
3787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3788 test $ac_status = 0; }
3789done
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
Matthias Kloseb9621712010-04-24 17:59:49 +00003791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003792/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003793
Martin v. Löwis11437992002-04-12 09:54:03 +00003794int
3795main ()
3796{
3797
3798 ;
3799 return 0;
3800}
3801_ACEOF
3802ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003803ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003804# Try to create an executable without -o first, disregard a.out.
3805# It will help us diagnose broken compilers, and finding out an intuition
3806# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3808$as_echo_n "checking whether the C compiler works... " >&6; }
3809ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3810
3811# The possible output files:
3812ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814ac_rmfiles=
3815for ac_file in $ac_files
3816do
3817 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3820 esac
3821done
3822rm -f $ac_rmfiles
3823
Matthias Kloseb9621712010-04-24 17:59:49 +00003824if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825case "(($ac_try" in
3826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3827 *) ac_try_echo=$ac_try;;
3828esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3830$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3834 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3836# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3837# in a Makefile. We should not override ac_cv_exeext if it was cached,
3838# so that the user can short-circuit this test for compilers unknown to
3839# Autoconf.
3840for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003841do
3842 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003845 ;;
3846 [ab].out )
3847 # We found the default executable, but exeext='' is most
3848 # certainly right.
3849 break;;
3850 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 then :; else
3853 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3854 fi
3855 # We set ac_cv_exeext here because the later test for it is not
3856 # safe: cross compilers may not add the suffix if given an `-o'
3857 # argument, so we may need to know it at that point already.
3858 # Even if this section looks crufty: it has the advantage of
3859 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003860 break;;
3861 * )
3862 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 esac
3864done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865test "$ac_cv_exeext" = no && ac_cv_exeext=
3866
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868 ac_file=''
3869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003870if test -z "$ac_file"; then :
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3872$as_echo "no" >&6; }
3873$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003874sed 's/^/| /' conftest.$ac_ext >&5
3875
Matthias Kloseb9621712010-04-24 17:59:49 +00003876{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003878as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003879See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003880else
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3882$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3885$as_echo_n "checking for C compiler default output file name... " >&6; }
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3887$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003888ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003891ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3893$as_echo_n "checking for suffix of executables... " >&6; }
3894if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3900$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3904 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003905 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3906# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3907# work properly (i.e., refer to `conftest.exe'), while it won't with
3908# `rm'.
3909for ac_file in conftest.exe conftest conftest.*; do
3910 test -f "$ac_file" || continue
3911 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 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3914 break;;
3915 * ) break;;
3916 esac
3917done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918else
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003921as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003922See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003924rm -f conftest conftest$ac_cv_exeext
3925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3926$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003927
3928rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003929EXEEXT=$ac_cv_exeext
3930ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3932/* end confdefs.h. */
3933#include <stdio.h>
3934int
3935main ()
3936{
3937FILE *f = fopen ("conftest.out", "w");
3938 return ferror (f) || fclose (f) != 0;
3939
3940 ;
3941 return 0;
3942}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003944ac_clean_files="$ac_clean_files conftest.out"
3945# Check that the compiler produces executables we can run. If not, either
3946# the compiler is broken, or we cross compile.
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3948$as_echo_n "checking whether we are cross compiling... " >&6; }
3949if test "$cross_compiling" != yes; then
3950 { { ac_try="$ac_link"
3951case "(($ac_try" in
3952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3953 *) ac_try_echo=$ac_try;;
3954esac
3955eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3956$as_echo "$ac_try_echo"; } >&5
3957 (eval "$ac_link") 2>&5
3958 ac_status=$?
3959 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3960 test $ac_status = 0; }
3961 if { ac_try='./conftest$ac_cv_exeext'
3962 { { case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
3966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
3968 (eval "$ac_try") 2>&5
3969 ac_status=$?
3970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; }; then
3972 cross_compiling=no
3973 else
3974 if test "$cross_compiling" = maybe; then
3975 cross_compiling=yes
3976 else
3977 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003979as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00003980If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02003981See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 fi
3983 fi
3984fi
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3986$as_echo "$cross_compiling" >&6; }
3987
3988rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3989ac_clean_files=$ac_clean_files_save
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3991$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003992if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 $as_echo_n "(cached) " >&6
3994else
3995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996/* end confdefs.h. */
3997
3998int
3999main ()
4000{
4001
4002 ;
4003 return 0;
4004}
4005_ACEOF
4006rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004007if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008case "(($ac_try" in
4009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4010 *) ac_try_echo=$ac_try;;
4011esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004012eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4013$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004014 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004015 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004016 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4017 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 for ac_file in conftest.o conftest.obj conftest.*; do
4019 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4023 break;;
4024 esac
4025done
4026else
Matthias Kloseb9621712010-04-24 17:59:49 +00004027 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004028sed 's/^/| /' conftest.$ac_ext >&5
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004034fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004035rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4038$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004039OBJEXT=$ac_cv_objext
4040ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4042$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004043if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004045else
Matthias Kloseb9621712010-04-24 17:59:49 +00004046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004048
Martin v. Löwis11437992002-04-12 09:54:03 +00004049int
4050main ()
4051{
4052#ifndef __GNUC__
4053 choke me
4054#endif
4055
4056 ;
4057 return 0;
4058}
4059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004061 ac_compiler_gnu=yes
4062else
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004066ac_cv_c_compiler_gnu=$ac_compiler_gnu
4067
4068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4070$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4071if test $ac_compiler_gnu = yes; then
4072 GCC=yes
4073else
4074 GCC=
4075fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004076ac_test_CFLAGS=${CFLAGS+set}
4077ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4079$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004080if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004082else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 ac_save_c_werror_flag=$ac_c_werror_flag
4084 ac_c_werror_flag=yes
4085 ac_cv_prog_cc_g=no
4086 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004089
Martin v. Löwis11437992002-04-12 09:54:03 +00004090int
4091main ()
4092{
4093
4094 ;
4095 return 0;
4096}
4097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004098if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004099 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100else
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 CFLAGS=""
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004103/* end confdefs.h. */
4104
4105int
4106main ()
4107{
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004113if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114
Matthias Kloseb9621712010-04-24 17:59:49 +00004115else
4116 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004119/* end confdefs.h. */
4120
4121int
4122main ()
4123{
4124
4125 ;
4126 return 0;
4127}
4128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004129if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4137 ac_c_werror_flag=$ac_save_c_werror_flag
4138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4140$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004141if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004143elif test $ac_cv_prog_cc_g = yes; then
4144 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004145 CFLAGS="-g -O2"
4146 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004147 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148 fi
4149else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004150 if test "$GCC" = yes; then
4151 CFLAGS="-O2"
4152 else
4153 CFLAGS=
4154 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4157$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004158if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004160else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004162ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004164/* end confdefs.h. */
4165#include <stdarg.h>
4166#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004167#include <sys/types.h>
4168#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004169/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4170struct buf { int x; };
4171FILE * (*rcsopen) (struct buf *, struct stat *, int);
4172static char *e (p, i)
4173 char **p;
4174 int i;
4175{
4176 return p[i];
4177}
4178static char *f (char * (*g) (char **, int), char **p, ...)
4179{
4180 char *s;
4181 va_list v;
4182 va_start (v,p);
4183 s = g (p, va_arg (v,int));
4184 va_end (v);
4185 return s;
4186}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004187
4188/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4189 function prototypes and stuff, but not '\xHH' hex character constants.
4190 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004192 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4193 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004195int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4198 inside strings and character constants. */
4199#define FOO(x) 'x'
4200int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4201
Skip Montanaro6dead952003-09-25 14:50:04 +00004202int test (int i, double x);
4203struct s1 {int (*f) (int a);};
4204struct s2 {int (*f) (double a);};
4205int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4206int argc;
4207char **argv;
4208int
4209main ()
4210{
4211return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4212 ;
4213 return 0;
4214}
4215_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4217 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004218do
4219 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004220 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223rm -f core conftest.err conftest.$ac_objext
4224 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004225done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004227CC=$ac_save_CC
4228
4229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230# AC_CACHE_VAL
4231case "x$ac_cv_prog_cc_c89" in
4232 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4234$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4237$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004238 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4241$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004242esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004243if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004244
Matthias Kloseb9621712010-04-24 17:59:49 +00004245fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004246
Martin v. Löwis11437992002-04-12 09:54:03 +00004247ac_ext=c
4248ac_cpp='$CPP $CPPFLAGS'
4249ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4250ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4251ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004253
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004254
4255
Matthias Kloseb9621712010-04-24 17:59:49 +00004256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4257$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004258
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004260if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004262
4263 case $withval in
4264 no) with_cxx_main=no
4265 MAINCC='$(CC)';;
4266 yes) with_cxx_main=yes
4267 MAINCC='$(CXX)';;
4268 *) with_cxx_main=yes
4269 MAINCC=$withval
4270 if test -z "$CXX"
4271 then
4272 CXX=$withval
4273 fi;;
4274 esac
4275else
4276
4277 with_cxx_main=no
4278 MAINCC='$(CC)'
4279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280fi
4281
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4283$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004284
4285preset_cxx="$CXX"
4286if test -z "$CXX"
4287then
4288 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004289 gcc) if test -n "$ac_tool_prefix"; then
4290 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4291set dummy ${ac_tool_prefix}g++; ac_word=$2
4292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4293$as_echo_n "checking for $ac_word... " >&6; }
4294if ${ac_cv_path_CXX+:} false; then :
4295 $as_echo_n "(cached) " >&6
4296else
4297 case $CXX in
4298 [\\/]* | ?:[\\/]*)
4299 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4300 ;;
4301 *)
4302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4303for as_dir in notfound
4304do
4305 IFS=$as_save_IFS
4306 test -z "$as_dir" && as_dir=.
4307 for ac_exec_ext in '' $ac_executable_extensions; do
4308 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4309 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4310 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4311 break 2
4312 fi
4313done
4314 done
4315IFS=$as_save_IFS
4316
4317 ;;
4318esac
4319fi
4320CXX=$ac_cv_path_CXX
4321if test -n "$CXX"; then
4322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4323$as_echo "$CXX" >&6; }
4324else
4325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4326$as_echo "no" >&6; }
4327fi
4328
4329
4330fi
4331if test -z "$ac_cv_path_CXX"; then
4332 ac_pt_CXX=$CXX
4333 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004334set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4336$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004337if ${ac_cv_path_ac_pt_CXX+:} false; then :
4338 $as_echo_n "(cached) " >&6
4339else
4340 case $ac_pt_CXX in
4341 [\\/]* | ?:[\\/]*)
4342 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4343 ;;
4344 *)
4345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346for as_dir in notfound
4347do
4348 IFS=$as_save_IFS
4349 test -z "$as_dir" && as_dir=.
4350 for ac_exec_ext in '' $ac_executable_extensions; do
4351 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4352 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4354 break 2
4355 fi
4356done
4357 done
4358IFS=$as_save_IFS
4359
4360 ;;
4361esac
4362fi
4363ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4364if test -n "$ac_pt_CXX"; then
4365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4366$as_echo "$ac_pt_CXX" >&6; }
4367else
4368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4369$as_echo "no" >&6; }
4370fi
4371
4372 if test "x$ac_pt_CXX" = x; then
4373 CXX="g++"
4374 else
4375 case $cross_compiling:$ac_tool_warned in
4376yes:)
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4378$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4379ac_tool_warned=yes ;;
4380esac
4381 CXX=$ac_pt_CXX
4382 fi
4383else
4384 CXX="$ac_cv_path_CXX"
4385fi
4386 ;;
4387 cc) if test -n "$ac_tool_prefix"; then
4388 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4389set dummy ${ac_tool_prefix}c++; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004392if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004394else
4395 case $CXX in
4396 [\\/]* | ?:[\\/]*)
4397 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4398 ;;
4399 *)
4400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in notfound
4402do
4403 IFS=$as_save_IFS
4404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004406 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 +00004407 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004409 break 2
4410 fi
4411done
Matthias Kloseb9621712010-04-24 17:59:49 +00004412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004414
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004415 ;;
4416esac
4417fi
4418CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004419if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4421$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004422else
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004426
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004427
4428fi
4429if test -z "$ac_cv_path_CXX"; then
4430 ac_pt_CXX=$CXX
4431 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004432set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004435if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004436 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004437else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004438 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004439 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004440 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 +00004441 ;;
4442 *)
4443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444for as_dir in notfound
4445do
4446 IFS=$as_save_IFS
4447 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004449 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4450 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004452 break 2
4453 fi
4454done
Matthias Kloseb9621712010-04-24 17:59:49 +00004455 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004457
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004458 ;;
4459esac
4460fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004461ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4462if test -n "$ac_pt_CXX"; then
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4464$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004465else
Matthias Kloseb9621712010-04-24 17:59:49 +00004466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4467$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004470 if test "x$ac_pt_CXX" = x; then
4471 CXX="c++"
4472 else
4473 case $cross_compiling:$ac_tool_warned in
4474yes:)
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4477ac_tool_warned=yes ;;
4478esac
4479 CXX=$ac_pt_CXX
4480 fi
4481else
4482 CXX="$ac_cv_path_CXX"
4483fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004484 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004485 clang|*/clang) if test -n "$ac_tool_prefix"; then
4486 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4487set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
4490if ${ac_cv_path_CXX+:} false; then :
4491 $as_echo_n "(cached) " >&6
4492else
4493 case $CXX in
4494 [\\/]* | ?:[\\/]*)
4495 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4496 ;;
4497 *)
4498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in notfound
4500do
4501 IFS=$as_save_IFS
4502 test -z "$as_dir" && as_dir=.
4503 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004504 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 -07004505 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507 break 2
4508 fi
4509done
4510 done
4511IFS=$as_save_IFS
4512
Ned Deilycbfb9a52012-06-23 16:02:19 -07004513 ;;
4514esac
4515fi
4516CXX=$ac_cv_path_CXX
4517if test -n "$CXX"; then
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4519$as_echo "$CXX" >&6; }
4520else
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004525
4526fi
4527if test -z "$ac_cv_path_CXX"; then
4528 ac_pt_CXX=$CXX
4529 # Extract the first word of "clang++", so it can be a program name with args.
4530set dummy clang++; ac_word=$2
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532$as_echo_n "checking for $ac_word... " >&6; }
4533if ${ac_cv_path_ac_pt_CXX+:} false; then :
4534 $as_echo_n "(cached) " >&6
4535else
4536 case $ac_pt_CXX in
4537 [\\/]* | ?:[\\/]*)
4538 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4539 ;;
4540 *)
4541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4542for as_dir in notfound
4543do
4544 IFS=$as_save_IFS
4545 test -z "$as_dir" && as_dir=.
4546 for ac_exec_ext in '' $ac_executable_extensions; do
4547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4548 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4550 break 2
4551 fi
4552done
4553 done
4554IFS=$as_save_IFS
4555
4556 ;;
4557esac
4558fi
4559ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4560if test -n "$ac_pt_CXX"; then
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4562$as_echo "$ac_pt_CXX" >&6; }
4563else
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; }
4566fi
4567
4568 if test "x$ac_pt_CXX" = x; then
4569 CXX="clang++"
4570 else
4571 case $cross_compiling:$ac_tool_warned in
4572yes:)
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4575ac_tool_warned=yes ;;
4576esac
4577 CXX=$ac_pt_CXX
4578 fi
4579else
4580 CXX="$ac_cv_path_CXX"
4581fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004582 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004583 esac
4584 if test "$CXX" = "notfound"
4585 then
4586 CXX=""
4587 fi
4588fi
4589if test -z "$CXX"
4590then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004591 if test -n "$ac_tool_prefix"; then
4592 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4593 do
4594 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4595set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004598if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004599 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600else
4601 if test -n "$CXX"; then
4602 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4603else
4604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4605for as_dir in $PATH
4606do
4607 IFS=$as_save_IFS
4608 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004609 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004610 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4611 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613 break 2
4614 fi
4615done
Matthias Kloseb9621712010-04-24 17:59:49 +00004616 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004617IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004618
4619fi
4620fi
4621CXX=$ac_cv_prog_CXX
4622if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4624$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004625else
Matthias Kloseb9621712010-04-24 17:59:49 +00004626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004628fi
4629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004630
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004631 test -n "$CXX" && break
4632 done
4633fi
4634if test -z "$CXX"; then
4635 ac_ct_CXX=$CXX
4636 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4637do
4638 # Extract the first word of "$ac_prog", so it can be a program name with args.
4639set dummy $ac_prog; ac_word=$2
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641$as_echo_n "checking for $ac_word... " >&6; }
4642if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4643 $as_echo_n "(cached) " >&6
4644else
4645 if test -n "$ac_ct_CXX"; then
4646 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4647else
4648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649for as_dir in $PATH
4650do
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4655 ac_cv_prog_ac_ct_CXX="$ac_prog"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4658 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004659done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660 done
4661IFS=$as_save_IFS
4662
4663fi
4664fi
4665ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4666if test -n "$ac_ct_CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4668$as_echo "$ac_ct_CXX" >&6; }
4669else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
4674
4675 test -n "$ac_ct_CXX" && break
4676done
4677
4678 if test "x$ac_ct_CXX" = x; then
4679 CXX="notfound"
4680 else
4681 case $cross_compiling:$ac_tool_warned in
4682yes:)
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4684$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4685ac_tool_warned=yes ;;
4686esac
4687 CXX=$ac_ct_CXX
4688 fi
4689fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690
4691 if test "$CXX" = "notfound"
4692 then
4693 CXX=""
4694 fi
4695fi
4696if test "$preset_cxx" != "$CXX"
4697then
Matthias Kloseb9621712010-04-24 17:59:49 +00004698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004699
4700 By default, distutils will build C++ extension modules with \"$CXX\".
4701 If this is not intended, then set CXX on the configure command line.
4702 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004703$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004704
4705 By default, distutils will build C++ extension modules with \"$CXX\".
4706 If this is not intended, then set CXX on the configure command line.
4707 " >&2;}
4708fi
4709
4710
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4712$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4713save_LDFLAGS="$LDFLAGS"
4714LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004715
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4717/* end confdefs.h. */
4718
4719int
4720main ()
4721{
4722
4723 ;
4724 return 0;
4725}
4726_ACEOF
4727if ac_fn_c_try_link "$LINENO"; then :
4728 NO_AS_NEEDED="-Wl,--no-as-needed"
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4730$as_echo "yes" >&6; }
4731else
4732 NO_AS_NEEDED=""
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4734$as_echo "no" >&6; }
4735fi
4736rm -f core conftest.err conftest.$ac_objext \
4737 conftest$ac_exeext conftest.$ac_ext
4738LDFLAGS="$save_LDFLAGS"
4739
4740
4741
4742# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004743ac_ext=c
4744ac_cpp='$CPP $CPPFLAGS'
4745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4747ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4749$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004750# On Suns, sometimes $CPP names a directory.
4751if test -n "$CPP" && test -d "$CPP"; then
4752 CPP=
4753fi
4754if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004755 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004757else
Martin v. Löwis11437992002-04-12 09:54:03 +00004758 # Double quotes because CPP needs to be expanded
4759 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4760 do
4761 ac_preproc_ok=false
4762for ac_c_preproc_warn_flag in '' yes
4763do
4764 # Use a header file that comes with gcc, so configuring glibc
4765 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004766 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4767 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004768 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004769 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004771/* end confdefs.h. */
4772#ifdef __STDC__
4773# include <limits.h>
4774#else
4775# include <assert.h>
4776#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004777 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004779if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004780
Matthias Kloseb9621712010-04-24 17:59:49 +00004781else
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 # Broken: fails on valid input.
4783continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004784fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004785rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004791#include <ac_nonexistent.h>
4792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004793if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # Broken: success on invalid input.
4795continue
4796else
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 # Passes both tests.
4798ac_preproc_ok=:
4799break
4800fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004801rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004802
4803done
4804# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004805rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004806if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 break
4808fi
4809
4810 done
4811 ac_cv_prog_CPP=$CPP
4812
4813fi
4814 CPP=$ac_cv_prog_CPP
4815else
4816 ac_cv_prog_CPP=$CPP
4817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4819$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004820ac_preproc_ok=false
4821for ac_c_preproc_warn_flag in '' yes
4822do
4823 # Use a header file that comes with gcc, so configuring glibc
4824 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004825 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4826 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004827 # On the NeXT, cc -E runs the code through the compiler's parser,
4828 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004830/* end confdefs.h. */
4831#ifdef __STDC__
4832# include <limits.h>
4833#else
4834# include <assert.h>
4835#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004836 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004838if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004839
Matthias Kloseb9621712010-04-24 17:59:49 +00004840else
Martin v. Löwis11437992002-04-12 09:54:03 +00004841 # Broken: fails on valid input.
4842continue
4843fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004844rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004846 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004847 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004850#include <ac_nonexistent.h>
4851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004852if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 # Broken: success on invalid input.
4854continue
4855else
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 # Passes both tests.
4857ac_preproc_ok=:
4858break
4859fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004860rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004861
4862done
4863# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004864rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004865if $ac_preproc_ok; then :
4866
Martin v. Löwis11437992002-04-12 09:54:03 +00004867else
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004870as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004872fi
4873
4874ac_ext=c
4875ac_cpp='$CPP $CPPFLAGS'
4876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4878ac_compiler_gnu=$ac_cv_c_compiler_gnu
4879
4880
Matthias Kloseb9621712010-04-24 17:59:49 +00004881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4882$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004883if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004885else
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004887 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004888 # Loop through the user's path and test for each of PROGNAME-LIST
4889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004890for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4891do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004894 for ac_prog in grep ggrep; do
4895 for ac_exec_ext in '' $ac_executable_extensions; do
4896 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004897 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004898# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004899 # Check for GNU $ac_path_GREP
4900case `"$ac_path_GREP" --version 2>&1` in
4901*GNU*)
4902 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4903*)
4904 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004906 while :
4907 do
4908 cat "conftest.in" "conftest.in" >"conftest.tmp"
4909 mv "conftest.tmp" "conftest.in"
4910 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004912 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4913 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004914 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004915 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4916 # Best one so far, save it but keep looking for a better one
4917 ac_cv_path_GREP="$ac_path_GREP"
4918 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004919 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004920 # 10*(2^10) chars as input seems more than enough
4921 test $ac_count -gt 10 && break
4922 done
4923 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4924esac
4925
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 $ac_path_GREP_found && break 3
4927 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004928 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004929 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004930IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004931 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004932 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 +00004933 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004934else
4935 ac_cv_path_GREP=$GREP
4936fi
4937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4940$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004941 GREP="$ac_cv_path_GREP"
4942
4943
Matthias Kloseb9621712010-04-24 17:59:49 +00004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4945$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004946if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004947 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004948else
4949 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4950 then ac_cv_path_EGREP="$GREP -E"
4951 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004952 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004953 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 # Loop through the user's path and test for each of PROGNAME-LIST
4955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004956for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4957do
4958 IFS=$as_save_IFS
4959 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 for ac_prog in egrep; do
4961 for ac_exec_ext in '' $ac_executable_extensions; do
4962 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004963 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004964# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004965 # Check for GNU $ac_path_EGREP
4966case `"$ac_path_EGREP" --version 2>&1` in
4967*GNU*)
4968 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4969*)
4970 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004972 while :
4973 do
4974 cat "conftest.in" "conftest.in" >"conftest.tmp"
4975 mv "conftest.tmp" "conftest.in"
4976 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004978 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4979 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004981 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4982 # Best one so far, save it but keep looking for a better one
4983 ac_cv_path_EGREP="$ac_path_EGREP"
4984 ac_path_EGREP_max=$ac_count
4985 fi
4986 # 10*(2^10) chars as input seems more than enough
4987 test $ac_count -gt 10 && break
4988 done
4989 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4990esac
4991
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 $ac_path_EGREP_found && break 3
4993 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004994 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004998 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 +00004999 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005000else
5001 ac_cv_path_EGREP=$EGREP
5002fi
5003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004 fi
5005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5007$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005008 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005009
5010
Matthias Kloseb9621712010-04-24 17:59:49 +00005011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5012$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005013if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005014 $as_echo_n "(cached) " >&6
5015else
5016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005017/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005018#include <stdlib.h>
5019#include <stdarg.h>
5020#include <string.h>
5021#include <float.h>
5022
5023int
5024main ()
5025{
5026
5027 ;
5028 return 0;
5029}
5030_ACEOF
5031if ac_fn_c_try_compile "$LINENO"; then :
5032 ac_cv_header_stdc=yes
5033else
5034 ac_cv_header_stdc=no
5035fi
5036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5037
5038if test $ac_cv_header_stdc = yes; then
5039 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5041/* end confdefs.h. */
5042#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005043
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005044_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005047
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005048else
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005050fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005051rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005052
Matthias Kloseb9621712010-04-24 17:59:49 +00005053fi
5054
5055if test $ac_cv_header_stdc = yes; then
5056 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5058/* end confdefs.h. */
5059#include <stdlib.h>
5060
5061_ACEOF
5062if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5063 $EGREP "free" >/dev/null 2>&1; then :
5064
5065else
5066 ac_cv_header_stdc=no
5067fi
5068rm -f conftest*
5069
5070fi
5071
5072if test $ac_cv_header_stdc = yes; then
5073 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5074 if test "$cross_compiling" = yes; then :
5075 :
5076else
5077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5078/* end confdefs.h. */
5079#include <ctype.h>
5080#include <stdlib.h>
5081#if ((' ' & 0x0FF) == 0x020)
5082# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5083# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5084#else
5085# define ISLOWER(c) \
5086 (('a' <= (c) && (c) <= 'i') \
5087 || ('j' <= (c) && (c) <= 'r') \
5088 || ('s' <= (c) && (c) <= 'z'))
5089# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5090#endif
5091
5092#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5093int
5094main ()
5095{
5096 int i;
5097 for (i = 0; i < 256; i++)
5098 if (XOR (islower (i), ISLOWER (i))
5099 || toupper (i) != TOUPPER (i))
5100 return 2;
5101 return 0;
5102}
5103_ACEOF
5104if ac_fn_c_try_run "$LINENO"; then :
5105
5106else
5107 ac_cv_header_stdc=no
5108fi
5109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5110 conftest.$ac_objext conftest.beam conftest.$ac_ext
5111fi
5112
5113fi
5114fi
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5116$as_echo "$ac_cv_header_stdc" >&6; }
5117if test $ac_cv_header_stdc = yes; then
5118
5119$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5120
5121fi
5122
5123# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5124for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5125 inttypes.h stdint.h unistd.h
5126do :
5127 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5128ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5129"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005130if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 cat >>confdefs.h <<_ACEOF
5132#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5133_ACEOF
5134
5135fi
5136
5137done
5138
5139
5140
5141 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 +02005142if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 MINIX=yes
5144else
5145 MINIX=
5146fi
5147
5148
5149 if test "$MINIX" = yes; then
5150
5151$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5152
5153
5154$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5155
5156
5157$as_echo "#define _MINIX 1" >>confdefs.h
5158
5159 fi
5160
5161
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5163$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005164if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 $as_echo_n "(cached) " >&6
5166else
5167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5168/* end confdefs.h. */
5169
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005170# define __EXTENSIONS__ 1
5171 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005172int
5173main ()
5174{
5175
5176 ;
5177 return 0;
5178}
5179_ACEOF
5180if ac_fn_c_try_compile "$LINENO"; then :
5181 ac_cv_safe_to_define___extensions__=yes
5182else
5183 ac_cv_safe_to_define___extensions__=no
5184fi
5185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5186fi
5187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5188$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5189 test $ac_cv_safe_to_define___extensions__ = yes &&
5190 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5191
5192 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5193
5194 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5195
5196 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5197
5198 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5199
5200
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005201
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202# Check for unsupported systems
5203case $ac_sys_system/$ac_sys_release in
5204atheos*|Linux*/1*)
5205 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5206 echo See README for details.
5207 exit 1;;
5208esac
5209
5210
Matthias Kloseb9621712010-04-24 17:59:49 +00005211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5212$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005213
5214# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005215if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005216 withval=$with_suffix;
5217 case $withval in
5218 no) EXEEXT=;;
5219 yes) EXEEXT=.exe;;
5220 *) EXEEXT=$withval;;
5221 esac
5222fi
5223
Matthias Kloseb9621712010-04-24 17:59:49 +00005224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5225$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005226
5227# Test whether we're running on a non-case-sensitive system, in which
5228# case we give a warning if no ext is given
5229
Matthias Kloseb9621712010-04-24 17:59:49 +00005230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5231$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232if test ! -d CaseSensitiveTestDir; then
5233mkdir CaseSensitiveTestDir
5234fi
5235
5236if test -d casesensitivetestdir
5237then
Matthias Kloseb9621712010-04-24 17:59:49 +00005238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5239$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005240 BUILDEXEEXT=.exe
5241else
Matthias Kloseb9621712010-04-24 17:59:49 +00005242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005244 BUILDEXEEXT=$EXEEXT
5245fi
5246rmdir CaseSensitiveTestDir
5247
5248case $MACHDEP in
5249bsdos*)
5250 case $CC in
5251 gcc) CC="$CC -D_HAVE_BSDI";;
5252 esac;;
5253esac
5254
5255case $ac_sys_system in
5256hp*|HP*)
5257 case $CC in
5258 cc|*/cc) CC="$CC -Ae";;
5259 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005260esac
5261
5262
5263
Matthias Kloseb9621712010-04-24 17:59:49 +00005264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5265$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005266if test -z "$LIBRARY"
5267then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005268 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5271$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005272
5273# LDLIBRARY is the name of the library to link against (as opposed to the
5274# name of the library into which to insert object files). BLDLIBRARY is also
5275# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5276# is blank as the main program is not linked directly against LDLIBRARY.
5277# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5278# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5279# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5280# DLLLIBRARY is the shared (i.e., DLL) library.
5281#
5282# RUNSHARED is used to run shared python without installed libraries
5283#
5284# INSTSONAME is the name of the shared library that will be use to install
5285# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005286#
5287# LDVERSION is the shared library version number, normally the Python version
5288# with the ABI build flags appended.
5289
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290
5291
5292
5293
5294
5295
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297LDLIBRARY="$LIBRARY"
5298BLDLIBRARY='$(LDLIBRARY)'
5299INSTSONAME='$(LDLIBRARY)'
5300DLLLIBRARY=''
5301LDLIBRARYDIR=''
5302RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005303LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005304
5305# LINKCC is the command that links the python executable -- default is $(CC).
5306# If CXX is set, and if it is needed to link a main function that was
5307# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5308# python might then depend on the C++ runtime
5309# This is altered for AIX in order to build the export list before
5310# linking.
5311
Matthias Kloseb9621712010-04-24 17:59:49 +00005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5313$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314if test -z "$LINKCC"
5315then
5316 LINKCC='$(PURIFY) $(MAINCC)'
5317 case $ac_sys_system in
5318 AIX*)
5319 exp_extra="\"\""
5320 if test $ac_sys_release -ge 5 -o \
5321 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5322 exp_extra="."
5323 fi
5324 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005325 QNX*)
5326 # qcc must be used because the other compilers do not
5327 # support -N.
5328 LINKCC=qcc;;
5329 esac
5330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5332$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005333
5334# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5335# make sure we default having it set to "no": this is used by
5336# distutils.unixccompiler to know if it should add --enable-new-dtags
5337# to linker command lines, and failing to detect GNU ld simply results
5338# in the same bahaviour as before.
5339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5341$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342ac_prog=ld
5343if test "$GCC" = yes; then
5344 ac_prog=`$CC -print-prog-name=ld`
5345fi
5346case `"$ac_prog" -V 2>&1 < /dev/null` in
5347 *GNU*)
5348 GNULD=yes;;
5349 *)
5350 GNULD=no;;
5351esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5353$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5356$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005357if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005358 $as_echo_n "(cached) " >&6
5359else
5360 ac_cv_c_inline=no
5361for ac_kw in inline __inline__ __inline; do
5362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5363/* end confdefs.h. */
5364#ifndef __cplusplus
5365typedef int foo_t;
5366static $ac_kw foo_t static_foo () {return 0; }
5367$ac_kw foo_t foo () {return 0; }
5368#endif
5369
5370_ACEOF
5371if ac_fn_c_try_compile "$LINENO"; then :
5372 ac_cv_c_inline=$ac_kw
5373fi
5374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375 test "$ac_cv_c_inline" != no && break
5376done
5377
5378fi
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5380$as_echo "$ac_cv_c_inline" >&6; }
5381
5382case $ac_cv_c_inline in
5383 inline | yes) ;;
5384 *)
5385 case $ac_cv_c_inline in
5386 no) ac_val=;;
5387 *) ac_val=$ac_cv_c_inline;;
5388 esac
5389 cat >>confdefs.h <<_ACEOF
5390#ifndef __cplusplus
5391#define inline $ac_val
5392#endif
5393_ACEOF
5394 ;;
5395esac
5396
5397if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005398
5399$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005400
5401
5402fi
5403
5404
Matthias Kloseb9621712010-04-24 17:59:49 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5406$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005408if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005409 enableval=$enable_shared;
5410fi
5411
5412
5413if test -z "$enable_shared"
5414then
5415 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005416 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417 enable_shared="yes";;
5418 *)
5419 enable_shared="no";;
5420 esac
5421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5423$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005424
Matthias Kloseb9621712010-04-24 17:59:49 +00005425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5426$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005427# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005428if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005429 enableval=$enable_profiling;
5430fi
5431
5432if test "x$enable_profiling" = xyes; then
5433 ac_save_cc="$CC"
5434 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436/* end confdefs.h. */
5437int main() { return 0; }
5438_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005439if ac_fn_c_try_link "$LINENO"; then :
5440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005442 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005444rm -f core conftest.err conftest.$ac_objext \
5445 conftest$ac_exeext conftest.$ac_ext
5446 CC="$ac_save_cc"
5447else
5448 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5451$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452
doko@ubuntu.comba015832012-06-30 16:52:05 +02005453if test "x$enable_profiling" = xyes; then
5454 BASECFLAGS="-pg $BASECFLAGS"
5455 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456fi
5457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5459$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
5461# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5462# library that we build, but we do not want to link against it (we
5463# will find it with a -framework option). For this reason there is an
5464# extra variable BLDLIBRARY against which Python and the extension
5465# modules are linked, BLDLIBRARY. This is normally the same as
5466# LDLIBRARY, but empty for MacOSX framework builds.
5467if test "$enable_framework"
5468then
5469 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5470 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5471 BLDLIBRARY=''
5472else
5473 BLDLIBRARY='$(LDLIBRARY)'
5474fi
5475
5476# Other platforms follow
5477if test $enable_shared = "yes"; then
5478
Matthias Kloseb9621712010-04-24 17:59:49 +00005479$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480
5481 case $ac_sys_system in
5482 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005483 LDLIBRARY='libpython$(LDVERSION).dll.a'
5484 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 ;;
5486 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005487 LDLIBRARY='libpython$(LDVERSION).so'
5488 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5490 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005491 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005492 then
5493 PY3LIBRARY=libpython3.so
5494 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005496 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005497 LDLIBRARY='libpython$(LDVERSION).so'
5498 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5500 case $ac_sys_system in
5501 FreeBSD*)
5502 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5503 ;;
5504 esac
5505 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005506 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005507 then
5508 PY3LIBRARY=libpython3.so
5509 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 ;;
5511 hp*|HP*)
5512 case `uname -m` in
5513 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005514 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515 ;;
5516 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005517 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 ;;
5519 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005520 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005521 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5522 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005523 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005524 LDLIBRARY='libpython$(LDVERSION).dylib'
5525 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5527 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005528 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005529 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005530 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5531 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532
5533 esac
5534else # shared is disabled
5535 case $ac_sys_system in
5536 CYGWIN*)
5537 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005538 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539 ;;
5540 esac
5541fi
5542
Matthias Kloseb9621712010-04-24 17:59:49 +00005543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5544$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545
5546if test -n "$ac_tool_prefix"; then
5547 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5548set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5550$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005551if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553else
5554 if test -n "$RANLIB"; then
5555 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5556else
5557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5558for as_dir in $PATH
5559do
5560 IFS=$as_save_IFS
5561 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005563 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 +00005564 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566 break 2
5567 fi
5568done
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570IFS=$as_save_IFS
5571
5572fi
5573fi
5574RANLIB=$ac_cv_prog_RANLIB
5575if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5577$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578else
Matthias Kloseb9621712010-04-24 17:59:49 +00005579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5580$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581fi
5582
5583
5584fi
5585if test -z "$ac_cv_prog_RANLIB"; then
5586 ac_ct_RANLIB=$RANLIB
5587 # Extract the first word of "ranlib", so it can be a program name with args.
5588set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005591if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593else
5594 if test -n "$ac_ct_RANLIB"; then
5595 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5596else
5597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5598for as_dir in $PATH
5599do
5600 IFS=$as_save_IFS
5601 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005602 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005603 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 +00005604 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606 break 2
5607 fi
5608done
Matthias Kloseb9621712010-04-24 17:59:49 +00005609 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610IFS=$as_save_IFS
5611
5612fi
5613fi
5614ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5615if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5617$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618else
Matthias Kloseb9621712010-04-24 17:59:49 +00005619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5620$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621fi
5622
5623 if test "x$ac_ct_RANLIB" = x; then
5624 RANLIB=":"
5625 else
5626 case $cross_compiling:$ac_tool_warned in
5627yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630ac_tool_warned=yes ;;
5631esac
5632 RANLIB=$ac_ct_RANLIB
5633 fi
5634else
5635 RANLIB="$ac_cv_prog_RANLIB"
5636fi
5637
5638
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005639if test -n "$ac_tool_prefix"; then
5640 for ac_prog in ar aal
5641 do
5642 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005646if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005647 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648else
5649 if test -n "$AR"; then
5650 ac_cv_prog_AR="$AR" # Let the user override the test.
5651else
5652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655 IFS=$as_save_IFS
5656 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5659 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 break 2
5662 fi
5663done
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665IFS=$as_save_IFS
5666
5667fi
5668fi
5669AR=$ac_cv_prog_AR
5670if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5672$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673else
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676fi
5677
5678
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005679 test -n "$AR" && break
5680 done
5681fi
5682if test -z "$AR"; then
5683 ac_ct_AR=$AR
5684 for ac_prog in ar aal
5685do
5686 # Extract the first word of "$ac_prog", so it can be a program name with args.
5687set dummy $ac_prog; ac_word=$2
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5689$as_echo_n "checking for $ac_word... " >&6; }
5690if ${ac_cv_prog_ac_ct_AR+:} false; then :
5691 $as_echo_n "(cached) " >&6
5692else
5693 if test -n "$ac_ct_AR"; then
5694 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5695else
5696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697for as_dir in $PATH
5698do
5699 IFS=$as_save_IFS
5700 test -z "$as_dir" && as_dir=.
5701 for ac_exec_ext in '' $ac_executable_extensions; do
5702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5703 ac_cv_prog_ac_ct_AR="$ac_prog"
5704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705 break 2
5706 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005708 done
5709IFS=$as_save_IFS
5710
5711fi
5712fi
5713ac_ct_AR=$ac_cv_prog_ac_ct_AR
5714if test -n "$ac_ct_AR"; then
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5716$as_echo "$ac_ct_AR" >&6; }
5717else
5718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5719$as_echo "no" >&6; }
5720fi
5721
5722
5723 test -n "$ac_ct_AR" && break
5724done
5725
5726 if test "x$ac_ct_AR" = x; then
5727 AR="ar"
5728 else
5729 case $cross_compiling:$ac_tool_warned in
5730yes:)
5731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5733ac_tool_warned=yes ;;
5734esac
5735 AR=$ac_ct_AR
5736 fi
5737fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738
5739
5740# tweak ARFLAGS only if the user didn't set it on the command line
5741
5742if test -z "$ARFLAGS"
5743then
5744 ARFLAGS="rc"
5745fi
5746
doko@ubuntu.com58844492012-06-30 18:25:32 +02005747if test -n "$ac_tool_prefix"; then
5748 for ac_prog in readelf
5749 do
5750 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5753$as_echo_n "checking for $ac_word... " >&6; }
5754if ${ac_cv_prog_READELF+:} false; then :
5755 $as_echo_n "(cached) " >&6
5756else
5757 if test -n "$READELF"; then
5758 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5759else
5760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5761for as_dir in $PATH
5762do
5763 IFS=$as_save_IFS
5764 test -z "$as_dir" && as_dir=.
5765 for ac_exec_ext in '' $ac_executable_extensions; do
5766 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5767 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5769 break 2
5770 fi
5771done
5772 done
5773IFS=$as_save_IFS
5774
5775fi
5776fi
5777READELF=$ac_cv_prog_READELF
5778if test -n "$READELF"; then
5779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5780$as_echo "$READELF" >&6; }
5781else
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783$as_echo "no" >&6; }
5784fi
5785
5786
5787 test -n "$READELF" && break
5788 done
5789fi
5790if test -z "$READELF"; then
5791 ac_ct_READELF=$READELF
5792 for ac_prog in readelf
5793do
5794 # Extract the first word of "$ac_prog", so it can be a program name with args.
5795set dummy $ac_prog; ac_word=$2
5796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5797$as_echo_n "checking for $ac_word... " >&6; }
5798if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5799 $as_echo_n "(cached) " >&6
5800else
5801 if test -n "$ac_ct_READELF"; then
5802 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5803else
5804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5805for as_dir in $PATH
5806do
5807 IFS=$as_save_IFS
5808 test -z "$as_dir" && as_dir=.
5809 for ac_exec_ext in '' $ac_executable_extensions; do
5810 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5811 ac_cv_prog_ac_ct_READELF="$ac_prog"
5812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5813 break 2
5814 fi
5815done
5816 done
5817IFS=$as_save_IFS
5818
5819fi
5820fi
5821ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5822if test -n "$ac_ct_READELF"; then
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5824$as_echo "$ac_ct_READELF" >&6; }
5825else
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5827$as_echo "no" >&6; }
5828fi
5829
5830
5831 test -n "$ac_ct_READELF" && break
5832done
5833
5834 if test "x$ac_ct_READELF" = x; then
5835 READELF=":"
5836 else
5837 case $cross_compiling:$ac_tool_warned in
5838yes:)
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5841ac_tool_warned=yes ;;
5842esac
5843 READELF=$ac_ct_READELF
5844 fi
5845fi
5846
5847if test "$cross_compiling" = yes; then
5848 case "$READELF" in
5849 readelf|:)
5850 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5851 ;;
5852 esac
5853fi
5854
5855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005857DISABLE_ASDLGEN=""
5858# Extract the first word of "python", so it can be a program name with args.
5859set dummy python; ac_word=$2
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005862if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005863 $as_echo_n "(cached) " >&6
5864else
5865 if test -n "$HAS_PYTHON"; then
5866 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5867else
5868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5869for as_dir in $PATH
5870do
5871 IFS=$as_save_IFS
5872 test -z "$as_dir" && as_dir=.
5873 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005874 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 -05005875 ac_cv_prog_HAS_PYTHON="found"
5876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5877 break 2
5878 fi
5879done
5880 done
5881IFS=$as_save_IFS
5882
5883 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5884fi
5885fi
5886HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5887if test -n "$HAS_PYTHON"; then
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5889$as_echo "$HAS_PYTHON" >&6; }
5890else
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5892$as_echo "no" >&6; }
5893fi
5894
5895
5896if test $HAS_HG != found -o $HAS_PYTHON != found
5897then
5898 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5899fi
5900
5901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902case $MACHDEP in
5903bsdos*|hp*|HP*)
5904 # install -d does not work on BSDI or HP-UX
5905 if test -z "$INSTALL"
5906 then
5907 INSTALL="${srcdir}/install-sh -c"
5908 fi
5909esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910# Find a good install program. We prefer a C program (faster),
5911# so one script is as good as another. But avoid the broken or
5912# incompatible versions:
5913# SysV /etc/install, /usr/sbin/install
5914# SunOS /usr/etc/install
5915# IRIX /sbin/install
5916# AIX /bin/install
5917# AmigaOS /C/install, which installs bootblocks on floppy discs
5918# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5919# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5920# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5921# OS/2's system install, which has a completely different semantic
5922# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005923# Reject install programs that cannot install multiple files.
5924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5925$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005927if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005928 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929else
5930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931for as_dir in $PATH
5932do
5933 IFS=$as_save_IFS
5934 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 # Account for people who put trailing slashes in PATH elements.
5936case $as_dir/ in #((
5937 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005939 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 /usr/ucb/* ) ;;
5941 *)
5942 # OSF1 and SCO ODT 3.0 have their own names for install.
5943 # Don't use installbsd from OSF since it installs stuff as root
5944 # by default.
5945 for ac_prog in ginstall scoinst install; do
5946 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005947 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 +00005948 if test $ac_prog = install &&
5949 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5950 # AIX install. It has an incompatible calling convention.
5951 :
5952 elif test $ac_prog = install &&
5953 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5954 # program-specific install script used by HP pwplus--don't use.
5955 :
5956 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 rm -rf conftest.one conftest.two conftest.dir
5958 echo one > conftest.one
5959 echo two > conftest.two
5960 mkdir conftest.dir
5961 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5962 test -s conftest.one && test -s conftest.two &&
5963 test -s conftest.dir/conftest.one &&
5964 test -s conftest.dir/conftest.two
5965 then
5966 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5967 break 3
5968 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 fi
5970 fi
5971 done
5972 done
5973 ;;
5974esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005975
5976 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977IFS=$as_save_IFS
5978
Matthias Kloseb9621712010-04-24 17:59:49 +00005979rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980
5981fi
5982 if test "${ac_cv_path_install+set}" = set; then
5983 INSTALL=$ac_cv_path_install
5984 else
5985 # As a last resort, use the slow shell script. Don't cache a
5986 # value for INSTALL within a source directory, because that will
5987 # break other packages using the cache if that directory is
5988 # removed, or if the value is a relative name.
5989 INSTALL=$ac_install_sh
5990 fi
5991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5993$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994
5995# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5996# It thinks the first close brace ends the variable substitution.
5997test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5998
5999test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6000
6001test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6002
Matthias Klose93a0ef12012-03-15 18:08:34 +01006003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6004$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6005if test -z "$MKDIR_P"; then
6006 if ${ac_cv_path_mkdir+:} false; then :
6007 $as_echo_n "(cached) " >&6
6008else
6009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6010for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6011do
6012 IFS=$as_save_IFS
6013 test -z "$as_dir" && as_dir=.
6014 for ac_prog in mkdir gmkdir; do
6015 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006016 { 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 +01006017 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6018 'mkdir (GNU coreutils) '* | \
6019 'mkdir (coreutils) '* | \
6020 'mkdir (fileutils) '4.1*)
6021 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6022 break 3;;
6023 esac
6024 done
6025 done
6026 done
6027IFS=$as_save_IFS
6028
6029fi
6030
6031 test -d ./--version && rmdir ./--version
6032 if test "${ac_cv_path_mkdir+set}" = set; then
6033 MKDIR_P="$ac_cv_path_mkdir -p"
6034 else
6035 # As a last resort, use the slow shell script. Don't cache a
6036 # value for MKDIR_P within a source directory, because that will
6037 # break other packages using the cache if that directory is
6038 # removed, or if the value is a relative name.
6039 MKDIR_P="$ac_install_sh -d"
6040 fi
6041fi
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6043$as_echo "$MKDIR_P" >&6; }
6044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045
6046# Not every filesystem supports hard links
6047
6048if test -z "$LN" ; then
6049 case $ac_sys_system in
6050 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051 *) LN=ln;;
6052 esac
6053fi
6054
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006055# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006056
6057ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006058
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6061$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062
6063# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006064if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006065 withval=$with_pydebug;
6066if test "$withval" != no
6067then
6068
Matthias Kloseb9621712010-04-24 17:59:49 +00006069$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6072$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006074 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006075else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077fi
6078else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081fi
6082
6083
6084# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6085# merged with this chunk of code?
6086
6087# Optimizer/debugger flags
6088# ------------------------
6089# (The following bit of code is complicated enough - please keep things
6090# indented properly. Just pretend you're editing Python code. ;-)
6091
6092# There are two parallel sets of case statements below, one that checks to
6093# see if OPT was set and one that does BASECFLAGS setting based upon
6094# compiler and platform. BASECFLAGS tweaks need to be made even if the
6095# user set OPT.
6096
6097# tweak OPT based on compiler and platform, only if the user didn't set
6098# it on the command line
6099
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006100if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101then
6102 case $GCC in
6103 yes)
6104 if test "$CC" != 'g++' ; then
6105 STRICT_PROTO="-Wstrict-prototypes"
6106 fi
6107 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6108 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6109 WRAP="-fwrapv"
6110 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006111
6112 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006113 case $CC in
6114 *clang*) WRAP="-fwrapv"
6115 ;;
6116 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006117
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118 case $ac_cv_prog_cc_g in
6119 yes)
6120 if test "$Py_DEBUG" = 'true' ; then
6121 # Optimization messes up debuggers, so turn it off for
6122 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006123 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124 else
6125 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6126 fi
6127 ;;
6128 *)
6129 OPT="-O3 -Wall $STRICT_PROTO"
6130 ;;
6131 esac
6132 case $ac_sys_system in
6133 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6134 ;;
6135 esac
6136 ;;
6137
6138 *)
6139 OPT="-O"
6140 ;;
6141 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142fi
6143
6144
6145
6146# The -arch flags for universal builds on OSX
6147UNIVERSAL_ARCH_FLAGS=
6148
6149
6150# tweak BASECFLAGS based on compiler and platform
6151case $GCC in
6152yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006153 # Python doesn't violate C99 aliasing rules, but older versions of
6154 # GCC produce warnings for legal Python code. Enable
6155 # -fno-strict-aliasing on versions of GCC that support but produce
6156 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6158$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 ac_save_cc="$CC"
6160 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006161 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006162 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006164else
Matthias Kloseb9621712010-04-24 17:59:49 +00006165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006167
Matthias Kloseb159a552010-04-25 21:00:44 +00006168
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006169int
6170main ()
6171{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006172
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006173 ;
6174 return 0;
6175}
Matthias Kloseb159a552010-04-25 21:00:44 +00006176
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006178if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006179
6180 CC="$ac_save_cc -fstrict-aliasing"
6181 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006183/* end confdefs.h. */
6184
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006185 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006186int
6187main ()
6188{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006189double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006190 ;
6191 return 0;
6192}
Matthias Kloseb159a552010-04-25 21:00:44 +00006193
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006195if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006196
6197 ac_cv_no_strict_aliasing=no
6198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199else
Matthias Kloseb159a552010-04-25 21:00:44 +00006200
6201 ac_cv_no_strict_aliasing=yes
6202
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006203fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006205
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006206else
Matthias Kloseb159a552010-04-25 21:00:44 +00006207
6208 ac_cv_no_strict_aliasing=no
6209
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006212fi
6213
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006214 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6217$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006218 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 then
6220 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6221 fi
6222
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6224$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6225 ac_save_cc="$CC"
6226 CC="$CC -Wunused-result -Werror"
6227 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006228 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006229 $as_echo_n "(cached) " >&6
6230else
6231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6232/* end confdefs.h. */
6233
6234
6235int
6236main ()
6237{
6238
6239 ;
6240 return 0;
6241}
6242
6243_ACEOF
6244if ac_fn_c_try_compile "$LINENO"; then :
6245
6246 ac_cv_disable_unused_result_warning=yes
6247
6248else
6249
6250 ac_cv_disable_unused_result_warning=no
6251
6252fi
6253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6254fi
6255
6256 CFLAGS="$save_CFLAGS"
6257 CC="$ac_save_cc"
6258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6259$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6260
6261 if test $ac_cv_disable_unused_result_warning = yes
6262 then
6263 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6264 fi
6265
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6267 # support. Without this, treatment of subnormals doesn't follow
6268 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006269 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270 alpha*)
6271 BASECFLAGS="$BASECFLAGS -mieee"
6272 ;;
6273 esac
6274
6275 case $ac_sys_system in
6276 SCO_SV*)
6277 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6278 ;;
6279 # is there any other compiler on Darwin besides gcc?
6280 Darwin*)
6281 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6282 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006283 if test "${CC}" = gcc
6284 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6286$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006287 case "${UNIVERSALSDK}" in
6288 */MacOSX10.4u.sdk)
6289 # Build using 10.4 SDK, force usage of gcc when the
6290 # compiler is gcc, otherwise the user will get very
6291 # confusing error messages when building on OSX 10.6
6292 CC=gcc-4.0
6293 CPP=cpp-4.0
6294 ;;
6295 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6297$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006298 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299
6300
6301 if test "${enable_universalsdk}"; then
6302 UNIVERSAL_ARCH_FLAGS=""
6303 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6304 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6305 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006306 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6308 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006309 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006310 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311
6312 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6313 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006314 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006315 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006317 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6318 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006319 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006320 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006321
6322 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6323 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006324 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006325 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006326
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006328 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 +00006329
6330 fi
6331
6332
Ronald Oussoren666028b2010-04-18 19:07:43 +00006333 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6334 if test "${UNIVERSALSDK}" != "/"
6335 then
6336 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6337 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006338 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 fi
6340 fi
6341
6342 # Calculate the right deployment target for this build.
6343 #
6344 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006345 if test ${cur_target} '>' 10.2 && \
6346 test ${cur_target} '<' 10.6
6347 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006349 if test ${enable_universalsdk}; then
6350 if test "${UNIVERSAL_ARCHS}" = "all"; then
6351 # Ensure that the default platform for a
6352 # 4-way universal build is OSX 10.5,
6353 # that's the first OS release where
6354 # 4-way builds make sense.
6355 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006356
6357 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6358 cur_target='10.5'
6359
6360 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6361 cur_target='10.5'
6362
6363 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6364 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006365 fi
6366 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006367 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006368 # On Intel macs default to a deployment
6369 # target of 10.4, that's the first OSX
6370 # release with Intel support.
6371 cur_target="10.4"
6372 fi
6373 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374 fi
6375 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6376
6377 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6378 # environment with a value that is the same as what we'll use
6379 # in the Makefile to ensure that we'll get the same compiler
6380 # environment during configure and build time.
6381 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6382 export MACOSX_DEPLOYMENT_TARGET
6383 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6384
6385 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006386 esac
6387 ;;
6388
6389*)
6390 case $ac_sys_system in
6391 OpenUNIX*|UnixWare*)
6392 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6393 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006394 SCO_SV*)
6395 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6396 ;;
6397 esac
6398 ;;
6399esac
6400
6401if test "$Py_DEBUG" = 'true'; then
6402 :
6403else
6404 OPT="-DNDEBUG $OPT"
6405fi
6406
6407if test "$ac_arch_flags"
6408then
6409 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6410fi
6411
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412# Check whether GCC supports PyArg_ParseTuple format
6413if test "$GCC" = "yes"
6414then
Matthias Kloseb9621712010-04-24 17:59:49 +00006415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6416$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417 save_CFLAGS=$CFLAGS
6418 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420/* end confdefs.h. */
6421
6422 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423int
6424main ()
6425{
6426
6427 ;
6428 return 0;
6429}
Matthias Kloseb159a552010-04-25 21:00:44 +00006430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006432if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433
Matthias Kloseb159a552010-04-25 21:00:44 +00006434
Matthias Kloseb9621712010-04-24 17:59:49 +00006435$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436
Matthias Kloseb159a552010-04-25 21:00:44 +00006437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006438$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006439
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440else
Matthias Kloseb159a552010-04-25 21:00:44 +00006441
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006443$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6447 CFLAGS=$save_CFLAGS
6448fi
6449
6450# On some compilers, pthreads are available without further options
6451# (e.g. MacOS X). On some of these systems, the compiler will not
6452# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6453# So we have to see first whether pthreads are available without
6454# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6456$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006457if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006458 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459else
Matthias Kloseb9621712010-04-24 17:59:49 +00006460 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461 ac_cv_pthread_is_default=no
6462else
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464/* end confdefs.h. */
6465
6466#include <pthread.h>
6467
6468void* routine(void* p){return NULL;}
6469
6470int main(){
6471 pthread_t p;
6472 if(pthread_create(&p,NULL,routine,NULL)!=0)
6473 return 1;
6474 (void)pthread_detach(p);
6475 return 0;
6476}
6477
6478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006479if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006480
6481 ac_cv_pthread_is_default=yes
6482 ac_cv_kthread=no
6483 ac_cv_pthread=no
6484
6485else
Matthias Kloseb9621712010-04-24 17:59:49 +00006486 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490fi
6491
6492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493fi
6494
Matthias Kloseb9621712010-04-24 17:59:49 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6496$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497
6498
6499if test $ac_cv_pthread_is_default = yes
6500then
6501 ac_cv_kpthread=no
6502else
6503# -Kpthread, if available, provides the right #defines
6504# and linker options to make pthread_create available
6505# Some compilers won't report that they do not support -Kpthread,
6506# so we need to run a program to see whether it really made the
6507# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6509$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006510if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006511 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512else
6513 ac_save_cc="$CC"
6514CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006515if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516 ac_cv_kpthread=no
6517else
Matthias Kloseb9621712010-04-24 17:59:49 +00006518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519/* end confdefs.h. */
6520
6521#include <pthread.h>
6522
6523void* routine(void* p){return NULL;}
6524
6525int main(){
6526 pthread_t p;
6527 if(pthread_create(&p,NULL,routine,NULL)!=0)
6528 return 1;
6529 (void)pthread_detach(p);
6530 return 0;
6531}
6532
6533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006534if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535 ac_cv_kpthread=yes
6536else
Matthias Kloseb9621712010-04-24 17:59:49 +00006537 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6540 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541fi
6542
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543CC="$ac_save_cc"
6544fi
6545
Matthias Kloseb9621712010-04-24 17:59:49 +00006546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6547$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006548fi
6549
6550if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6551then
6552# -Kthread, if available, provides the right #defines
6553# and linker options to make pthread_create available
6554# Some compilers won't report that they do not support -Kthread,
6555# so we need to run a program to see whether it really made the
6556# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6558$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006559if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561else
6562 ac_save_cc="$CC"
6563CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006564if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565 ac_cv_kthread=no
6566else
Matthias Kloseb9621712010-04-24 17:59:49 +00006567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568/* end confdefs.h. */
6569
6570#include <pthread.h>
6571
6572void* routine(void* p){return NULL;}
6573
6574int main(){
6575 pthread_t p;
6576 if(pthread_create(&p,NULL,routine,NULL)!=0)
6577 return 1;
6578 (void)pthread_detach(p);
6579 return 0;
6580}
6581
6582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006583if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006584 ac_cv_kthread=yes
6585else
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590fi
6591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006592CC="$ac_save_cc"
6593fi
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6596$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006597fi
6598
6599if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6600then
6601# -pthread, if available, provides the right #defines
6602# and linker options to make pthread_create available
6603# Some compilers won't report that they do not support -pthread,
6604# so we need to run a program to see whether it really made the
6605# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6607$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006608if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006609 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006610else
6611 ac_save_cc="$CC"
6612CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006613if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006614 ac_cv_pthread=no
6615else
Matthias Kloseb9621712010-04-24 17:59:49 +00006616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617/* end confdefs.h. */
6618
6619#include <pthread.h>
6620
6621void* routine(void* p){return NULL;}
6622
6623int main(){
6624 pthread_t p;
6625 if(pthread_create(&p,NULL,routine,NULL)!=0)
6626 return 1;
6627 (void)pthread_detach(p);
6628 return 0;
6629}
6630
6631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006632if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633 ac_cv_pthread=yes
6634else
Matthias Kloseb9621712010-04-24 17:59:49 +00006635 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006639fi
6640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641CC="$ac_save_cc"
6642fi
6643
Matthias Kloseb9621712010-04-24 17:59:49 +00006644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6645$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646fi
6647
6648# If we have set a CC compiler flag for thread support then
6649# check if it works for CXX, too.
6650ac_cv_cxx_thread=no
6651if test ! -z "$CXX"
6652then
Matthias Kloseb9621712010-04-24 17:59:49 +00006653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6654$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655ac_save_cxx="$CXX"
6656
6657if test "$ac_cv_kpthread" = "yes"
6658then
6659 CXX="$CXX -Kpthread"
6660 ac_cv_cxx_thread=yes
6661elif test "$ac_cv_kthread" = "yes"
6662then
6663 CXX="$CXX -Kthread"
6664 ac_cv_cxx_thread=yes
6665elif test "$ac_cv_pthread" = "yes"
6666then
6667 CXX="$CXX -pthread"
6668 ac_cv_cxx_thread=yes
6669fi
6670
6671if test $ac_cv_cxx_thread = yes
6672then
6673 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6674 $CXX -c conftest.$ac_ext 2>&5
6675 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6676 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6677 then
6678 ac_cv_cxx_thread=yes
6679 else
6680 ac_cv_cxx_thread=no
6681 fi
6682 rm -fr conftest*
6683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6685$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686fi
6687CXX="$ac_save_cxx"
6688
6689
6690# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6692$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006693if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006694 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697/* end confdefs.h. */
6698#include <stdlib.h>
6699#include <stdarg.h>
6700#include <string.h>
6701#include <float.h>
6702
6703int
6704main ()
6705{
6706
6707 ;
6708 return 0;
6709}
6710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006711if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006712 ac_cv_header_stdc=yes
6713else
Matthias Kloseb9621712010-04-24 17:59:49 +00006714 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6717
6718if test $ac_cv_header_stdc = yes; then
6719 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721/* end confdefs.h. */
6722#include <string.h>
6723
6724_ACEOF
6725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 $EGREP "memchr" >/dev/null 2>&1; then :
6727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728else
6729 ac_cv_header_stdc=no
6730fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006731rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732
6733fi
6734
6735if test $ac_cv_header_stdc = yes; then
6736 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738/* end confdefs.h. */
6739#include <stdlib.h>
6740
6741_ACEOF
6742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 $EGREP "free" >/dev/null 2>&1; then :
6744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745else
6746 ac_cv_header_stdc=no
6747fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006748rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749
6750fi
6751
6752if test $ac_cv_header_stdc = yes; then
6753 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006754 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755 :
6756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758/* end confdefs.h. */
6759#include <ctype.h>
6760#include <stdlib.h>
6761#if ((' ' & 0x0FF) == 0x020)
6762# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6763# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6764#else
6765# define ISLOWER(c) \
6766 (('a' <= (c) && (c) <= 'i') \
6767 || ('j' <= (c) && (c) <= 'r') \
6768 || ('s' <= (c) && (c) <= 'z'))
6769# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6770#endif
6771
6772#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6773int
6774main ()
6775{
6776 int i;
6777 for (i = 0; i < 256; i++)
6778 if (XOR (islower (i), ISLOWER (i))
6779 || toupper (i) != TOUPPER (i))
6780 return 2;
6781 return 0;
6782}
6783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006784if ac_fn_c_try_run "$LINENO"; then :
6785
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786else
Matthias Kloseb9621712010-04-24 17:59:49 +00006787 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6790 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791fi
6792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793fi
6794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6796$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797if test $ac_cv_header_stdc = yes; then
6798
Matthias Kloseb9621712010-04-24 17:59:49 +00006799$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800
6801fi
6802
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006803for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006804fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006805ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006806sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006807unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006808poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006809sys/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 +01006810sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006811sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006812sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006813sys/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 -07006814libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006815bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006816do :
6817 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6818ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006819if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006820 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006821#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006822_ACEOF
6823
6824fi
6825
Guido van Rossum627b2d71993-12-24 10:39:16 +00006826done
6827
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006828ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006829for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6832$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006833if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006837/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838#include <sys/types.h>
6839#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006840
Martin v. Löwis11437992002-04-12 09:54:03 +00006841int
6842main ()
6843{
6844if ((DIR *) 0)
6845return 0;
6846 ;
6847 return 0;
6848}
6849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006851 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006852else
Matthias Kloseb9621712010-04-24 17:59:49 +00006853 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006857eval ac_res=\$$as_ac_Header
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6859$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006860if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006861 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006862#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006863_ACEOF
6864
6865ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006866fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006867
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006868done
6869# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6870if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6872$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006873if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006875else
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006880/* Override any GCC internal prototype to avoid an error.
6881 Use char because int might match the return type of a GCC
6882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006883#ifdef __cplusplus
6884extern "C"
6885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006886char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006887int
6888main ()
6889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006890return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006891 ;
6892 return 0;
6893}
6894_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895for ac_lib in '' dir; do
6896 if test -z "$ac_lib"; then
6897 ac_res="none required"
6898 else
6899 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006900 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006901 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006903 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006905rm -f core conftest.err conftest.$ac_objext \
6906 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006907 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006908 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910done
Victor Stinnere0be4232011-10-25 13:06:09 +02006911if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006913else
6914 ac_cv_search_opendir=no
6915fi
6916rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006917LIBS=$ac_func_search_save_LIBS
6918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6920$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006921ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006922if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006925fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006926
Michael W. Hudson54241132001-12-07 15:38:26 +00006927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6929$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006930if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006932else
6933 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006937/* Override any GCC internal prototype to avoid an error.
6938 Use char because int might match the return type of a GCC
6939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006940#ifdef __cplusplus
6941extern "C"
6942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006943char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006944int
6945main ()
6946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006947return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 ;
6949 return 0;
6950}
6951_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952for ac_lib in '' x; do
6953 if test -z "$ac_lib"; then
6954 ac_res="none required"
6955 else
6956 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006957 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006958 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006960 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006962rm -f core conftest.err conftest.$ac_objext \
6963 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006964 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006967done
Victor Stinnere0be4232011-10-25 13:06:09 +02006968if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006970else
6971 ac_cv_search_opendir=no
6972fi
6973rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006974LIBS=$ac_func_search_save_LIBS
6975fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6977$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006979if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982fi
6983
6984fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006985
Matthias Kloseb9621712010-04-24 17:59:49 +00006986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6987$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006988if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006989 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006990else
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006992/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006993#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006994int
6995main ()
6996{
6997return makedev(0, 0);
6998 ;
6999 return 0;
7000}
7001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007003 ac_cv_header_sys_types_h_makedev=yes
7004else
Matthias Kloseb9621712010-04-24 17:59:49 +00007005 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007rm -f core conftest.err conftest.$ac_objext \
7008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007009
7010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7012$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007013
7014if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007015ac_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 +02007016if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007017
Matthias Kloseb9621712010-04-24 17:59:49 +00007018$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007019
7020fi
7021
7022
7023
7024 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 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 +02007026if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007027
Matthias Kloseb9621712010-04-24 17:59:49 +00007028$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007029
7030fi
7031
7032
7033 fi
7034fi
7035
Michael W. Hudson54241132001-12-07 15:38:26 +00007036
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007037# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7038for ac_header in net/if.h
7039do :
7040 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7041#ifdef STDC_HEADERS
7042# include <stdlib.h>
7043# include <stddef.h>
7044#else
7045# ifdef HAVE_STDLIB_H
7046# include <stdlib.h>
7047# endif
7048#endif
7049#ifdef HAVE_SYS_SOCKET_H
7050# include <sys/socket.h>
7051#endif
7052
7053"
Victor Stinnere0be4232011-10-25 13:06:09 +02007054if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007055 cat >>confdefs.h <<_ACEOF
7056#define HAVE_NET_IF_H 1
7057_ACEOF
7058
7059fi
7060
7061done
7062
7063
7064
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007065# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007066for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007067do :
7068 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007069#ifdef HAVE_CURSES_H
7070#include <curses.h>
7071#endif
7072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073"
Victor Stinnere0be4232011-10-25 13:06:09 +02007074if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007075 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007076#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007077_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007078
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007079fi
7080
7081done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007082
7083
Martin v. Löwis11017b12006-01-14 18:12:57 +00007084# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007085for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007086do :
7087 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 +00007088#ifdef HAVE_ASM_TYPES_H
7089#include <asm/types.h>
7090#endif
7091#ifdef HAVE_SYS_SOCKET_H
7092#include <sys/socket.h>
7093#endif
7094
Matthias Kloseb9621712010-04-24 17:59:49 +00007095"
Victor Stinnere0be4232011-10-25 13:06:09 +02007096if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007098#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007099_ACEOF
7100
7101fi
7102
7103done
7104
7105
Charles-François Natali47413c12011-10-06 19:47:44 +02007106# On Linux, can.h and can/raw.h require sys/socket.h
7107for ac_header in linux/can.h linux/can/raw.h
7108do :
7109 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7110ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7111#ifdef HAVE_SYS_SOCKET_H
7112#include <sys/socket.h>
7113#endif
7114
7115"
7116if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7117 cat >>confdefs.h <<_ACEOF
7118#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7119_ACEOF
7120
7121fi
7122
7123done
7124
7125
Guido van Rossum627b2d71993-12-24 10:39:16 +00007126# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007127was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7129$as_echo_n "checking for clock_t in time.h... " >&6; }
7130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007131/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007132#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007133
7134_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007137 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007138else
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
7140
Matthias Kloseb9621712010-04-24 17:59:49 +00007141$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007142
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007143
Guido van Rossum627b2d71993-12-24 10:39:16 +00007144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007145rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007146
Matthias Kloseb9621712010-04-24 17:59:49 +00007147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7148$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7151$as_echo_n "checking for makedev... " >&6; }
7152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007153/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007154
Jesus Cea740f53a2010-04-28 11:35:30 +00007155#if defined(MAJOR_IN_MKDEV)
7156#include <sys/mkdev.h>
7157#elif defined(MAJOR_IN_SYSMACROS)
7158#include <sys/sysmacros.h>
7159#else
7160#include <sys/types.h>
7161#endif
7162
Neal Norwitz11690112002-07-30 01:08:28 +00007163int
7164main ()
7165{
Jesus Cea740f53a2010-04-28 11:35:30 +00007166
7167 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007168 ;
7169 return 0;
7170}
Matthias Kloseb159a552010-04-25 21:00:44 +00007171
Neal Norwitz11690112002-07-30 01:08:28 +00007172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007173if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007174 ac_cv_has_makedev=yes
7175else
Matthias Kloseb9621712010-04-24 17:59:49 +00007176 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007178rm -f core conftest.err conftest.$ac_objext \
7179 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7181$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007182if test "$ac_cv_has_makedev" = "yes"; then
7183
Matthias Kloseb9621712010-04-24 17:59:49 +00007184$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007185
7186fi
7187
Martin v. Löwis399a6892002-10-04 10:22:02 +00007188# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7189# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7190# defined, but the compiler does not support pragma redefine_extname,
7191# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7192# structures (such as rlimit64) without declaring them. As a
7193# work-around, disable LFS on such configurations
7194
7195use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7197$as_echo_n "checking Solaris LFS bug... " >&6; }
7198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007199/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007200
7201#define _LARGEFILE_SOURCE 1
7202#define _FILE_OFFSET_BITS 64
7203#include <sys/resource.h>
7204
Martin v. Löwis399a6892002-10-04 10:22:02 +00007205int
7206main ()
7207{
7208struct rlimit foo;
7209 ;
7210 return 0;
7211}
7212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007213if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007214 sol_lfs_bug=no
7215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7220$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007221if test "$sol_lfs_bug" = "yes"; then
7222 use_lfs=no
7223fi
7224
7225if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007226# Two defines needed to enable largefile support on various platforms
7227# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007228case $ac_sys_system/$ac_sys_release in
7229AIX*)
7230
7231$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7232
7233 ;;
7234esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007235
Matthias Kloseb9621712010-04-24 17:59:49 +00007236$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007237
7238
Matthias Kloseb9621712010-04-24 17:59:49 +00007239$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007240
Martin v. Löwis399a6892002-10-04 10:22:02 +00007241fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007242
Guido van Rossum84e7b241996-08-19 21:59:00 +00007243# Add some code to confdefs.h so that the test for off_t works on SCO
7244cat >> confdefs.h <<\EOF
7245#if defined(SCO_DS)
7246#undef _OFF_T
7247#endif
7248EOF
7249
Guido van Rossumef2255b2000-03-10 22:30:29 +00007250# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007251ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007252if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007253
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007254else
Martin v. Löwis11437992002-04-12 09:54:03 +00007255
7256cat >>confdefs.h <<_ACEOF
7257#define mode_t int
7258_ACEOF
7259
7260fi
7261
Matthias Kloseb9621712010-04-24 17:59:49 +00007262ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007263if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007264
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007265else
Martin v. Löwis11437992002-04-12 09:54:03 +00007266
7267cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007268#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007269_ACEOF
7270
7271fi
7272
Matthias Kloseb9621712010-04-24 17:59:49 +00007273ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007274if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007275
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007276else
Martin v. Löwis11437992002-04-12 09:54:03 +00007277
7278cat >>confdefs.h <<_ACEOF
7279#define pid_t int
7280_ACEOF
7281
7282fi
7283
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007284
Martin v. Löwis11437992002-04-12 09:54:03 +00007285cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007286#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007287_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007288
Matthias Kloseb9621712010-04-24 17:59:49 +00007289ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007290if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007291
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007292else
Martin v. Löwis11437992002-04-12 09:54:03 +00007293
7294cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007295#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007296_ACEOF
7297
7298fi
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7301$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007302if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007303 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007304else
Matthias Kloseb9621712010-04-24 17:59:49 +00007305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007306/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007307#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007308
7309_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007312 ac_cv_type_uid_t=yes
7313else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007314 ac_cv_type_uid_t=no
7315fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007316rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007318fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7320$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007321if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007322
Matthias Kloseb9621712010-04-24 17:59:49 +00007323$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007324
7325
Matthias Kloseb9621712010-04-24 17:59:49 +00007326$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007327
7328fi
7329
Matthias Kloseb9621712010-04-24 17:59:49 +00007330ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7331case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007332 no|yes) ;; #(
7333 *)
7334
Matthias Kloseb9621712010-04-24 17:59:49 +00007335$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007336
7337
7338cat >>confdefs.h <<_ACEOF
7339#define uint32_t $ac_cv_c_uint32_t
7340_ACEOF
7341;;
7342 esac
7343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7345case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007346 no|yes) ;; #(
7347 *)
7348
Matthias Kloseb9621712010-04-24 17:59:49 +00007349$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007350
7351
7352cat >>confdefs.h <<_ACEOF
7353#define uint64_t $ac_cv_c_uint64_t
7354_ACEOF
7355;;
7356 esac
7357
Matthias Kloseb9621712010-04-24 17:59:49 +00007358ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7359case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007360 no|yes) ;; #(
7361 *)
7362
7363cat >>confdefs.h <<_ACEOF
7364#define int32_t $ac_cv_c_int32_t
7365_ACEOF
7366;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007367esac
7368
Matthias Kloseb9621712010-04-24 17:59:49 +00007369ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7370case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007371 no|yes) ;; #(
7372 *)
7373
7374cat >>confdefs.h <<_ACEOF
7375#define int64_t $ac_cv_c_int64_t
7376_ACEOF
7377;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007378esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007379
Matthias Kloseb9621712010-04-24 17:59:49 +00007380ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007381if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007384
7385fi
7386
Stefan Krah1919b7e2012-03-21 18:25:23 +01007387ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7388if test "x$ac_cv_type___uint128_t" = xyes; then :
7389
7390$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7391
7392fi
7393
Jack Jansendd19cf82001-12-06 22:36:17 +00007394
Michael W. Hudson54241132001-12-07 15:38:26 +00007395# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007396# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007397# The cast to long int works around a bug in the HP C Compiler
7398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7400# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7402$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007403if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007405else
Matthias Kloseb9621712010-04-24 17:59:49 +00007406 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 +00007407
Martin v. Löwis11437992002-04-12 09:54:03 +00007408else
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 if test "$ac_cv_type_int" = yes; then
7410 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7411$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007412as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007413See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007414 else
7415 ac_cv_sizeof_int=0
7416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7421$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007422
7423
7424
Martin v. Löwis11437992002-04-12 09:54:03 +00007425cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007426#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007427_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007428
7429
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007430# The cast to long int works around a bug in the HP C Compiler
7431# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7432# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7433# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7435$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007436if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007438else
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 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 +00007440
Martin v. Löwis11437992002-04-12 09:54:03 +00007441else
Matthias Kloseb9621712010-04-24 17:59:49 +00007442 if test "$ac_cv_type_long" = yes; then
7443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007445as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007446See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007447 else
7448 ac_cv_sizeof_long=0
7449 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007450fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007451
Martin v. Löwis11437992002-04-12 09:54:03 +00007452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7454$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007455
7456
7457
Martin v. Löwis11437992002-04-12 09:54:03 +00007458cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007459#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007460_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007461
7462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007463# The cast to long int works around a bug in the HP C Compiler
7464# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7465# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7466# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7468$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007469if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007470 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 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 +00007473
Martin v. Löwis11437992002-04-12 09:54:03 +00007474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 if test "$ac_cv_type_void_p" = yes; then
7476 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007478as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007479See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007480 else
7481 ac_cv_sizeof_void_p=0
7482 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484
Martin v. Löwis11437992002-04-12 09:54:03 +00007485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7487$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007488
7489
7490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007492#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007493_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007494
7495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007496# The cast to long int works around a bug in the HP C Compiler
7497# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7498# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7499# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7501$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007502if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 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 +00007506
Martin v. Löwis11437992002-04-12 09:54:03 +00007507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 if test "$ac_cv_type_short" = yes; then
7509 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007511as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007512See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007513 else
7514 ac_cv_sizeof_short=0
7515 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007517
Martin v. Löwis11437992002-04-12 09:54:03 +00007518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7520$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007521
7522
7523
Martin v. Löwis11437992002-04-12 09:54:03 +00007524cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007525#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007526_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007527
7528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007529# The cast to long int works around a bug in the HP C Compiler
7530# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7531# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7532# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7534$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007535if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007537else
Matthias Kloseb9621712010-04-24 17:59:49 +00007538 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 +00007539
Martin v. Löwis11437992002-04-12 09:54:03 +00007540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 if test "$ac_cv_type_float" = yes; then
7542 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007544as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007545See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007546 else
7547 ac_cv_sizeof_float=0
7548 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7553$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554
7555
7556
Martin v. Löwis11437992002-04-12 09:54:03 +00007557cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007558#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007559_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007560
7561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562# The cast to long int works around a bug in the HP C Compiler
7563# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7564# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7565# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7567$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007568if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007569 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007570else
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 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 +00007572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 if test "$ac_cv_type_double" = yes; then
7575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007577as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007578See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579 else
7580 ac_cv_sizeof_double=0
7581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7586$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587
7588
7589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007591#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007592_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007593
7594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595# The cast to long int works around a bug in the HP C Compiler
7596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7598# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7600$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007601if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 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 +00007605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 if test "$ac_cv_type_fpos_t" = yes; then
7608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007610as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007611See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 else
7613 ac_cv_sizeof_fpos_t=0
7614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007616
Martin v. Löwis11437992002-04-12 09:54:03 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7619$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620
7621
7622
Martin v. Löwis11437992002-04-12 09:54:03 +00007623cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007624#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007625_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007626
Michael W. Hudson54241132001-12-07 15:38:26 +00007627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628# The cast to long int works around a bug in the HP C Compiler
7629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7633$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007634if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 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 +00007638
Martin v. Löwis18e16552006-02-15 17:27:45 +00007639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 if test "$ac_cv_type_size_t" = yes; then
7641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007643as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007644See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 else
7646 ac_cv_sizeof_size_t=0
7647 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649
Martin v. Löwis18e16552006-02-15 17:27:45 +00007650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7652$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653
7654
7655
Martin v. Löwis18e16552006-02-15 17:27:45 +00007656cat >>confdefs.h <<_ACEOF
7657#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7658_ACEOF
7659
7660
Christian Heimes400adb02008-02-01 08:12:03 +00007661# The cast to long int works around a bug in the HP C Compiler
7662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7664# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7666$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007667if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 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 +00007671
Christian Heimes400adb02008-02-01 08:12:03 +00007672else
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 if test "$ac_cv_type_pid_t" = yes; then
7674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007676as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007677See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007678 else
7679 ac_cv_sizeof_pid_t=0
7680 fi
7681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682
Christian Heimes400adb02008-02-01 08:12:03 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7685$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007686
7687
7688
7689cat >>confdefs.h <<_ACEOF
7690#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7691_ACEOF
7692
7693
Michael W. Hudson54241132001-12-07 15:38:26 +00007694
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7696$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007697have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007699/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701int
7702main ()
7703{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007704long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 ;
7706 return 0;
7707}
7708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007709if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007710
7711
Matthias Kloseb9621712010-04-24 17:59:49 +00007712$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007713
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007714 have_long_long=yes
7715
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7719$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007720if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721# The cast to long int works around a bug in the HP C Compiler
7722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7724# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7726$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007727if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007729else
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 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 +00007731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732else
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 if test "$ac_cv_type_long_long" = yes; then
7734 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007736as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007737See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007738 else
7739 ac_cv_sizeof_long_long=0
7740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7745$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746
7747
7748
Martin v. Löwis11437992002-04-12 09:54:03 +00007749cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007750#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007751_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007752
Michael W. Hudson54241132001-12-07 15:38:26 +00007753
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007754fi
7755
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7757$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007758have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007760/* end confdefs.h. */
7761
7762int
7763main ()
7764{
7765long double x; x = (long double)0;
7766 ;
7767 return 0;
7768}
7769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007770if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007771
7772
Matthias Kloseb9621712010-04-24 17:59:49 +00007773$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007774
7775 have_long_double=yes
7776
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007777fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7780$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007781if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007782# The cast to long int works around a bug in the HP C Compiler
7783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7787$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007788if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 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 +00007792
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007793else
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 if test "$ac_cv_type_long_double" = yes; then
7795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007797as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007798See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007799 else
7800 ac_cv_sizeof_long_double=0
7801 fi
7802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7806$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007807
7808
7809
7810cat >>confdefs.h <<_ACEOF
7811#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7812_ACEOF
7813
7814
7815fi
7816
7817
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7819$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007820have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007822/* end confdefs.h. */
7823
7824int
7825main ()
7826{
7827_Bool x; x = (_Bool)0;
7828 ;
7829 return 0;
7830}
7831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007833
7834
Matthias Kloseb9621712010-04-24 17:59:49 +00007835$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007836
7837 have_c99_bool=yes
7838
Thomas Woutersb2137042007-02-01 18:02:27 +00007839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7842$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007843if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7849$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 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 +00007854
Thomas Woutersb2137042007-02-01 18:02:27 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 if test "$ac_cv_type__Bool" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007859as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007860See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 else
7862 ac_cv_sizeof__Bool=0
7863 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865
Thomas Woutersb2137042007-02-01 18:02:27 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7868$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869
7870
7871
Thomas Woutersb2137042007-02-01 18:02:27 +00007872cat >>confdefs.h <<_ACEOF
7873#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7874_ACEOF
7875
7876
7877fi
7878
Matthias Kloseb9621712010-04-24 17:59:49 +00007879ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007880 #include <stdint.h>
7881 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007882 #ifdef HAVE_INTTYPES_H
7883 #include <inttypes.h>
7884 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007885"
Victor Stinnere0be4232011-10-25 13:06:09 +02007886if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007887
7888cat >>confdefs.h <<_ACEOF
7889#define HAVE_UINTPTR_T 1
7890_ACEOF
7891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892# The cast to long int works around a bug in the HP C Compiler
7893# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7894# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7895# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7897$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007898if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007900else
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 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 +00007902
Martin v. Löwis11437992002-04-12 09:54:03 +00007903else
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 if test "$ac_cv_type_uintptr_t" = yes; then
7905 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007907as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007908See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909 else
7910 ac_cv_sizeof_uintptr_t=0
7911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913
Martin v. Löwis11437992002-04-12 09:54:03 +00007914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7916$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007917
7918
7919
Martin v. Löwis11437992002-04-12 09:54:03 +00007920cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007921#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007922_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007923
Michael W. Hudson54241132001-12-07 15:38:26 +00007924
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007925fi
7926
Thomas Wouters89f507f2006-12-13 04:49:30 +00007927
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007928# The cast to long int works around a bug in the HP C Compiler
7929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7931# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7933$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007934if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007936else
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007938#ifdef HAVE_SYS_TYPES_H
7939#include <sys/types.h>
7940#endif
7941
Matthias Kloseb9621712010-04-24 17:59:49 +00007942"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007944else
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 if test "$ac_cv_type_off_t" = yes; then
7946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007948as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007949See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007950 else
7951 ac_cv_sizeof_off_t=0
7952 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007954
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7957$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007958
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007959
7960
Martin v. Löwis11437992002-04-12 09:54:03 +00007961cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007962#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007963_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007964
Michael W. Hudson54241132001-12-07 15:38:26 +00007965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007966
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7968$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007969if test "$have_long_long" = yes
7970then
7971if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007972 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7977$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007978else
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7980$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007981fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007982else
Matthias Kloseb9621712010-04-24 17:59:49 +00007983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7984$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007985fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007986
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007987# The cast to long int works around a bug in the HP C Compiler
7988# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7989# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7990# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7992$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007993if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007995else
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007997#ifdef HAVE_SYS_TYPES_H
7998#include <sys/types.h>
7999#endif
8000#ifdef HAVE_TIME_H
8001#include <time.h>
8002#endif
8003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008005
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 if test "$ac_cv_type_time_t" = yes; then
8008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008010as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008011See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008012 else
8013 ac_cv_sizeof_time_t=0
8014 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008016
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008017fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8019$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008021
8022
Martin v. Löwis11437992002-04-12 09:54:03 +00008023cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008024#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008025_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008026
Michael W. Hudson54241132001-12-07 15:38:26 +00008027
8028
Trent Mick635f6fb2000-08-23 21:33:05 +00008029# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008030ac_save_cc="$CC"
8031if test "$ac_cv_kpthread" = "yes"
8032then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008033elif test "$ac_cv_kthread" = "yes"
8034then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008035elif test "$ac_cv_pthread" = "yes"
8036then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008037fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008038
Matthias Kloseb9621712010-04-24 17:59:49 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8040$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008041have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008043/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008044
8045 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008046int
8047main ()
8048{
Guido van Rossum12580492000-09-24 16:47:19 +00008049pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ;
8051 return 0;
8052}
Matthias Kloseb159a552010-04-25 21:00:44 +00008053
Martin v. Löwis11437992002-04-12 09:54:03 +00008054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008055if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008056 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8060$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008061if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008063# 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 pthread_t" >&5
8067$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008068if ${ac_cv_sizeof_pthread_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 (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008072#ifdef HAVE_PTHREAD_H
8073#include <pthread.h>
8074#endif
8075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008077
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008078else
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 if test "$ac_cv_type_pthread_t" = yes; then
8080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008082as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008083See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084 else
8085 ac_cv_sizeof_pthread_t=0
8086 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008087fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008088
Trent Mick635f6fb2000-08-23 21:33:05 +00008089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8091$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093
8094
Martin v. Löwis11437992002-04-12 09:54:03 +00008095cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008096#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008097_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008098
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008099
Trent Mick635f6fb2000-08-23 21:33:05 +00008100fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008101CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008102
Michael W. Hudson54241132001-12-07 15:38:26 +00008103
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008104case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008105 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008106 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8107 ;;
8108 Darwin/*)
8109 OTHER_LIBTOOL_OPT=""
8110 ;;
8111esac
8112
8113
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008114ARCH_RUN_32BIT=""
8115
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008116case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008117 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008118 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8119 if test "${enable_universalsdk}"; then
8120 :
8121 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008122 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008123 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008124 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008125 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008126 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008127 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008128 if test ${gcc_version} '<' 4.0
8129 then
8130 LIBTOOL_CRUFT="-lcc_dynamic"
8131 else
8132 LIBTOOL_CRUFT=""
8133 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008135 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008138/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008139
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008140 #include <unistd.h>
8141 int main(int argc, char*argv[])
8142 {
8143 if (sizeof(long) == 4) {
8144 return 0;
8145 } else {
8146 return 1;
8147 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008148 }
8149
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008151if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008152 ac_osx_32bit=yes
8153else
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008158fi
8159
8160
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008161 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008162 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008163 i386)
8164 MACOSX_DEFAULT_ARCH="i386"
8165 ;;
8166 ppc)
8167 MACOSX_DEFAULT_ARCH="ppc"
8168 ;;
8169 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008170 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008171 ;;
8172 esac
8173 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008174 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008175 i386)
8176 MACOSX_DEFAULT_ARCH="x86_64"
8177 ;;
8178 ppc)
8179 MACOSX_DEFAULT_ARCH="ppc64"
8180 ;;
8181 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008182 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008183 ;;
8184 esac
8185
8186 #ARCH_RUN_32BIT="true"
8187 fi
8188
8189 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008190 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008191 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008192esac
8193
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8195$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008196if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008197then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008198 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008199 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008200 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8205$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008206 if test $enable_shared = "yes"
8207 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008208 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 +00008209 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008210else
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008213fi
8214
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8216$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008217case $ac_sys_system/$ac_sys_release in
8218 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008219
Matthias Kloseb9621712010-04-24 17:59:49 +00008220$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8223$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008224 ;;
8225 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8227$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008228 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008229esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008230
Guido van Rossum0a516c91994-09-12 10:58:40 +00008231# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008232
Michael W. Hudson54241132001-12-07 15:38:26 +00008233
8234
8235
8236
Benjamin Peterson99f03762010-04-11 22:15:28 +00008237
Thomas Wouters477c8d52006-05-27 19:21:47 +00008238
Georg Brandlb1441c72009-01-03 22:33:39 +00008239
Thomas Wouters477c8d52006-05-27 19:21:47 +00008240cat >>confdefs.h <<_ACEOF
8241#define SHLIB_EXT "$SO"
8242_ACEOF
8243
Guido van Rossum0a516c91994-09-12 10:58:40 +00008244# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008245# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008246# (Shared libraries in this instance are shared modules to be loaded into
8247# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8249$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008250if test -z "$LDSHARED"
8251then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008252 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008253 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008254 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008255 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008256 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008257 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008258 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008259 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008260 if test "$GCC" = "yes" ; then
8261 LDSHARED='$(CC) -shared'
8262 LDCXXSHARED='$(CXX) -shared'
8263 else
8264 LDSHARED='$(CC) -G'
8265 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008266 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008267 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008268 if test "$GCC" = "yes" ; then
8269 LDSHARED='$(CC) -shared'
8270 LDCXXSHARED='$(CXX) -shared'
8271 else
8272 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008273 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008274 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008275 LDSHARED='$(CC) -bundle'
8276 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008277 if test "$enable_framework" ; then
8278 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008279 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8280 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008281 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008282 else
8283 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008284 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008285 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008286 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008287 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008288 LDSHARED='$(CC) -bundle'
8289 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008290 if test "$enable_framework" ; then
8291 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008292 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8293 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008294 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008295 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008296 # No framework, use the Python app as bundle-loader
8297 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008298 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008299 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008300 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008301 Darwin/*)
8302 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8303 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008304
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008305 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008306 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008307 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008308 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008309 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008310 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8311 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008312 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008313 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008314 LDSHARED='$(CC) -bundle'
8315 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008316 if test "$enable_framework" ; then
8317 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008318 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8319 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008320 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008321 else
8322 # No framework, use the Python app as bundle-loader
8323 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8324 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008325 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008326 fi
8327 fi
8328 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008329 Linux*|GNU*|QNX*)
8330 LDSHARED='$(CC) -shared'
8331 LDCXXSHARED='$(CXX) -shared';;
8332 BSD/OS*/4*)
8333 LDSHARED="gcc -shared"
8334 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008335 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008336 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008337 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008338 LDSHARED='$(CC) -shared'
8339 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008340 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008341 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008342 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008343 OpenBSD*)
8344 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8345 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008346 LDSHARED='$(CC) -shared $(CCSHARED)'
8347 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008348 else
8349 case `uname -r` in
8350 [01].* | 2.[0-7] | 2.[0-7].*)
8351 LDSHARED="ld -Bshareable ${LDFLAGS}"
8352 ;;
8353 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008354 LDSHARED='$(CC) -shared $(CCSHARED)'
8355 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008356 ;;
8357 esac
8358 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008359 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008360 LDSHARED='$(CC) -shared'
8361 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008362 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008363 if test "$GCC" = "yes" ; then
8364 LDSHARED='$(CC) -shared'
8365 LDCXXSHARED='$(CXX) -shared'
8366 else
8367 LDSHARED='$(CC) -G'
8368 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008369 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008370 SCO_SV*)
8371 LDSHARED='$(CC) -Wl,-G,-Bexport'
8372 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8373 CYGWIN*)
8374 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8375 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008376 *) LDSHARED="ld";;
8377 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8380$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008381LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008382BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008383# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008384# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8386$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008387if test -z "$CCSHARED"
8388then
Guido van Rossum07397971997-04-29 21:49:50 +00008389 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008390 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008391 then CCSHARED="-fPIC";
8392 elif test `uname -p` = sparc;
8393 then CCSHARED="-xcode=pic32";
8394 else CCSHARED="-Kpic";
8395 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008396 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008397 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008398 else CCSHARED="+z";
8399 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008400 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008401 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008402 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008403 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008404 if test "$GCC" = "yes"
8405 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008406 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008407 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008408 SCO_SV*)
8409 if test "$GCC" = "yes"
8410 then CCSHARED="-fPIC"
8411 else CCSHARED="-Kpic -belf"
8412 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008413 IRIX*/6*) case $CC in
8414 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008415 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008416 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008417 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8420$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008421# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008422# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8424$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008425if test -z "$LINKFORSHARED"
8426then
Guido van Rossum07397971997-04-29 21:49:50 +00008427 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008428 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008429 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008430 LINKFORSHARED="-Wl,-E -Wl,+s";;
8431# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008432 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008433 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008434 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008436 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008437 if test "$enable_framework"
8438 then
Jack Jansenda49e192005-01-07 13:08:22 +00008439 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008440 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008441 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008442 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008443 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008444 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008445 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008446 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8447 then
8448 LINKFORSHARED="-Wl,--export-dynamic"
8449 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008450 SunOS/5*) case $CC in
8451 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008452 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008453 then
8454 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008455 fi;;
8456 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008457 CYGWIN*)
8458 if test $enable_shared = "no"
8459 then
8460 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8461 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008462 QNX*)
8463 # -Wl,-E causes the symbols to be added to the dynamic
8464 # symbol table so that they can be found when a module
8465 # is loaded. -N 2048K causes the stack size to be set
8466 # to 2048 kilobytes so that the stack doesn't overflow
8467 # when running test_compile.py.
8468 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008469 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8472$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008473
Michael W. Hudson54241132001-12-07 15:38:26 +00008474
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008475
Matthias Kloseb9621712010-04-24 17:59:49 +00008476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8477$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008478if test ! "$LIBRARY" = "$LDLIBRARY"
8479then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008480 case $ac_sys_system in
8481 CYGWIN*)
8482 # Cygwin needs CCSHARED when building extension DLLs
8483 # but not when building the interpreter DLL.
8484 CFLAGSFORSHARED='';;
8485 *)
8486 CFLAGSFORSHARED='$(CCSHARED)'
8487 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8490$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008491
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008492# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8493# library (with --enable-shared).
8494# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008495# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8496# if it is not required, since it creates a dependency of the shared library
8497# to LIBS. This, in turn, means that applications linking the shared libpython
8498# don't need to link LIBS explicitly. The default should be only changed
8499# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8502$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008503case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008504 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008505 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008506esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8508$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008509
8510
Guido van Rossum627b2d71993-12-24 10:39:16 +00008511# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8513$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008514if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008515 $as_echo_n "(cached) " >&6
8516else
8517 ac_check_lib_save_LIBS=$LIBS
8518LIBS="-lsendfile $LIBS"
8519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8520/* end confdefs.h. */
8521
8522/* Override any GCC internal prototype to avoid an error.
8523 Use char because int might match the return type of a GCC
8524 builtin and then its argument prototype would still apply. */
8525#ifdef __cplusplus
8526extern "C"
8527#endif
8528char sendfile ();
8529int
8530main ()
8531{
8532return sendfile ();
8533 ;
8534 return 0;
8535}
8536_ACEOF
8537if ac_fn_c_try_link "$LINENO"; then :
8538 ac_cv_lib_sendfile_sendfile=yes
8539else
8540 ac_cv_lib_sendfile_sendfile=no
8541fi
8542rm -f core conftest.err conftest.$ac_objext \
8543 conftest$ac_exeext conftest.$ac_ext
8544LIBS=$ac_check_lib_save_LIBS
8545fi
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8547$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008549 cat >>confdefs.h <<_ACEOF
8550#define HAVE_LIBSENDFILE 1
8551_ACEOF
8552
8553 LIBS="-lsendfile $LIBS"
8554
8555fi
8556
Matthias Kloseb9621712010-04-24 17:59:49 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8558$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008559if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008561else
Martin v. Löwis11437992002-04-12 09:54:03 +00008562 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008563LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567/* Override any GCC internal prototype to avoid an error.
8568 Use char because int might match the return type of a GCC
8569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008570#ifdef __cplusplus
8571extern "C"
8572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008573char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008574int
8575main ()
8576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ;
8579 return 0;
8580}
8581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008582if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008587rm -f core conftest.err conftest.$ac_objext \
8588 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008589LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8592$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008593if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008594 cat >>confdefs.h <<_ACEOF
8595#define HAVE_LIBDL 1
8596_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008597
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008598 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008599
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008600fi
8601 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8603$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008604if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008606else
Martin v. Löwis11437992002-04-12 09:54:03 +00008607 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008608LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612/* Override any GCC internal prototype to avoid an error.
8613 Use char because int might match the return type of a GCC
8614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008615#ifdef __cplusplus
8616extern "C"
8617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008618char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008619int
8620main ()
8621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 ;
8624 return 0;
8625}
8626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632rm -f core conftest.err conftest.$ac_objext \
8633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008634LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8637$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008638if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 cat >>confdefs.h <<_ACEOF
8640#define HAVE_LIBDLD 1
8641_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008642
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008643 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008644
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008645fi
8646 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008647
Georg Brandlb1441c72009-01-03 22:33:39 +00008648# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008649if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8651$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008652if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008654else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008655 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659/* Override any GCC internal prototype to avoid an error.
8660 Use char because int might match the return type of a GCC
8661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662#ifdef __cplusplus
8663extern "C"
8664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008665char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008666int
8667main ()
8668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ;
8671 return 0;
8672}
8673_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674for ac_lib in '' pthread rt posix4; do
8675 if test -z "$ac_lib"; then
8676 ac_res="none required"
8677 else
8678 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008679 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008680 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008684rm -f core conftest.err conftest.$ac_objext \
8685 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008686 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689done
Victor Stinnere0be4232011-10-25 13:06:09 +02008690if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692else
8693 ac_cv_search_sem_init=no
8694fi
8695rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008696LIBS=$ac_func_search_save_LIBS
8697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8699$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008701if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008702 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008703
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008704fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008705 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008706 # posix4 on Solaris 2.6
8707 # pthread (first!) on Linux
8708fi
8709
Martin v. Löwis19d17342003-06-14 21:03:05 +00008710# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8712$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008715else
8716 ac_check_lib_save_LIBS=$LIBS
8717LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008719/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008721/* Override any GCC internal prototype to avoid an error.
8722 Use char because int might match the return type of a GCC
8723 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008724#ifdef __cplusplus
8725extern "C"
8726#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008727char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008728int
8729main ()
8730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008732 ;
8733 return 0;
8734}
8735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008736if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008737 ac_cv_lib_intl_textdomain=yes
8738else
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008741rm -f core conftest.err conftest.$ac_objext \
8742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008743LIBS=$ac_check_lib_save_LIBS
8744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8746$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008748
Matthias Kloseb9621712010-04-24 17:59:49 +00008749$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008750
Brett Cannonc6d936e2009-06-07 20:09:53 +00008751 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008752fi
8753
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008754
8755# checks for system dependent C++ extensions support
8756case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008757 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8758$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008760/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008761
Georg Brandl59e87bd2011-02-15 19:48:59 +00008762 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008763int
8764main ()
8765{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008766loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 ;
8768 return 0;
8769}
Matthias Kloseb159a552010-04-25 21:00:44 +00008770
Martin v. Löwis11437992002-04-12 09:54:03 +00008771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008772if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008773
Matthias Kloseb159a552010-04-25 21:00:44 +00008774
Matthias Kloseb9621712010-04-24 17:59:49 +00008775$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008776
Matthias Kloseb159a552010-04-25 21:00:44 +00008777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008778$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008779
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008780else
Matthias Kloseb159a552010-04-25 21:00:44 +00008781
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008783$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008784
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786rm -f core conftest.err conftest.$ac_objext \
8787 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008788 *) ;;
8789esac
8790
Guido van Rossum70c7f481998-03-26 18:44:10 +00008791# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8793$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008794if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008796else
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008798LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802/* Override any GCC internal prototype to avoid an error.
8803 Use char because int might match the return type of a GCC
8804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805#ifdef __cplusplus
8806extern "C"
8807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008808char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008809int
8810main ()
8811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008813 ;
8814 return 0;
8815}
8816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008817if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008822rm -f core conftest.err conftest.$ac_objext \
8823 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008824LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8827$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008828if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008829 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008830fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008831 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8833$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008834if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008836else
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008838LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842/* Override any GCC internal prototype to avoid an error.
8843 Use char because int might match the return type of a GCC
8844 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008845#ifdef __cplusplus
8846extern "C"
8847#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008848char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849int
8850main ()
8851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008852return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 ;
8854 return 0;
8855}
8856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008857if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862rm -f core conftest.err conftest.$ac_objext \
8863 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008864LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8867$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008868if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008869 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008870fi
8871 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008872
Matthias Kloseb9621712010-04-24 17:59:49 +00008873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8874$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008877if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8880$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008881LIBS="$withval $LIBS"
8882
8883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8885$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886fi
8887
Guido van Rossum7f43da71994-08-01 12:15:30 +00008888
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008889if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008890 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8891set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8893$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008894if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008896else
8897 case $PKG_CONFIG in
8898 [\\/]* | ?:[\\/]*)
8899 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8900 ;;
8901 *)
8902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8903for as_dir in $PATH
8904do
8905 IFS=$as_save_IFS
8906 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008908 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 +00008909 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008911 break 2
8912 fi
8913done
Matthias Kloseb9621712010-04-24 17:59:49 +00008914 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008915IFS=$as_save_IFS
8916
8917 ;;
8918esac
8919fi
8920PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8921if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8923$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008924else
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8926$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008927fi
8928
8929
8930fi
8931if test -z "$ac_cv_path_PKG_CONFIG"; then
8932 ac_pt_PKG_CONFIG=$PKG_CONFIG
8933 # Extract the first word of "pkg-config", so it can be a program name with args.
8934set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8936$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008937if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008939else
8940 case $ac_pt_PKG_CONFIG in
8941 [\\/]* | ?:[\\/]*)
8942 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8943 ;;
8944 *)
8945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8946for as_dir in $PATH
8947do
8948 IFS=$as_save_IFS
8949 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008951 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 +00008952 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008954 break 2
8955 fi
8956done
Matthias Kloseb9621712010-04-24 17:59:49 +00008957 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008958IFS=$as_save_IFS
8959
8960 ;;
8961esac
8962fi
8963ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8964if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8966$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008967else
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8969$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008970fi
8971
8972 if test "x$ac_pt_PKG_CONFIG" = x; then
8973 PKG_CONFIG=""
8974 else
8975 case $cross_compiling:$ac_tool_warned in
8976yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008979ac_tool_warned=yes ;;
8980esac
8981 PKG_CONFIG=$ac_pt_PKG_CONFIG
8982 fi
8983else
8984 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8985fi
8986
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008987
8988# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8990$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008991
8992# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008993if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008994 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008995else
8996 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008997fi
8998
8999
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9001$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009002
9003# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9005$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009006
9007# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009008if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009009 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009010else
9011 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009012fi
9013
9014
9015if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009016 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9017else
9018 LIBFFI_INCLUDEDIR=""
9019fi
9020
9021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9023$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009024
Stefan Krah60187b52012-03-23 19:06:27 +01009025# Check for use of the system libmpdec library
9026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9027$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9028
9029# Check whether --with-system_libmpdec was given.
9030if test "${with_system_libmpdec+set}" = set; then :
9031 withval=$with_system_libmpdec;
9032else
9033 with_system_libmpdec="no"
9034fi
9035
9036
9037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9038$as_echo "$with_system_libmpdec" >&6; }
9039
Benjamin Peterson076ed002010-10-31 17:11:02 +00009040# Check for support for loadable sqlite extensions
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9042$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9043# Check whether --enable-loadable-sqlite-extensions was given.
9044if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9045 enableval=$enable_loadable_sqlite_extensions;
9046else
9047 enable_loadable_sqlite_extensions="no"
9048fi
9049
9050
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9052$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9053
Matthias Klose55708cc2009-04-30 08:06:49 +00009054# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9056$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009057
9058# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009059if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009060 withval=$with_dbmliborder;
9061if test x$with_dbmliborder = xyes
9062then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009063as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009064else
9065 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9066 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9067 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009068 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009069 fi
9070 done
9071fi
9072fi
9073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9075$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009076
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009077# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009078
9079
Matthias Kloseb9621712010-04-24 17:59:49 +00009080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9081$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009084if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085 withval=$with_signal_module;
9086fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009087
9088
9089if test -z "$with_signal_module"
9090then with_signal_module="yes"
9091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9093$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009094
9095if test "${with_signal_module}" = "yes"; then
9096 USE_SIGNAL_MODULE=""
9097 SIGNAL_OBJS=""
9098else
9099 USE_SIGNAL_MODULE="#"
9100 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9101fi
9102
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009103# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009104
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009105USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009107
Martin v. Löwis11437992002-04-12 09:54:03 +00009108
9109# Templates for things AC_DEFINEd more than once.
9110# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009111
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9115$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009117# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009118if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009119 withval=$with_threads;
9120fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009121
9122
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009123# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009126if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127 withval=$with_thread; with_threads=$with_thread
9128fi
9129
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009130
9131if test -z "$with_threads"
9132then with_threads="yes"
9133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9135$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009136
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009137
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009138if test "$with_threads" = "no"
9139then
9140 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009141elif test "$ac_cv_pthread_is_default" = yes
9142then
Matthias Kloseb9621712010-04-24 17:59:49 +00009143 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009144
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009145 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009147
9148 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009149 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009150elif test "$ac_cv_kpthread" = "yes"
9151then
9152 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009153 if test "$ac_cv_cxx_thread" = "yes"; then
9154 CXX="$CXX -Kpthread"
9155 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009157
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009158 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009159 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009160elif test "$ac_cv_kthread" = "yes"
9161then
9162 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009163 if test "$ac_cv_cxx_thread" = "yes"; then
9164 CXX="$CXX -Kthread"
9165 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009166 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009167
9168 posix_threads=yes
9169 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009170elif test "$ac_cv_pthread" = "yes"
9171then
9172 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009173 if test "$ac_cv_cxx_thread" = "yes"; then
9174 CXX="$CXX -pthread"
9175 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009176 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009177
9178 posix_threads=yes
9179 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009180else
9181 if test ! -z "$with_threads" -a -d "$with_threads"
9182 then LDFLAGS="$LDFLAGS -L$with_threads"
9183 fi
9184 if test ! -z "$withval" -a -d "$withval"
9185 then LDFLAGS="$LDFLAGS -L$withval"
9186 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009187
9188 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009189 # define _POSIX_THREADS in unistd.h. Some apparently don't
9190 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9192$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009194/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009195
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009196#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009197#ifdef _POSIX_THREADS
9198yes
9199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
9201_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009204 unistd_defines_pthreads=yes
9205else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009206 unistd_defines_pthreads=no
9207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009208rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009209
Matthias Kloseb9621712010-04-24 17:59:49 +00009210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9211$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009212
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009214
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009215 # Just looking for pthread_create in libpthread is not enough:
9216 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9217 # So we really have to include pthread.h, and then link.
9218 _libs=$LIBS
9219 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9221$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009223/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009224#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009225
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009226void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009227int
9228main ()
9229{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009230
9231pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 ;
9233 return 0;
9234}
9235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009237
Matthias Kloseb9621712010-04-24 17:59:49 +00009238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9239$as_echo "yes" >&6; }
9240 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009241
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009242 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009243 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009244else
Martin v. Löwis11437992002-04-12 09:54:03 +00009245
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009246 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009247 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009248if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009250
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009251 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009252 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009253else
Guido van Rossumad678af1998-10-02 14:42:15 +00009254
Matthias Kloseb9621712010-04-24 17:59:49 +00009255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9256$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009257if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009259else
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009261LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265/* Override any GCC internal prototype to avoid an error.
9266 Use char because int might match the return type of a GCC
9267 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009268#ifdef __cplusplus
9269extern "C"
9270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009271char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ;
9277 return 0;
9278}
9279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009282else
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285rm -f core conftest.err conftest.$ac_objext \
9286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009287LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9290$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009291if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009294 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009295 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009296 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009297else
Greg Steinadf63d62000-07-05 10:38:09 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9300$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009301if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009303else
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009305LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009308
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009309/* Override any GCC internal prototype to avoid an error.
9310 Use char because int might match the return type of a GCC
9311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009312#ifdef __cplusplus
9313extern "C"
9314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009315char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009316int
9317main ()
9318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 ;
9321 return 0;
9322}
9323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009324if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009326else
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009329rm -f core conftest.err conftest.$ac_objext \
9330 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009331LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9334$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009335if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009338 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009339 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009340 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009341else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9344$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009345if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009347else
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009349LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353/* Override any GCC internal prototype to avoid an error.
9354 Use char because int might match the return type of a GCC
9355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009356#ifdef __cplusplus
9357extern "C"
9358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009359char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009360int
9361main ()
9362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ;
9365 return 0;
9366}
9367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009369 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009370else
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373rm -f core conftest.err conftest.$ac_objext \
9374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009375LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9378$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009379if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009380 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009381
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009382 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009383 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009384 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009385else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009386
Matthias Kloseb9621712010-04-24 17:59:49 +00009387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9388$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009389if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009391else
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009393LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009396
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397/* Override any GCC internal prototype to avoid an error.
9398 Use char because int might match the return type of a GCC
9399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009400#ifdef __cplusplus
9401extern "C"
9402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009403char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009404int
9405main ()
9406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ;
9409 return 0;
9410}
9411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009414else
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009417rm -f core conftest.err conftest.$ac_objext \
9418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009419LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9422$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009423if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009425
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009426 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009427 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009428 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009429else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009430
Martin v. Löwis130fb172001-07-19 11:00:41 +00009431 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009432fi
9433
Guido van Rossum627b2d71993-12-24 10:39:16 +00009434
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009435fi
9436
Guido van Rossum0be3e491997-05-22 20:33:33 +00009437fi
9438
Guido van Rossum49545951997-12-02 19:28:29 +00009439fi
9440
Guido van Rossumb93a8621998-05-07 13:27:32 +00009441fi
9442
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009444rm -f core conftest.err conftest.$ac_objext \
9445 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9448$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009449if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009450 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009451else
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009453LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009474else
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477rm -f core conftest.err conftest.$ac_objext \
9478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009479LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9482$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009483if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009485
Martin v. Löwis130fb172001-07-19 11:00:41 +00009486 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009487 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009488 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489fi
9490
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009491
Neal Norwitza978ab02002-11-02 16:58:05 +00009492 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9494$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9528$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009531
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009532 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009533 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009534 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009535fi
9536
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009537 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009538fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009539
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009540if test "$posix_threads" = "yes"; then
9541 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009542
Matthias Kloseb9621712010-04-24 17:59:49 +00009543$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009544
9545 fi
9546
9547 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9548 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009549 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009550$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009551
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009552 ;;
9553 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009554$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009555
9556 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009557 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009559
9560 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009561 esac
9562
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9564$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009565 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009569 ac_cv_pthread_system_supported=no
9570else
Matthias Kloseb9621712010-04-24 17:59:49 +00009571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009573#include <pthread.h>
9574 void *foo(void *parm) {
9575 return NULL;
9576 }
9577 main() {
9578 pthread_attr_t attr;
9579 pthread_t id;
9580 if (pthread_attr_init(&attr)) exit(-1);
9581 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9582 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9583 exit(0);
9584 }
9585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009586if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009587 ac_cv_pthread_system_supported=yes
9588else
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009593fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595
Guido van Rossum627b2d71993-12-24 10:39:16 +00009596fi
9597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9599$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009600 if test "$ac_cv_pthread_system_supported" = "yes"; then
9601
Matthias Kloseb9621712010-04-24 17:59:49 +00009602$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009603
9604 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 for ac_func in pthread_sigmask
9606do :
9607 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009608if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009609 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009610#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009611_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009612 case $ac_sys_system in
9613 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009616
9617 ;;
9618 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009619fi
9620done
9621
9622fi
9623
9624
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009625# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009626
Matthias Kloseb9621712010-04-24 17:59:49 +00009627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9628$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009629# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009630if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009632 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009635 ipv6=no
9636 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9638$as_echo "yes" >&6; }
9639 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009640
9641 ipv6=yes
9642 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009644else
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009647
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9649$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009650 ipv6=no
9651
9652else
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009655 /* AF_INET6 available check */
9656#include <sys/types.h>
9657#include <sys/socket.h>
9658main()
9659{
9660 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9661 exit(1);
9662 else
9663 exit(0);
9664}
9665
Martin v. Löwis11437992002-04-12 09:54:03 +00009666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009667if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009668
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9670$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009671 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009672
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009673else
Matthias Kloseb159a552010-04-25 21:00:44 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9676$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009677 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009678
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9681 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009682fi
9683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009685if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9687$as_echo_n "checking if RFC2553 API is available... " >&6; }
9688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009689/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009690
9691 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009692#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009693int
9694main ()
9695{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009696struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009697 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ;
9699 return 0;
9700}
Matthias Kloseb159a552010-04-25 21:00:44 +00009701
Martin v. Löwis11437992002-04-12 09:54:03 +00009702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009703if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009704
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009707 ipv6=yes
9708
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009709else
Matthias Kloseb159a552010-04-25 21:00:44 +00009710
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009712$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009713 ipv6=no
9714
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009717fi
9718
9719if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009721
9722fi
9723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724fi
9725
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009726
9727ipv6type=unknown
9728ipv6lib=none
9729ipv6trylibc=no
9730
9731if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9733$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009734 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9735 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009736 case $i in
9737 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009739/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009740
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009741#include <netinet/in.h>
9742#ifdef IPV6_INRIA_VERSION
9743yes
9744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009745_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009748 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009749fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009750rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009751
9752 ;;
9753 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009755/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009757#include <netinet/in.h>
9758#ifdef __KAME__
9759yes
9760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009761_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009764 ipv6type=$i;
9765 ipv6lib=inet6
9766 ipv6libdir=/usr/local/v6/lib
9767 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009768fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009769rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009770
9771 ;;
9772 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009774/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009776#include <features.h>
9777#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9778yes
9779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009783 ipv6type=$i;
9784 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009785fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009786rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787
9788 ;;
9789 linux-inet6)
9790 if test -d /usr/inet6; then
9791 ipv6type=$i
9792 ipv6lib=inet6
9793 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009794 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009795 fi
9796 ;;
9797 solaris)
9798 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009799 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800 ipv6type=$i
9801 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802 fi
9803 fi
9804 ;;
9805 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009809#include <sys/param.h>
9810#ifdef _TOSHIBA_INET6
9811yes
9812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816 ipv6type=$i;
9817 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009818 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009820rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821
9822 ;;
9823 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009826
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827#include </usr/local/v6/include/sys/v6config.h>
9828#ifdef __V6D__
9829yes
9830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009831_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009833 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834 ipv6type=$i;
9835 ipv6lib=v6;
9836 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009837 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840
9841 ;;
9842 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009844/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846#include <sys/param.h>
9847#ifdef _ZETA_MINAMI_INET6
9848yes
9849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009850_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009853 ipv6type=$i;
9854 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009855 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009857rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009858
9859 ;;
9860 esac
9861 if test "$ipv6type" != "unknown"; then
9862 break
9863 fi
9864 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9866$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867fi
9868
9869if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9870 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9871 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9872 echo "using lib$ipv6lib"
9873 else
9874 if test $ipv6trylibc = "yes"; then
9875 echo "using libc"
9876 else
9877 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9878 echo "You need to fetch lib$ipv6lib.a from appropriate"
9879 echo 'ipv6 kit and compile beforehand.'
9880 exit 1
9881 fi
9882 fi
9883fi
9884
Matthias Kloseb9621712010-04-24 17:59:49 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9886$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009888/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009889
9890 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009891int
9892main ()
9893{
9894FSIORefNum fRef = 0
9895 ;
9896 return 0;
9897}
Matthias Kloseb159a552010-04-25 21:00:44 +00009898
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009901
Matthias Kloseb159a552010-04-25 21:00:44 +00009902
Matthias Kloseb9621712010-04-24 17:59:49 +00009903$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009904
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9906$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009907
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009908else
Matthias Kloseb159a552010-04-25 21:00:44 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9911$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009912
9913fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9915
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009916# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9918$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009921if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922 withval=$with_doc_strings;
9923fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009924
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009925
9926if test -z "$with_doc_strings"
9927then with_doc_strings="yes"
9928fi
9929if test "$with_doc_strings" != "no"
9930then
9931
Matthias Kloseb9621712010-04-24 17:59:49 +00009932$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009933
9934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9936$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009937
Antoine Pitrou042b1282010-08-13 21:15:58 +00009938# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9940$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009943if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009945if test "$withval" != no
9946then
9947
Matthias Kloseb9621712010-04-24 17:59:49 +00009948$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009949
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9951$as_echo "yes" >&6; }
9952else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009954fi
9955else
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958fi
9959
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009960
9961# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9963$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009964
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009966if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967 withval=$with_pymalloc;
9968fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009969
Neil Schemenauera35c6882001-02-27 04:45:05 +00009970
Neil Schemenauer16c22972002-03-22 15:34:49 +00009971if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009972then
9973 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009974fi
9975if test "$with_pymalloc" != "no"
9976then
Martin v. Löwis11437992002-04-12 09:54:03 +00009977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009979
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +02009980 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9983$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009984
Benjamin Peterson05159c42009-12-03 03:01:27 +00009985# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9987$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009988
9989# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009990if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009991 withval=$with_valgrind;
9992else
9993 with_valgrind=no
9994fi
9995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9997$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009998if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 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 +020010000if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010001
Matthias Kloseb9621712010-04-24 17:59:49 +000010002$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010003
10004else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010005 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010006
10007fi
10008
10009
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010010 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010011fi
10012
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010013# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010014
Guido van Rossum98935bf2001-09-05 19:13:16 +000010015DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010016
Guido van Rossume97ee181999-12-20 21:27:22 +000010017# the dlopen() function means we might want to use dynload_shlib.o. some
10018# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010019for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010020do :
10021 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010022if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010023 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010024#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010025_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010026
Guido van Rossume97ee181999-12-20 21:27:22 +000010027fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010028done
Guido van Rossume97ee181999-12-20 21:27:22 +000010029
Michael W. Hudson54241132001-12-07 15:38:26 +000010030
Guido van Rossume97ee181999-12-20 21:27:22 +000010031# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10032# loading of modules.
10033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10035$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010036if test -z "$DYNLOADFILE"
10037then
10038 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010039 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10040 if test "$ac_cv_func_dlopen" = yes
10041 then DYNLOADFILE="dynload_shlib.o"
10042 else DYNLOADFILE="dynload_aix.o"
10043 fi
10044 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010045 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010046 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10047 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010048 *)
10049 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10050 # out any dynamic loading
10051 if test "$ac_cv_func_dlopen" = yes
10052 then DYNLOADFILE="dynload_shlib.o"
10053 else DYNLOADFILE="dynload_stub.o"
10054 fi
10055 ;;
10056 esac
10057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10059$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010060if test "$DYNLOADFILE" != "dynload_stub.o"
10061then
Martin v. Löwis11437992002-04-12 09:54:03 +000010062
Matthias Kloseb9621712010-04-24 17:59:49 +000010063$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010064
10065fi
10066
Neil Schemenauer4e425612001-06-19 15:44:15 +000010067# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10068
Michael W. Hudson54241132001-12-07 15:38:26 +000010069
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10071$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010072if test -z "$MACHDEP_OBJS"
10073then
Jack Jansene578a632001-08-15 01:27:14 +000010074 MACHDEP_OBJS=$extra_machdep_objs
10075else
10076 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010077fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010078if test -z "$MACHDEP_OBJS"; then
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10080$as_echo "none" >&6; }
10081else
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10083$as_echo "$MACHDEP_OBJS" >&6; }
10084fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010085
Guido van Rossum627b2d71993-12-24 10:39:16 +000010086# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010087for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010088 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010089 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010090 futimens futimes gai_strerror \
10091 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010092 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010093 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010094 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10095 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010096 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010097 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010098 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010099 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010100 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010101 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010102 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10103 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010104 sigaction sigaltstack siginterrupt sigpending sigrelse \
10105 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010106 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010107 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10108 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010109do :
10110 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10111ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010112if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010114#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010115_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010116
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010117fi
10118done
10119
Michael W. Hudson54241132001-12-07 15:38:26 +000010120
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010121ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10122 #include <dirent.h>
10123"
10124if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10125
10126$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10127
10128fi
10129
10130
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010131# For some functions, having a definition is not sufficient, since
10132# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10134$as_echo_n "checking for chroot... " >&6; }
10135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010137#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010138int
10139main ()
10140{
10141void *x=chroot
10142 ;
10143 return 0;
10144}
10145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010146if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010149
Matthias Kloseb159a552010-04-25 21:00:44 +000010150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010151$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010152else
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010155
10156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10159$as_echo_n "checking for link... " >&6; }
10160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010162#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010163int
10164main ()
10165{
10166void *x=link
10167 ;
10168 return 0;
10169}
10170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010171if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010172
Matthias Kloseb9621712010-04-24 17:59:49 +000010173$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010174
Matthias Kloseb159a552010-04-25 21:00:44 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010176$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010177else
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010180
10181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10184$as_echo_n "checking for symlink... " >&6; }
10185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010186/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010187#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010188int
10189main ()
10190{
10191void *x=symlink
10192 ;
10193 return 0;
10194}
10195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010197
Matthias Kloseb9621712010-04-24 17:59:49 +000010198$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010199
Matthias Kloseb159a552010-04-25 21:00:44 +000010200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010201$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010205
10206fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10209$as_echo_n "checking for fchdir... " >&6; }
10210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010211/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010212#include <unistd.h>
10213int
10214main ()
10215{
10216void *x=fchdir
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öwisa64988c2003-09-20 15:30:20 +000010222
Matthias Kloseb9621712010-04-24 17:59:49 +000010223$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fsync" >&5
10234$as_echo_n "checking for fsync... " >&6; }
10235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010237#include <unistd.h>
10238int
10239main ()
10240{
10241void *x=fsync
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öwisa64988c2003-09-20 15:30:20 +000010247
Matthias Kloseb9621712010-04-24 17:59:49 +000010248$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 fdatasync" >&5
10259$as_echo_n "checking for fdatasync... " >&6; }
10260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010261/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010262#include <unistd.h>
10263int
10264main ()
10265{
10266void *x=fdatasync
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öwisa64988c2003-09-20 15:30:20 +000010272
Matthias Kloseb9621712010-04-24 17:59:49 +000010273$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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 epoll" >&5
10284$as_echo_n "checking for epoll... " >&6; }
10285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010286/* end confdefs.h. */
10287#include <sys/epoll.h>
10288int
10289main ()
10290{
10291void *x=epoll_create
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öwisc8ad7cc2002-11-11 13:23:45 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010305
10306fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10309$as_echo_n "checking for epoll_create1... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10311/* end confdefs.h. */
10312#include <sys/epoll.h>
10313int
10314main ()
10315{
10316void *x=epoll_create1
10317 ;
10318 return 0;
10319}
10320_ACEOF
10321if ac_fn_c_try_compile "$LINENO"; then :
10322
10323$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10324
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10326$as_echo "yes" >&6; }
10327else
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330
10331fi
10332rm -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 kqueue" >&5
10334$as_echo_n "checking for kqueue... " >&6; }
10335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010336/* end confdefs.h. */
10337
10338#include <sys/types.h>
10339#include <sys/event.h>
10340
10341int
10342main ()
10343{
10344int x=kqueue()
10345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010352
Matthias Kloseb159a552010-04-25 21:00:44 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010354$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010358
10359fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010361# On some systems (eg. FreeBSD 5), we would find a definition of the
10362# functions ctermid_r, setgroups in the library, but no prototype
10363# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10364# address to avoid compiler warnings and potential miscompilations
10365# because of the missing prototypes.
10366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10368$as_echo_n "checking for ctermid_r... " >&6; }
10369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010370/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010371
Martin v. Löwisd5843682002-11-21 20:41:28 +000010372#include <stdio.h>
10373
Martin v. Löwisd5843682002-11-21 20:41:28 +000010374int
10375main ()
10376{
10377void* p = ctermid_r
10378 ;
10379 return 0;
10380}
10381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010382if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010383
Matthias Kloseb9621712010-04-24 17:59:49 +000010384$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010385
Matthias Kloseb159a552010-04-25 21:00:44 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010388else
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010391
10392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10394
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10396$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010397if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010398 $as_echo_n "(cached) " >&6
10399else
10400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010401/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010402#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010403int
10404main ()
10405{
10406void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010407
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010413 ac_cv_flock_decl=yes
10414else
10415 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010416
10417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010419
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010420fi
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10422$as_echo "$ac_cv_flock_decl" >&6; }
10423if test "x${ac_cv_flock_decl}" = xyes; then
10424 for ac_func in flock
10425do :
10426 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010427if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010428 cat >>confdefs.h <<_ACEOF
10429#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010430_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010431
Antoine Pitroua3000072010-09-07 14:52:42 +000010432else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010434$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010435if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010436 $as_echo_n "(cached) " >&6
10437else
10438 ac_check_lib_save_LIBS=$LIBS
10439LIBS="-lbsd $LIBS"
10440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10441/* end confdefs.h. */
10442
10443/* Override any GCC internal prototype to avoid an error.
10444 Use char because int might match the return type of a GCC
10445 builtin and then its argument prototype would still apply. */
10446#ifdef __cplusplus
10447extern "C"
10448#endif
10449char flock ();
10450int
10451main ()
10452{
10453return flock ();
10454 ;
10455 return 0;
10456}
10457_ACEOF
10458if ac_fn_c_try_link "$LINENO"; then :
10459 ac_cv_lib_bsd_flock=yes
10460else
10461 ac_cv_lib_bsd_flock=no
10462fi
10463rm -f core conftest.err conftest.$ac_objext \
10464 conftest$ac_exeext conftest.$ac_ext
10465LIBS=$ac_check_lib_save_LIBS
10466fi
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10468$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010469if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010470 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010471
10472
10473$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10474
10475
10476fi
10477
10478
10479fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010480done
10481
Antoine Pitroua3000072010-09-07 14:52:42 +000010482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10485$as_echo_n "checking for getpagesize... " >&6; }
10486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010488
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010489#include <unistd.h>
10490
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010491int
10492main ()
10493{
10494void* p = getpagesize
10495 ;
10496 return 0;
10497}
10498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010500
Matthias Kloseb9621712010-04-24 17:59:49 +000010501$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010502
Matthias Kloseb159a552010-04-25 21:00:44 +000010503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010504$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010505else
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010508
10509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010511
Victor Stinner984890f2011-11-24 13:53:38 +010010512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10513$as_echo_n "checking for broken unsetenv... " >&6; }
10514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10515/* end confdefs.h. */
10516
10517#include <stdlib.h>
10518
10519int
10520main ()
10521{
10522int res = unsetenv("DUMMY")
10523 ;
10524 return 0;
10525}
10526_ACEOF
10527if ac_fn_c_try_compile "$LINENO"; then :
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530else
10531
10532$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10533
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10535$as_echo "yes" >&6; }
10536
10537fi
10538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10539
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010540for ac_prog in true
10541do
10542 # Extract the first word of "$ac_prog", so it can be a program name with args.
10543set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010546if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548else
10549 if test -n "$TRUE"; then
10550 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10551else
10552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10553for as_dir in $PATH
10554do
10555 IFS=$as_save_IFS
10556 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010558 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 +000010559 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 $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 +000010561 break 2
10562 fi
10563done
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010566
10567fi
10568fi
10569TRUE=$ac_cv_prog_TRUE
10570if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10572$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576fi
10577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010579 test -n "$TRUE" && break
10580done
10581test -n "$TRUE" || TRUE="/bin/true"
10582
10583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10585$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010586if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010588else
10589 ac_check_lib_save_LIBS=$LIBS
10590LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010592/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594/* Override any GCC internal prototype to avoid an error.
10595 Use char because int might match the return type of a GCC
10596 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010597#ifdef __cplusplus
10598extern "C"
10599#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010600char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010601int
10602main ()
10603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010605 ;
10606 return 0;
10607}
10608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010610 ac_cv_lib_c_inet_aton=yes
10611else
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010614rm -f core conftest.err conftest.$ac_objext \
10615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010616LIBS=$ac_check_lib_save_LIBS
10617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10619$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010620if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010622else
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10624$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010625if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010627else
10628 ac_check_lib_save_LIBS=$LIBS
10629LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633/* Override any GCC internal prototype to avoid an error.
10634 Use char because int might match the return type of a GCC
10635 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010636#ifdef __cplusplus
10637extern "C"
10638#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010639char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010640int
10641main ()
10642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010644 ;
10645 return 0;
10646}
10647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010649 ac_cv_lib_resolv_inet_aton=yes
10650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010653rm -f core conftest.err conftest.$ac_objext \
10654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010655LIBS=$ac_check_lib_save_LIBS
10656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10658$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010659if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010660 cat >>confdefs.h <<_ACEOF
10661#define HAVE_LIBRESOLV 1
10662_ACEOF
10663
10664 LIBS="-lresolv $LIBS"
10665
10666fi
10667
10668
10669fi
10670
10671
Christian Heimesd0764e22007-12-04 15:00:33 +000010672# On Tru64, chflags seems to be present, but calling it will
10673# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10675$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010676if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010678else
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010680 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010683/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010684
Christian Heimesd0764e22007-12-04 15:00:33 +000010685#include <sys/stat.h>
10686#include <unistd.h>
10687int main(int argc, char*argv[])
10688{
10689 if(chflags(argv[0], 0) != 0)
10690 return 1;
10691 return 0;
10692}
Ned Deily3eb67d52011-06-28 00:00:28 -070010693
Christian Heimesd0764e22007-12-04 15:00:33 +000010694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010696 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010702fi
10703
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010704
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10707$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010708if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010710if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010711 ac_cv_have_chflags="yes"
10712else
10713 ac_cv_have_chflags="no"
10714fi
10715
10716fi
10717if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010718
Matthias Kloseb9621712010-04-24 17:59:49 +000010719$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010720
10721fi
10722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10724$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010725if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010729 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010730else
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010732/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010733
Christian Heimesd0764e22007-12-04 15:00:33 +000010734#include <sys/stat.h>
10735#include <unistd.h>
10736int main(int argc, char*argv[])
10737{
10738 if(lchflags(argv[0], 0) != 0)
10739 return 1;
10740 return 0;
10741}
Ned Deily3eb67d52011-06-28 00:00:28 -070010742
Christian Heimesd0764e22007-12-04 15:00:33 +000010743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010744if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010745 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010746else
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10750 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010751fi
10752
10753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10756$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010757if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010759if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010760 ac_cv_have_lchflags="yes"
10761else
10762 ac_cv_have_lchflags="no"
10763fi
10764
10765fi
10766if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010769
10770fi
10771
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010772case $ac_sys_system/$ac_sys_release in
10773Darwin/*)
10774 _CUR_CFLAGS="${CFLAGS}"
10775 _CUR_LDFLAGS="${LDFLAGS}"
10776 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10777 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10778 ;;
10779esac
10780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10782$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010783if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010785else
10786 ac_check_lib_save_LIBS=$LIBS
10787LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010789/* end confdefs.h. */
10790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791/* Override any GCC internal prototype to avoid an error.
10792 Use char because int might match the return type of a GCC
10793 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010794#ifdef __cplusplus
10795extern "C"
10796#endif
10797char inflateCopy ();
10798int
10799main ()
10800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010802 ;
10803 return 0;
10804}
10805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010806if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010807 ac_cv_lib_z_inflateCopy=yes
10808else
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010811rm -f core conftest.err conftest.$ac_objext \
10812 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010813LIBS=$ac_check_lib_save_LIBS
10814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10816$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010817if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010818
Matthias Kloseb9621712010-04-24 17:59:49 +000010819$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010820
10821fi
10822
10823
10824case $ac_sys_system/$ac_sys_release in
10825Darwin/*)
10826 CFLAGS="${_CUR_CFLAGS}"
10827 LDFLAGS="${_CUR_LDFLAGS}"
10828 ;;
10829esac
10830
Matthias Kloseb9621712010-04-24 17:59:49 +000010831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10832$as_echo_n "checking for hstrerror... " >&6; }
10833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010835
Martin v. Löwise9416172003-05-03 10:12:45 +000010836#include <netdb.h>
10837
Martin v. Löwise9416172003-05-03 10:12:45 +000010838int
10839main ()
10840{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010841void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010842 ;
10843 return 0;
10844}
10845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010847
Matthias Kloseb9621712010-04-24 17:59:49 +000010848$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010849
Matthias Kloseb159a552010-04-25 21:00:44 +000010850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010852else
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10854$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010855
10856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010857rm -f core conftest.err conftest.$ac_objext \
10858 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10861$as_echo_n "checking for inet_aton... " >&6; }
10862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010863/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010864
Martin v. Löwis86d66262006-02-17 08:40:11 +000010865#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010866#include <sys/socket.h>
10867#include <netinet/in.h>
10868#include <arpa/inet.h>
10869
Martin v. Löwise9416172003-05-03 10:12:45 +000010870int
10871main ()
10872{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010873void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010874 ;
10875 return 0;
10876}
10877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010879
Matthias Kloseb9621712010-04-24 17:59:49 +000010880$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010881
Matthias Kloseb159a552010-04-25 21:00:44 +000010882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010884else
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010887
10888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010889rm -f core conftest.err conftest.$ac_objext \
10890 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10893$as_echo_n "checking for inet_pton... " >&6; }
10894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010895/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010896
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010897#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010898#include <sys/socket.h>
10899#include <netinet/in.h>
10900#include <arpa/inet.h>
10901
Martin v. Löwise9416172003-05-03 10:12:45 +000010902int
10903main ()
10904{
10905void* p = inet_pton
10906 ;
10907 return 0;
10908}
10909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010910if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010913
Matthias Kloseb159a552010-04-25 21:00:44 +000010914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010915$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010916else
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10918$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010919
10920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010922
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010923# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10925$as_echo_n "checking for setgroups... " >&6; }
10926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010927/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010928
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010929#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010930#ifdef HAVE_GRP_H
10931#include <grp.h>
10932#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010933
Martin v. Löwisd5843682002-11-21 20:41:28 +000010934int
10935main ()
10936{
10937void* p = setgroups
10938 ;
10939 return 0;
10940}
10941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010945
Matthias Kloseb159a552010-04-25 21:00:44 +000010946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010948else
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10950$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010951
10952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010954
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010955# check for openpty and forkpty
10956
10957for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010958do :
10959 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010960if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010963_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10967$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010968if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010970else
Martin v. Löwis11437992002-04-12 09:54:03 +000010971 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010972LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976/* Override any GCC internal prototype to avoid an error.
10977 Use char because int might match the return type of a GCC
10978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010979#ifdef __cplusplus
10980extern "C"
10981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010982char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010983int
10984main ()
10985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010987 ;
10988 return 0;
10989}
10990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010996rm -f core conftest.err conftest.$ac_objext \
10997 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010998LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11001$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011002if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011004 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011005else
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11007$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011008if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011009 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011010else
11011 ac_check_lib_save_LIBS=$LIBS
11012LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011014/* end confdefs.h. */
11015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016/* Override any GCC internal prototype to avoid an error.
11017 Use char because int might match the return type of a GCC
11018 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011019#ifdef __cplusplus
11020extern "C"
11021#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011022char openpty ();
11023int
11024main ()
11025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011027 ;
11028 return 0;
11029}
11030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011032 ac_cv_lib_bsd_openpty=yes
11033else
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011036rm -f core conftest.err conftest.$ac_objext \
11037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011038LIBS=$ac_check_lib_save_LIBS
11039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11041$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011042if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011044 LIBS="$LIBS -lbsd"
11045fi
11046
11047
11048fi
11049
Fred Drake8cef4cf2000-06-28 16:40:38 +000011050
11051fi
11052done
11053
11054for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011055do :
11056 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011057if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011058 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011059#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011060_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011061
Fred Drake8cef4cf2000-06-28 16:40:38 +000011062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11064$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011065if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011067else
Martin v. Löwis11437992002-04-12 09:54:03 +000011068 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011069LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073/* Override any GCC internal prototype to avoid an error.
11074 Use char because int might match the return type of a GCC
11075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011076#ifdef __cplusplus
11077extern "C"
11078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011079char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011080int
11081main ()
11082{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011093rm -f core conftest.err conftest.$ac_objext \
11094 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011095LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11098$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011099if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011101 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11104$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011105if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011106 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011107else
11108 ac_check_lib_save_LIBS=$LIBS
11109LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011111/* end confdefs.h. */
11112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113/* Override any GCC internal prototype to avoid an error.
11114 Use char because int might match the return type of a GCC
11115 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011116#ifdef __cplusplus
11117extern "C"
11118#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011119char forkpty ();
11120int
11121main ()
11122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011124 ;
11125 return 0;
11126}
11127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011129 ac_cv_lib_bsd_forkpty=yes
11130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011133rm -f core conftest.err conftest.$ac_objext \
11134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011135LIBS=$ac_check_lib_save_LIBS
11136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11138$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011139if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011141 LIBS="$LIBS -lbsd"
11142fi
11143
11144
11145fi
11146
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147
11148fi
11149done
11150
Jack Jansendd19cf82001-12-06 22:36:17 +000011151
Christian Heimesb186d002008-03-18 15:15:01 +000011152# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011153for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011154do :
11155 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011156if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011158#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011159_ACEOF
11160
11161fi
11162done
11163
11164
Michael W. Hudson54241132001-12-07 15:38:26 +000011165# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011166for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011167do :
11168 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11169ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011170if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011172#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011173_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011174
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011175fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011176done
11177
Michael W. Hudson54241132001-12-07 15:38:26 +000011178
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011179ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011180if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011181 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011182
Martin v. Löwis1142de32002-03-29 16:28:31 +000011183else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011185 *" dup2.$ac_objext "* ) ;;
11186 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011187 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011188esac
11189
Martin v. Löwis1142de32002-03-29 16:28:31 +000011190fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011191
11192ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011193if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011194 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11195
11196else
11197 case " $LIBOBJS " in
11198 *" getcwd.$ac_objext "* ) ;;
11199 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11200 ;;
11201esac
11202
11203fi
11204
11205ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011206if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011207 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11208
11209else
11210 case " $LIBOBJS " in
11211 *" strdup.$ac_objext "* ) ;;
11212 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11213 ;;
11214esac
11215
11216fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011217
11218
11219for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011220do :
11221 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011222if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011224#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011227/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011228#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011232getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011240
Guido van Rossum627b2d71993-12-24 10:39:16 +000011241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011243
Guido van Rossum627b2d71993-12-24 10:39:16 +000011244fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011245done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011246
Jack Jansen150753c2003-03-29 22:07:47 +000011247for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011248do :
11249 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011250if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011252#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011255/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011256#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011257int
11258main ()
11259{
11260setpgrp(0,0);
11261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011268
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011271
11272fi
11273done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011274
Thomas Wouters3a584202000-08-05 23:28:51 +000011275for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011276do :
11277 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011278if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011283/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011284#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011285int
11286main ()
11287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011288gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011289 ;
11290 return 0;
11291}
11292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if ac_fn_c_try_compile "$LINENO"; then :
11294
Guido van Rossum627b2d71993-12-24 10:39:16 +000011295else
Skip Montanaro6dead952003-09-25 14:50:04 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
Guido van Rossum627b2d71993-12-24 10:39:16 +000011300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011303fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011304done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011305
Michael W. Hudson54241132001-12-07 15:38:26 +000011306
Victor Stinnere0be4232011-10-25 13:06:09 +020011307for ac_func in clock_gettime
11308do :
11309 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11310if test "x$ac_cv_func_clock_gettime" = xyes; then :
11311 cat >>confdefs.h <<_ACEOF
11312#define HAVE_CLOCK_GETTIME 1
11313_ACEOF
11314
11315else
11316
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11318$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11319if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11320 $as_echo_n "(cached) " >&6
11321else
11322 ac_check_lib_save_LIBS=$LIBS
11323LIBS="-lrt $LIBS"
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325/* end confdefs.h. */
11326
11327/* Override any GCC internal prototype to avoid an error.
11328 Use char because int might match the return type of a GCC
11329 builtin and then its argument prototype would still apply. */
11330#ifdef __cplusplus
11331extern "C"
11332#endif
11333char clock_gettime ();
11334int
11335main ()
11336{
11337return clock_gettime ();
11338 ;
11339 return 0;
11340}
11341_ACEOF
11342if ac_fn_c_try_link "$LINENO"; then :
11343 ac_cv_lib_rt_clock_gettime=yes
11344else
11345 ac_cv_lib_rt_clock_gettime=no
11346fi
11347rm -f core conftest.err conftest.$ac_objext \
11348 conftest$ac_exeext conftest.$ac_ext
11349LIBS=$ac_check_lib_save_LIBS
11350fi
11351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11352$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11353if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11354
11355 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11356
11357
11358$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11359
11360
11361fi
11362
11363
11364fi
11365done
11366
11367
11368for ac_func in clock_getres
11369do :
11370 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11371if test "x$ac_cv_func_clock_getres" = xyes; then :
11372 cat >>confdefs.h <<_ACEOF
11373#define HAVE_CLOCK_GETRES 1
11374_ACEOF
11375
11376else
11377
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11379$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11380if ${ac_cv_lib_rt_clock_getres+:} false; then :
11381 $as_echo_n "(cached) " >&6
11382else
11383 ac_check_lib_save_LIBS=$LIBS
11384LIBS="-lrt $LIBS"
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11386/* end confdefs.h. */
11387
11388/* Override any GCC internal prototype to avoid an error.
11389 Use char because int might match the return type of a GCC
11390 builtin and then its argument prototype would still apply. */
11391#ifdef __cplusplus
11392extern "C"
11393#endif
11394char clock_getres ();
11395int
11396main ()
11397{
11398return clock_getres ();
11399 ;
11400 return 0;
11401}
11402_ACEOF
11403if ac_fn_c_try_link "$LINENO"; then :
11404 ac_cv_lib_rt_clock_getres=yes
11405else
11406 ac_cv_lib_rt_clock_getres=no
11407fi
11408rm -f core conftest.err conftest.$ac_objext \
11409 conftest$ac_exeext conftest.$ac_ext
11410LIBS=$ac_check_lib_save_LIBS
11411fi
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11413$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11414if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11415
11416 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11417
11418
11419fi
11420
11421
11422fi
11423done
11424
11425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11427$as_echo_n "checking for major... " >&6; }
11428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011430
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011431#if defined(MAJOR_IN_MKDEV)
11432#include <sys/mkdev.h>
11433#elif defined(MAJOR_IN_SYSMACROS)
11434#include <sys/sysmacros.h>
11435#else
11436#include <sys/types.h>
11437#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011438
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011439int
11440main ()
11441{
11442
11443 makedev(major(0),minor(0));
11444
11445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011450
11451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11455$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011456
11457else
Skip Montanaro6dead952003-09-25 14:50:04 +000011458
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011461
11462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011463rm -f core conftest.err conftest.$ac_objext \
11464 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011465
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011466# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011467# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11469$as_echo_n "checking for getaddrinfo... " >&6; }
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011472
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011473#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011474#include <sys/socket.h>
11475#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011476#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011477
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011481getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 ;
11483 return 0;
11484}
11485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011486if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011487 have_getaddrinfo=yes
11488else
Matthias Kloseb9621712010-04-24 17:59:49 +000011489 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011491rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11494$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011495if test $have_getaddrinfo = yes
11496then
Matthias Kloseb9621712010-04-24 17:59:49 +000011497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11498$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011499 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011501else
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011503
11504if test "${enable_ipv6+set}" = set; then
11505 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11506else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011507 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011508fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011509else
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011512
11513#include <sys/types.h>
11514#include <netdb.h>
11515#include <string.h>
11516#include <sys/socket.h>
11517#include <netinet/in.h>
11518
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011519int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011520{
11521 int passive, gaierr, inet4 = 0, inet6 = 0;
11522 struct addrinfo hints, *ai, *aitop;
11523 char straddr[INET6_ADDRSTRLEN], strport[16];
11524
11525 for (passive = 0; passive <= 1; passive++) {
11526 memset(&hints, 0, sizeof(hints));
11527 hints.ai_family = AF_UNSPEC;
11528 hints.ai_flags = passive ? AI_PASSIVE : 0;
11529 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011530 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011531 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11532 (void)gai_strerror(gaierr);
11533 goto bad;
11534 }
11535 for (ai = aitop; ai; ai = ai->ai_next) {
11536 if (ai->ai_addr == NULL ||
11537 ai->ai_addrlen == 0 ||
11538 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11539 straddr, sizeof(straddr), strport, sizeof(strport),
11540 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11541 goto bad;
11542 }
11543 switch (ai->ai_family) {
11544 case AF_INET:
11545 if (strcmp(strport, "54321") != 0) {
11546 goto bad;
11547 }
11548 if (passive) {
11549 if (strcmp(straddr, "0.0.0.0") != 0) {
11550 goto bad;
11551 }
11552 } else {
11553 if (strcmp(straddr, "127.0.0.1") != 0) {
11554 goto bad;
11555 }
11556 }
11557 inet4++;
11558 break;
11559 case AF_INET6:
11560 if (strcmp(strport, "54321") != 0) {
11561 goto bad;
11562 }
11563 if (passive) {
11564 if (strcmp(straddr, "::") != 0) {
11565 goto bad;
11566 }
11567 } else {
11568 if (strcmp(straddr, "::1") != 0) {
11569 goto bad;
11570 }
11571 }
11572 inet6++;
11573 break;
11574 case AF_UNSPEC:
11575 goto bad;
11576 break;
11577 default:
11578 /* another family support? */
11579 break;
11580 }
11581 }
11582 }
11583
11584 if (!(inet4 == 0 || inet4 == 2))
11585 goto bad;
11586 if (!(inet6 == 0 || inet6 == 2))
11587 goto bad;
11588
11589 if (aitop)
11590 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011591 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011592
11593 bad:
11594 if (aitop)
11595 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011596 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011597}
11598
Martin v. Löwis11437992002-04-12 09:54:03 +000011599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011600if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011601 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011608
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011609fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011610
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11614$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11615
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011616if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011617then
11618 if test $ipv6 = yes
11619 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011620 echo 'Fatal: You must get working getaddrinfo() function.'
11621 echo ' or you can specify "--disable-ipv6"'.
11622 exit 1
11623 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011624else
Martin v. Löwis11437992002-04-12 09:54:03 +000011625
Matthias Kloseb9621712010-04-24 17:59:49 +000011626$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011627
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011628fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011629
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011630for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011631do :
11632 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011633if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011635#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011636_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011637
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011638fi
11639done
11640
Michael W. Hudson54241132001-12-07 15:38:26 +000011641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011642# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11644$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011645if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011649/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011650#include <sys/types.h>
11651#include <sys/time.h>
11652#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011653
Martin v. Löwis11437992002-04-12 09:54:03 +000011654int
11655main ()
11656{
11657if ((struct tm *) 0)
11658return 0;
11659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011664 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11671$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011672if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011673
Matthias Kloseb9621712010-04-24 17:59:49 +000011674$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011675
11676fi
11677
Matthias Kloseb9621712010-04-24 17:59:49 +000011678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11679$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011680if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011682else
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011685#include <sys/types.h>
11686#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
Martin v. Löwis11437992002-04-12 09:54:03 +000011688int
11689main ()
11690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011691struct tm tm;
11692 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011693 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011694 ;
11695 return 0;
11696}
11697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011699 ac_cv_struct_tm=time.h
11700else
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11706$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011707if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011710
11711fi
11712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713ac_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 +000011714#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716"
Victor Stinnere0be4232011-10-25 13:06:09 +020011717if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011718
11719cat >>confdefs.h <<_ACEOF
11720#define HAVE_STRUCT_TM_TM_ZONE 1
11721_ACEOF
11722
11723
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011724fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011725
Martin v. Löwis11437992002-04-12 09:54:03 +000011726if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729
11730else
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11732"
Victor Stinnere0be4232011-10-25 13:06:09 +020011733if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011735else
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011737fi
11738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011739cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011740#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011741_ACEOF
11742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11744$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011745if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011749/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011750#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011751#if !HAVE_DECL_TZNAME
11752extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011754
Martin v. Löwis11437992002-04-12 09:54:03 +000011755int
11756main ()
11757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011758return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 ;
11760 return 0;
11761}
11762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011763if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011764 ac_cv_var_tzname=yes
11765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011768rm -f core conftest.err conftest.$ac_objext \
11769 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11772$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011773 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777 fi
11778fi
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780ac_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 +020011781if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011782
11783cat >>confdefs.h <<_ACEOF
11784#define HAVE_STRUCT_STAT_ST_RDEV 1
11785_ACEOF
11786
11787
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011788fi
11789
Matthias Kloseb9621712010-04-24 17:59:49 +000011790ac_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 +020011791if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011792
Martin v. Löwis11437992002-04-12 09:54:03 +000011793cat >>confdefs.h <<_ACEOF
11794#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11795_ACEOF
11796
11797
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011798fi
11799
Matthias Kloseb9621712010-04-24 17:59:49 +000011800ac_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 +020011801if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011802
11803cat >>confdefs.h <<_ACEOF
11804#define HAVE_STRUCT_STAT_ST_FLAGS 1
11805_ACEOF
11806
11807
11808fi
11809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810ac_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 +020011811if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011812
11813cat >>confdefs.h <<_ACEOF
11814#define HAVE_STRUCT_STAT_ST_GEN 1
11815_ACEOF
11816
11817
11818fi
11819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820ac_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 +020011821if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011822
11823cat >>confdefs.h <<_ACEOF
11824#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11825_ACEOF
11826
11827
11828fi
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830ac_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 +020011831if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011832
Martin v. Löwis11437992002-04-12 09:54:03 +000011833cat >>confdefs.h <<_ACEOF
11834#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11835_ACEOF
11836
11837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011839
11840else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011841 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011842 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11844 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011845esac
11846
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011847fi
11848
Michael W. Hudson54241132001-12-07 15:38:26 +000011849
Martin v. Löwis11437992002-04-12 09:54:03 +000011850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11852$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011853if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855else
Matthias Kloseb159a552010-04-25 21:00:44 +000011856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011858/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011859#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011860int
11861main ()
11862{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011863return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 ;
11865 return 0;
11866}
11867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011868if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011869 ac_cv_header_time_altzone=yes
11870else
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011875fi
11876
Matthias Kloseb9621712010-04-24 17:59:49 +000011877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11878$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011882
11883fi
11884
Guido van Rossumda88dad1995-01-26 00:46:29 +000011885was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11887$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011889/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011890
11891#include <sys/types.h>
11892#include <sys/select.h>
11893#include <sys/time.h>
11894
Martin v. Löwis11437992002-04-12 09:54:03 +000011895int
11896main ()
11897{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011898;
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 ;
11900 return 0;
11901}
11902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011903if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011904
11905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011907
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011908 was_it_defined=yes
11909
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11913$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011914
Matthias Kloseb9621712010-04-24 17:59:49 +000011915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11916$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011917if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011919else
Matthias Kloseb9621712010-04-24 17:59:49 +000011920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011921/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011922#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011923int
11924main ()
11925{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011926struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 ;
11928 return 0;
11929}
11930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011931if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011932 ac_cv_struct_addrinfo=yes
11933else
Matthias Kloseb9621712010-04-24 17:59:49 +000011934 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11937fi
11938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11940$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011941if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011944
11945fi
11946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11948$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011949if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011953/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011954
11955# include <sys/types.h>
11956# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011957int
11958main ()
11959{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011960struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011961 ;
11962 return 0;
11963}
11964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011966 ac_cv_struct_sockaddr_storage=yes
11967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11971fi
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11974$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011975if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978
11979fi
11980
Guido van Rossum627b2d71993-12-24 10:39:16 +000011981# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11984$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011987else
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011991int
11992main ()
11993{
11994static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020011995test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000011996
11997 ;
11998 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011999}
Martin v. Löwis11437992002-04-12 09:54:03 +000012000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012001if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012002 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12009$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012
12013fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012014
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12016$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012017if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012019else
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012021/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022
Martin v. Löwis11437992002-04-12 09:54:03 +000012023int
12024main ()
12025{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012026/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012027#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012028 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012030 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000012031 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012032 char const *const *pcpcc;
12033 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012034 /* NEC SVR4.0.2 mips cc rejects this. */
12035 struct point {int x, y;};
12036 static struct point const zero = {0,0};
12037 /* AIX XL C 1.02.0.0 rejects this.
12038 It does not let you subtract one const X* pointer from another in
12039 an arm of an if-expression whose if-part is not a constant
12040 expression */
12041 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012044 ++pcpcc;
12045 ppc = (char**) pcpcc;
12046 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012047 { /* SCO 3.2v4 cc rejects this. */
12048 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000012049 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012050
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 }
12054 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12055 int x[] = {25, 17};
12056 const int *foo = &x[0];
12057 ++foo;
12058 }
12059 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12060 typedef const int *iptr;
12061 iptr p = 0;
12062 ++p;
12063 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012064 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012065 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012066 struct s { int j; const int *ap[3]; };
12067 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 }
12069 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12070 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012073 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012074#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076 ;
12077 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012078}
Martin v. Löwis11437992002-04-12 09:54:03 +000012079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012080if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081 ac_cv_c_const=yes
12082else
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12088$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012090
Matthias Kloseb9621712010-04-24 17:59:49 +000012091$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012092
12093fi
12094
Michael W. Hudson54241132001-12-07 15:38:26 +000012095
Guido van Rossumda88dad1995-01-26 00:46:29 +000012096works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12098$as_echo_n "checking for working volatile... " >&6; }
12099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102int
12103main ()
12104{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012111 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012112else
Skip Montanaro6dead952003-09-25 14:50:04 +000012113
Matthias Kloseb9621712010-04-24 17:59:49 +000012114$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012115
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012116
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12120$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012121
Guido van Rossumda88dad1995-01-26 00:46:29 +000012122works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12124$as_echo_n "checking for working signed char... " >&6; }
12125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012126/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012127
Martin v. Löwis11437992002-04-12 09:54:03 +000012128int
12129main ()
12130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 ;
12133 return 0;
12134}
12135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012136if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012137 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012138else
Skip Montanaro6dead952003-09-25 14:50:04 +000012139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012141
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012142
Guido van Rossum7f43da71994-08-01 12:15:30 +000012143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12146$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012147
Guido van Rossumda88dad1995-01-26 00:46:29 +000012148have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12150$as_echo_n "checking for prototypes... " >&6; }
12151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012152/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012153int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012154int
12155main ()
12156{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 ;
12159 return 0;
12160}
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012163
Matthias Kloseb9621712010-04-24 17:59:49 +000012164$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Matthias Kloseb159a552010-04-25 21:00:44 +000012166 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12170$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171
Guido van Rossumda88dad1995-01-26 00:46:29 +000012172works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12174$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012176/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012177
12178#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012179int foo(int x, ...) {
12180 va_list va;
12181 va_start(va, x);
12182 va_arg(va, int);
12183 va_arg(va, char *);
12184 va_arg(va, double);
12185 return 0;
12186}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188int
12189main ()
12190{
Guido van Rossum90eea071996-08-30 20:58:57 +000012191return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 ;
12193 return 0;
12194}
12195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012197
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012200
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012201 works=yes
12202
Guido van Rossum627b2d71993-12-24 10:39:16 +000012203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12206$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012207
Martin v. Löwisd6320502004-08-12 13:45:08 +000012208# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12210$as_echo_n "checking for socketpair... " >&6; }
12211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012212/* end confdefs.h. */
12213
12214#include <sys/types.h>
12215#include <sys/socket.h>
12216
12217int
12218main ()
12219{
12220void *x=socketpair
12221 ;
12222 return 0;
12223}
12224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012228
Matthias Kloseb159a552010-04-25 21:00:44 +000012229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012230$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012231else
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12233$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012234
12235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012237
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12240$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012243#include <sys/types.h>
12244#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012245int
12246main ()
12247{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012248struct sockaddr x;
12249x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 ;
12251 return 0;
12252}
12253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254if ac_fn_c_try_compile "$LINENO"; then :
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12256$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012259
12260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012263
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012266
Guido van Rossumda88dad1995-01-26 00:46:29 +000012267va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12269$as_echo_n "checking whether va_list is an array... " >&6; }
12270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272
12273#ifdef HAVE_STDARG_PROTOTYPES
12274#include <stdarg.h>
12275#else
12276#include <varargs.h>
12277#endif
12278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279int
12280main ()
12281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012282va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 ;
12284 return 0;
12285}
12286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012287if ac_fn_c_try_compile "$LINENO"; then :
12288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012289else
Skip Montanaro6dead952003-09-25 14:50:04 +000012290
Martin v. Löwis11437992002-04-12 09:54:03 +000012291
Matthias Kloseb9621712010-04-24 17:59:49 +000012292$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012293
Guido van Rossumda88dad1995-01-26 00:46:29 +000012294 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012295
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12299$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012301# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
12303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012305if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12310$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012311 OLD_CFLAGS=$CFLAGS
12312 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012315
12316# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012317
Martin v. Löwis11437992002-04-12 09:54:03 +000012318int
12319main ()
12320{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012321
12322 char *name;
12323 struct hostent *he, *res;
12324 char buffer[2048];
12325 int buflen = 2048;
12326 int h_errnop;
12327
12328 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
12330 ;
12331 return 0;
12332}
12333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012334if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012337
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Matthias Kloseb9621712010-04-24 17:59:49 +000012339$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12342$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012344else
Skip Montanaro6dead952003-09-25 14:50:04 +000012345
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
12348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12349$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012351/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012352
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012353# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355int
12356main ()
12357{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012358
12359 char *name;
12360 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012361 char buffer[2048];
12362 int buflen = 2048;
12363 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012364
Matthias Kloseb159a552010-04-25 21:00:44 +000012365 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012366
12367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012374
Martin v. Löwis11437992002-04-12 09:54:03 +000012375
Matthias Kloseb159a552010-04-25 21:00:44 +000012376$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012377
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12379$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012380
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012381else
Skip Montanaro6dead952003-09-25 14:50:04 +000012382
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12384$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12386$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388/* end confdefs.h. */
12389
12390# include <netdb.h>
12391
12392int
12393main ()
12394{
12395
12396 char *name;
12397 struct hostent *he;
12398 struct hostent_data data;
12399
12400 (void) gethostbyname_r(name, he, &data);
12401
12402 ;
12403 return 0;
12404}
12405_ACEOF
12406if ac_fn_c_try_compile "$LINENO"; then :
12407
12408 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12409
12410
12411$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12412
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12414$as_echo "yes" >&6; }
12415
12416else
12417
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12419$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012429 CFLAGS=$OLD_CFLAGS
12430
12431else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 for ac_func in gethostbyname
12434do :
12435 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012436if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012439_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012441fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012442done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012443
Michael W. Hudson54241132001-12-07 15:38:26 +000012444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012445fi
12446
Michael W. Hudson54241132001-12-07 15:38:26 +000012447
12448
12449
12450
12451
12452
Guido van Rossum627b2d71993-12-24 10:39:16 +000012453# checks for system services
12454# (none yet)
12455
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012457ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012458if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012459
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012460else
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12462$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012465else
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012467LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471/* Override any GCC internal prototype to avoid an error.
12472 Use char because int might match the return type of a GCC
12473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012474#ifdef __cplusplus
12475extern "C"
12476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012477char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012481return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 ;
12483 return 0;
12484}
12485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012487 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012491rm -f core conftest.err conftest.$ac_objext \
12492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12496$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012497if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 cat >>confdefs.h <<_ACEOF
12499#define HAVE_LIBIEEE 1
12500_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012501
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012502 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012503
Guido van Rossum627b2d71993-12-24 10:39:16 +000012504fi
12505
Michael W. Hudson54241132001-12-07 15:38:26 +000012506
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012507fi
12508
Michael W. Hudson54241132001-12-07 15:38:26 +000012509
Guido van Rossum7f253911997-05-09 02:42:48 +000012510# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12512$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012514# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012517if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012518then
12519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12523$as_echo "yes" >&6; }
12524else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12525$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012526fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012527else
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12529$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530fi
12531
Guido van Rossum7f253911997-05-09 02:42:48 +000012532
Guido van Rossum7f43da71994-08-01 12:15:30 +000012533# check for --with-libm=...
12534
Guido van Rossum563e7081996-09-10 18:20:48 +000012535case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012536Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012537*) LIBM=-lm
12538esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12540$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012543if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012545if test "$withval" = no
12546then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12548$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012549elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012550then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12552$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012553else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012554fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12557$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558fi
12559
Guido van Rossum7f43da71994-08-01 12:15:30 +000012560
12561# check for --with-libc=...
12562
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12564$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012567if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012568 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012569if test "$withval" = no
12570then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12572$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012573elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012574then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12576$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012577else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012578fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12581$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582fi
12583
Guido van Rossum7f43da71994-08-01 12:15:30 +000012584
Stefan Krah1919b7e2012-03-21 18:25:23 +010012585# **************************************
12586# * Check for gcc x64 inline assembler *
12587# **************************************
12588
12589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12590$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12592/* end confdefs.h. */
12593
12594int
12595main ()
12596{
12597
12598 __asm__ __volatile__ ("movq %rcx, %rax");
12599
12600 ;
12601 return 0;
12602}
12603_ACEOF
12604if ac_fn_c_try_compile "$LINENO"; then :
12605 have_gcc_asm_for_x64=yes
12606else
12607 have_gcc_asm_for_x64=no
12608fi
12609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12611$as_echo "$have_gcc_asm_for_x64" >&6; }
12612if test "$have_gcc_asm_for_x64" = yes
12613then
12614
12615$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12616
12617fi
12618
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012619# **************************************************
12620# * Check for various properties of floating point *
12621# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012622
Matthias Kloseb9621712010-04-24 17:59:49 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12624$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012625if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012627else
12628
Matthias Kloseb9621712010-04-24 17:59:49 +000012629if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012630 ac_cv_little_endian_double=no
12631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012633/* end confdefs.h. */
12634
12635#include <string.h>
12636int main() {
12637 double x = 9006104071832581.0;
12638 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12639 return 0;
12640 else
12641 return 1;
12642}
12643
12644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012645if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012646 ac_cv_little_endian_double=yes
12647else
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012652fi
12653
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012654fi
12655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12657$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012658if test "$ac_cv_little_endian_double" = yes
12659then
12660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012662
12663fi
12664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12666$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012669else
12670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012672 ac_cv_big_endian_double=no
12673else
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012675/* end confdefs.h. */
12676
12677#include <string.h>
12678int main() {
12679 double x = 9006104071832581.0;
12680 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12681 return 0;
12682 else
12683 return 1;
12684}
12685
12686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012688 ac_cv_big_endian_double=yes
12689else
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012694fi
12695
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012696fi
12697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12699$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012700if test "$ac_cv_big_endian_double" = yes
12701then
12702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012704
12705fi
12706
12707# Some ARM platforms use a mixed-endian representation for doubles.
12708# While Python doesn't currently have full support for these platforms
12709# (see e.g., issue 1762561), we can at least make sure that float <-> string
12710# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12712$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012715else
12716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012718 ac_cv_mixed_endian_double=no
12719else
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012721/* end confdefs.h. */
12722
12723#include <string.h>
12724int main() {
12725 double x = 9006104071832581.0;
12726 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12727 return 0;
12728 else
12729 return 1;
12730}
12731
12732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012733if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012734 ac_cv_mixed_endian_double=yes
12735else
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12739 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012740fi
12741
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012742fi
12743
Matthias Kloseb9621712010-04-24 17:59:49 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12745$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012746if test "$ac_cv_mixed_endian_double" = yes
12747then
12748
Matthias Kloseb9621712010-04-24 17:59:49 +000012749$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012750
12751fi
12752
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012753# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012754# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012755# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012756# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012757# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012758# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012759
12760# This inline assembler syntax may also work for suncc and icc,
12761# so we try it on all platforms.
12762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12764$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766/* end confdefs.h. */
12767
12768int
12769main ()
12770{
12771
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012772 unsigned short cw;
12773 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12774 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012775
12776 ;
12777 return 0;
12778}
12779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012780if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012781 have_gcc_asm_for_x87=yes
12782else
Matthias Kloseb9621712010-04-24 17:59:49 +000012783 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012784fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12787$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012788if test "$have_gcc_asm_for_x87" = yes
12789then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012792
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012795# Detect whether system arithmetic is subject to x87-style double
12796# rounding issues. The result of this test has little meaning on non
12797# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12798# mode is round-to-nearest and double rounding issues are present, and
12799# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12801$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012802# $BASECFLAGS may affect the result
12803ac_save_cc="$CC"
12804CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012806 ac_cv_x87_double_rounding=no
12807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012809/* end confdefs.h. */
12810
12811#include <stdlib.h>
12812#include <math.h>
12813int main() {
12814 volatile double x, y, z;
12815 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12816 x = 0.99999999999999989; /* 1-2**-53 */
12817 y = 1./x;
12818 if (y != 1.)
12819 exit(0);
12820 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12821 x = 1e16;
12822 y = 2.99999;
12823 z = x + y;
12824 if (z != 1e16+4.)
12825 exit(0);
12826 /* both tests show evidence of double rounding */
12827 exit(1);
12828}
12829
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012832 ac_cv_x87_double_rounding=no
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012838fi
12839
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012840CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12842$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012843if test "$ac_cv_x87_double_rounding" = yes
12844then
12845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012847
12848fi
12849
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012850# ************************************
12851# * Check for mathematical functions *
12852# ************************************
12853
12854LIBS_SAVE=$LIBS
12855LIBS="$LIBS $LIBM"
12856
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012857for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12858do :
12859 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12860ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012861if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012862 cat >>confdefs.h <<_ACEOF
12863#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12864_ACEOF
12865
12866fi
12867done
12868
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012869for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012870do :
12871 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12872ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012873if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012874 cat >>confdefs.h <<_ACEOF
12875#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12876_ACEOF
12877
12878fi
12879done
12880
12881ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12882"
Victor Stinnere0be4232011-10-25 13:06:09 +020012883if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012884 ac_have_decl=1
12885else
12886 ac_have_decl=0
12887fi
12888
12889cat >>confdefs.h <<_ACEOF
12890#define HAVE_DECL_ISINF $ac_have_decl
12891_ACEOF
12892ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12893"
Victor Stinnere0be4232011-10-25 13:06:09 +020012894if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012895 ac_have_decl=1
12896else
12897 ac_have_decl=0
12898fi
12899
12900cat >>confdefs.h <<_ACEOF
12901#define HAVE_DECL_ISNAN $ac_have_decl
12902_ACEOF
12903ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12904"
Victor Stinnere0be4232011-10-25 13:06:09 +020012905if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012906 ac_have_decl=1
12907else
12908 ac_have_decl=0
12909fi
12910
12911cat >>confdefs.h <<_ACEOF
12912#define HAVE_DECL_ISFINITE $ac_have_decl
12913_ACEOF
12914
12915
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012916# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12917# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12919$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012920if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012922else
12923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012925 ac_cv_tanh_preserves_zero_sign=no
12926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012928/* end confdefs.h. */
12929
12930#include <math.h>
12931#include <stdlib.h>
12932int main() {
12933 /* return 0 if either negative zeros don't exist
12934 on this platform or if negative zeros exist
12935 and tanh(-0.) == -0. */
12936 if (atan2(0., -1.) == atan2(-0., -1.) ||
12937 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12938 else exit(1);
12939}
12940
12941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012942if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012943 ac_cv_tanh_preserves_zero_sign=yes
12944else
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012949fi
12950
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012951fi
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12954$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012955if test "$ac_cv_tanh_preserves_zero_sign" = yes
12956then
12957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012959
12960fi
12961
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012962if test "$ac_cv_func_log1p" = yes
12963then
12964 # On some versions of AIX, log1p(-0.) returns 0. instead of
12965 # -0. See issue #9920.
12966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12967$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012968 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012969 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012970else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012971
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012972 if test "$cross_compiling" = yes; then :
12973 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012974else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12976/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012977
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012978 #include <math.h>
12979 #include <stdlib.h>
12980 int main() {
12981 /* Fail if the signs of log1p(-0.) and -0. can be
12982 distinguished. */
12983 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12984 return 0;
12985 else
12986 return 1;
12987 }
12988
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012989_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012990if ac_fn_c_try_run "$LINENO"; then :
12991 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012992else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012993 ac_cv_log1p_drops_zero_sign=yes
12994fi
12995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012997fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012998
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012999fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013000
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13002$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13003fi
13004if test "$ac_cv_log1p_drops_zero_sign" = yes
13005then
13006
13007$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13008
13009fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013010
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013011LIBS=$LIBS_SAVE
13012
Mark Dickinsona614f042009-11-28 12:48:43 +000013013# For multiprocessing module, check that sem_open
13014# actually works. For FreeBSD versions <= 7.2,
13015# the kernel module that provides POSIX semaphores
13016# isn't loaded by default, so an attempt to call
13017# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13019$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013020if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013022else
Matthias Kloseb9621712010-04-24 17:59:49 +000013023 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013024 ac_cv_posix_semaphores_enabled=yes
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013027/* end confdefs.h. */
13028
13029#include <unistd.h>
13030#include <fcntl.h>
13031#include <stdio.h>
13032#include <semaphore.h>
13033#include <sys/stat.h>
13034
13035int main(void) {
13036 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13037 if (a == SEM_FAILED) {
13038 perror("sem_open");
13039 return 1;
13040 }
13041 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013042 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013043 return 0;
13044}
13045
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013048 ac_cv_posix_semaphores_enabled=yes
13049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13053 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013054fi
13055
13056
Mark Dickinsona614f042009-11-28 12:48:43 +000013057fi
13058
Matthias Kloseb9621712010-04-24 17:59:49 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13060$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013061if test $ac_cv_posix_semaphores_enabled = no
13062then
13063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013065
13066fi
13067
Mark Dickinson10683072009-04-18 21:18:19 +000013068# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13070$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013071if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013073else
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013075 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013078/* end confdefs.h. */
13079
13080#include <unistd.h>
13081#include <fcntl.h>
13082#include <stdio.h>
13083#include <semaphore.h>
13084#include <sys/stat.h>
13085
13086int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013087 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013088 int count;
13089 int res;
13090 if(a==SEM_FAILED){
13091 perror("sem_open");
13092 return 1;
13093
13094 }
13095 res = sem_getvalue(a, &count);
13096 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013097 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013098 return res==-1 ? 1 : 0;
13099}
13100
Mark Dickinson10683072009-04-18 21:18:19 +000013101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013103 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13108 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013109fi
13110
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13115$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116if test $ac_cv_broken_sem_getvalue = yes
13117then
13118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013120
13121fi
13122
Mark Dickinsonbd792642009-03-18 20:06:12 +000013123# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13125$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013126# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013127if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013128 enableval=$enable_big_digits; case $enable_big_digits in
13129yes)
13130 enable_big_digits=30 ;;
13131no)
13132 enable_big_digits=15 ;;
1313315|30)
13134 ;;
13135*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013136 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 +000013137esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13139$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013140
13141cat >>confdefs.h <<_ACEOF
13142#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13143_ACEOF
13144
13145
13146else
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13148$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013149fi
13150
13151
Guido van Rossumef2255b2000-03-10 22:30:29 +000013152# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013153ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013154if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013155
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013158
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013159 wchar_h="yes"
13160
Guido van Rossumef2255b2000-03-10 22:30:29 +000013161else
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013163
13164fi
13165
Michael W. Hudson54241132001-12-07 15:38:26 +000013166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013168# determine wchar_t size
13169if test "$wchar_h" = yes
13170then
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13174# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13176$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013177if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013179else
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13181"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Martin v. Löwis11437992002-04-12 09:54:03 +000013183else
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 if test "$ac_cv_type_wchar_t" = yes; then
13185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13186$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013187as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013188See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013189 else
13190 ac_cv_sizeof_wchar_t=0
13191 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013193
Martin v. Löwis11437992002-04-12 09:54:03 +000013194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13196$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197
13198
13199
Martin v. Löwis11437992002-04-12 09:54:03 +000013200cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013201#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013202_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013203
Michael W. Hudson54241132001-12-07 15:38:26 +000013204
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013205fi
13206
Matthias Kloseb9621712010-04-24 17:59:49 +000013207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13208$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013209have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013211/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013212
13213#include <tcl.h>
13214#if TCL_UTF_MAX != 6
13215# error "NOT UCS4_TCL"
13216#endif
13217int
13218main ()
13219{
13220
13221 ;
13222 return 0;
13223}
13224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013226
13227
Matthias Kloseb9621712010-04-24 17:59:49 +000013228$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013229
13230 have_ucs4_tcl=yes
13231
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13235$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013236
Skip Montanaro6dead952003-09-25 14:50:04 +000013237# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013238if test "$wchar_h" = yes
13239then
13240 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13242$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013243 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013245else
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013248 ac_cv_wchar_t_signed=yes
13249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013251/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013252
13253 #include <wchar.h>
13254 int main()
13255 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013256 /* Success: exit code 0 */
13257 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013258 }
13259
13260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013261if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013262 ac_cv_wchar_t_signed=yes
13263else
Matthias Kloseb9621712010-04-24 17:59:49 +000013264 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13267 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013268fi
13269
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013270fi
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13273$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013274fi
13275
Georg Brandl52d168a2008-01-07 18:10:24 +000013276# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013277if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013278 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013279then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013280 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013281
Matthias Kloseb9621712010-04-24 17:59:49 +000013282$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Georg Brandl52d168a2008-01-07 18:10:24 +000013284else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013285 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013286fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13288$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013289
13290# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13292$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013293if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_c_bigendian=unknown
13297 # See if we're dealing with a universal compiler.
13298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299/* end confdefs.h. */
13300#ifndef __APPLE_CC__
13301 not a universal capable compiler
13302 #endif
13303 typedef int dummy;
13304
Skip Montanaro6dead952003-09-25 14:50:04 +000013305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013306if ac_fn_c_try_compile "$LINENO"; then :
13307
13308 # Check for potential -arch flags. It is not universal unless
13309 # there are at least two -arch flags with different values.
13310 ac_arch=
13311 ac_prev=
13312 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13313 if test -n "$ac_prev"; then
13314 case $ac_word in
13315 i?86 | x86_64 | ppc | ppc64)
13316 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13317 ac_arch=$ac_word
13318 else
13319 ac_cv_c_bigendian=universal
13320 break
13321 fi
13322 ;;
13323 esac
13324 ac_prev=
13325 elif test "x$ac_word" = "x-arch"; then
13326 ac_prev=arch
13327 fi
13328 done
13329fi
13330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13331 if test $ac_cv_c_bigendian = unknown; then
13332 # See if sys/param.h defines the BYTE_ORDER macro.
13333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013335#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338int
13339main ()
13340{
Matthias Kloseb9621712010-04-24 17:59:49 +000013341#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13342 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13343 && LITTLE_ENDIAN)
13344 bogus endian macros
13345 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347 ;
13348 return 0;
13349}
13350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013351if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013352 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013354/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013355#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013357
Martin v. Löwis11437992002-04-12 09:54:03 +000013358int
13359main ()
13360{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013361#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 not big endian
13363 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
13365 ;
13366 return 0;
13367}
13368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013370 ac_cv_c_bigendian=yes
13371else
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013375fi
13376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13377 fi
13378 if test $ac_cv_c_bigendian = unknown; then
13379 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013381/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013382#include <limits.h>
13383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384int
13385main ()
13386{
Matthias Kloseb9621712010-04-24 17:59:49 +000013387#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13388 bogus endian macros
13389 #endif
13390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391 ;
13392 return 0;
13393}
13394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013395if ac_fn_c_try_compile "$LINENO"; then :
13396 # It does; now see whether it defined to _BIG_ENDIAN or not.
13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398/* end confdefs.h. */
13399#include <limits.h>
13400
13401int
13402main ()
13403{
13404#ifndef _BIG_ENDIAN
13405 not big endian
13406 #endif
13407
13408 ;
13409 return 0;
13410}
13411_ACEOF
13412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013414else
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13418fi
13419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13420 fi
13421 if test $ac_cv_c_bigendian = unknown; then
13422 # Compile a test program.
13423 if test "$cross_compiling" = yes; then :
13424 # Try to guess by grepping values from an object file.
13425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13426/* end confdefs.h. */
13427short int ascii_mm[] =
13428 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13429 short int ascii_ii[] =
13430 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13431 int use_ascii (int i) {
13432 return ascii_mm[i] + ascii_ii[i];
13433 }
13434 short int ebcdic_ii[] =
13435 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13436 short int ebcdic_mm[] =
13437 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13438 int use_ebcdic (int i) {
13439 return ebcdic_mm[i] + ebcdic_ii[i];
13440 }
13441 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443int
13444main ()
13445{
13446return use_ascii (foo) == use_ebcdic (foo);
13447 ;
13448 return 0;
13449}
13450_ACEOF
13451if ac_fn_c_try_compile "$LINENO"; then :
13452 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13453 ac_cv_c_bigendian=yes
13454 fi
13455 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13456 if test "$ac_cv_c_bigendian" = unknown; then
13457 ac_cv_c_bigendian=no
13458 else
13459 # finding both strings is unlikely to happen, but who knows?
13460 ac_cv_c_bigendian=unknown
13461 fi
13462 fi
13463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013465else
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013467/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013468$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013469int
13470main ()
13471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 /* Are we little or big endian? From Harbison&Steele. */
13474 union
13475 {
13476 long int l;
13477 char c[sizeof (long int)];
13478 } u;
13479 u.l = 1;
13480 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481
13482 ;
13483 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013484}
Martin v. Löwis11437992002-04-12 09:54:03 +000013485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013486if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013487 ac_cv_c_bigendian=no
13488else
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13498$as_echo "$ac_cv_c_bigendian" >&6; }
13499 case $ac_cv_c_bigendian in #(
13500 yes)
13501 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13502;; #(
13503 no)
13504 ;; #(
13505 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 ;; #(
13510 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013511 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013512 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013514
Michael W. Hudson54241132001-12-07 15:38:26 +000013515
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013516# ABI version string for Python extension modules. This appears between the
13517# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13518# from the following attributes which affect the ABI of this Python build (in
13519# this order):
13520#
13521# * The Python implementation (always 'cpython-' for us)
13522# * The major and minor version numbers
13523# * --with-pydebug (adds a 'd')
13524# * --with-pymalloc (adds a 'm')
13525# * --with-wide-unicode (adds a 'u')
13526#
13527# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013528# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13529# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013530
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13532$as_echo_n "checking ABIFLAGS... " >&6; }
13533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13534$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13536$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013537SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13539$as_echo "$SOABI" >&6; }
13540
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13542$as_echo_n "checking LDVERSION... " >&6; }
13543LDVERSION='$(VERSION)$(ABIFLAGS)'
13544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13545$as_echo "$LDVERSION" >&6; }
13546
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013547# SO is the extension of shared libraries `(including the dot!)
13548# -- usually .so, .sl on HP-UX, .dll on Cygwin
13549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13550$as_echo_n "checking SO... " >&6; }
13551if test -z "$SO"
13552then
13553 case $ac_sys_system in
13554 hp*|HP*)
13555 case `uname -m` in
13556 ia64) SO=.so;;
13557 *) SO=.sl;;
13558 esac
13559 ;;
13560 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013561 Linux*|GNU*)
13562 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013563 *) SO=.so;;
13564 esac
13565else
13566 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013567 echo
13568 echo '====================================================================='
13569 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013570 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013571 echo '+ Do you really mean to change the extension for shared libraries? +'
13572 echo '+ Continuing in 10 seconds to let you to ponder. +'
13573 echo '+ +'
13574 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013575 sleep 10
13576fi
13577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13578$as_echo "$SO" >&6; }
13579
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013580# Check whether right shifting a negative integer extends the sign bit
13581# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13583$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013584if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013586else
Martin v. Löwis11437992002-04-12 09:54:03 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013589 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013590else
Matthias Kloseb9621712010-04-24 17:59:49 +000013591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013592/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013593
13594int main()
13595{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013596 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013597}
13598
Martin v. Löwis11437992002-04-12 09:54:03 +000013599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013600if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013601 ac_cv_rshift_extends_sign=yes
13602else
Matthias Kloseb9621712010-04-24 17:59:49 +000013603 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13606 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013607fi
13608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609fi
13610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13612$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013613if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013614then
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013617
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013618fi
13619
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013620# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13622$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013623if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013625else
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
Matthias Kloseb9621712010-04-24 17:59:49 +000013627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013629#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013630int
13631main ()
13632{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013633
13634 FILE *f = fopen("/dev/null", "r");
13635 flockfile(f);
13636 getc_unlocked(f);
13637 funlockfile(f);
13638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 ;
13640 return 0;
13641}
13642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013644 ac_cv_have_getc_unlocked=yes
13645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 ac_cv_have_getc_unlocked=no
13647fi
13648rm -f core conftest.err conftest.$ac_objext \
13649 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13653$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013654if test "$ac_cv_have_getc_unlocked" = yes
13655then
Martin v. Löwis11437992002-04-12 09:54:03 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013658
13659fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013660
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013661# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013662# save the value of LIBS so we don't actually link Python with readline
13663LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013664
Gregory P. Smith18820942008-09-07 06:24:49 +000013665# On some systems we need to link readline to a termcap compatible
13666# library. NOTE: Keep the precedence of listed libraries synchronised
13667# with setup.py.
13668py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13670$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013671for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013672 if test -z "$py_libtermcap"; then
13673 READLINE_LIBS="-lreadline"
13674 else
13675 READLINE_LIBS="-lreadline -l$py_libtermcap"
13676 fi
13677 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013679/* end confdefs.h. */
13680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013681/* Override any GCC internal prototype to avoid an error.
13682 Use char because int might match the return type of a GCC
13683 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013684#ifdef __cplusplus
13685extern "C"
13686#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013687char readline ();
13688int
13689main ()
13690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013691return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013692 ;
13693 return 0;
13694}
13695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013696if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013697 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013699rm -f core conftest.err conftest.$ac_objext \
13700 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013701 if test $py_cv_lib_readline = yes; then
13702 break
13703 fi
13704done
13705# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13706#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013707if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13709$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013710else
Matthias Kloseb9621712010-04-24 17:59:49 +000013711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13712$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013713
Matthias Kloseb9621712010-04-24 17:59:49 +000013714$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013715
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013716fi
13717
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013718# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13720$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013721if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013723else
13724 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013725LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013727/* end confdefs.h. */
13728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729/* Override any GCC internal prototype to avoid an error.
13730 Use char because int might match the return type of a GCC
13731 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013732#ifdef __cplusplus
13733extern "C"
13734#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013735char rl_callback_handler_install ();
13736int
13737main ()
13738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013740 ;
13741 return 0;
13742}
13743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013745 ac_cv_lib_readline_rl_callback_handler_install=yes
13746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013749rm -f core conftest.err conftest.$ac_objext \
13750 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013751LIBS=$ac_check_lib_save_LIBS
13752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13754$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013755if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013758
13759fi
13760
13761
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013762# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013764/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013765#include <readline/readline.h>
13766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013768 have_readline=yes
13769else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013770 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013771
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013772fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013773rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013774if test $have_readline = yes
13775then
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013777/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013778#include <readline/readline.h>
13779
13780_ACEOF
13781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013785
13786fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013787rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013790/* end confdefs.h. */
13791#include <readline/readline.h>
13792
13793_ACEOF
13794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013796
Matthias Kloseb9621712010-04-24 17:59:49 +000013797$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013798
13799fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013800rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013801
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013802fi
13803
Martin v. Löwis0daad592001-09-30 21:09:59 +000013804# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13806$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013808 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013809else
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013811LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815/* Override any GCC internal prototype to avoid an error.
13816 Use char because int might match the return type of a GCC
13817 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013818#ifdef __cplusplus
13819extern "C"
13820#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013821char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013822int
13823main ()
13824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ;
13827 return 0;
13828}
13829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013830if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013835rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013837LIBS=$ac_check_lib_save_LIBS
13838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13840$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013841if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013842
Matthias Kloseb9621712010-04-24 17:59:49 +000013843$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013844
Martin v. Löwis0daad592001-09-30 21:09:59 +000013845fi
13846
Michael W. Hudson54241132001-12-07 15:38:26 +000013847
Thomas Wouters89d996e2007-09-08 17:39:28 +000013848# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13850$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013851if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013853else
13854 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013855LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013857/* end confdefs.h. */
13858
13859/* Override any GCC internal prototype to avoid an error.
13860 Use char because int might match the return type of a GCC
13861 builtin and then its argument prototype would still apply. */
13862#ifdef __cplusplus
13863extern "C"
13864#endif
13865char rl_completion_display_matches_hook ();
13866int
13867main ()
13868{
13869return rl_completion_display_matches_hook ();
13870 ;
13871 return 0;
13872}
13873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013874if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013875 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013879rm -f core conftest.err conftest.$ac_objext \
13880 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013881LIBS=$ac_check_lib_save_LIBS
13882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13884$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013885if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013888
13889fi
13890
13891
Martin v. Löwis0daad592001-09-30 21:09:59 +000013892# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13894$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013895if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013897else
Martin v. Löwis11437992002-04-12 09:54:03 +000013898 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013899LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903/* Override any GCC internal prototype to avoid an error.
13904 Use char because int might match the return type of a GCC
13905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013906#ifdef __cplusplus
13907extern "C"
13908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013909char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013910int
13911main ()
13912{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013918if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013920else
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013923rm -f core conftest.err conftest.$ac_objext \
13924 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013925LIBS=$ac_check_lib_save_LIBS
13926fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13928$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013929if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013932
Guido van Rossum353ae582001-07-10 16:45:32 +000013933fi
13934
Jack Jansendd19cf82001-12-06 22:36:17 +000013935
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013936# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013938/* end confdefs.h. */
13939#include <readline/readline.h>
13940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013942 have_readline=yes
13943else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013944 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013945
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013946fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013947rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013948if test $have_readline = yes
13949then
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013951/* end confdefs.h. */
13952#include <readline/readline.h>
13953
13954_ACEOF
13955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013959
13960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013961rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013962
13963fi
13964
Martin v. Löwis82bca632006-02-10 20:49:30 +000013965# End of readline checks: restore LIBS
13966LIBS=$LIBS_no_readline
13967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13969$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013970if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013972else
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013975 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013976else
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013978/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013979
13980int main()
13981{
13982 int val1 = nice(1);
13983 if (val1 != -1 && val1 == nice(2))
13984 exit(0);
13985 exit(1);
13986}
13987
Martin v. Löwis11437992002-04-12 09:54:03 +000013988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013989if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013990 ac_cv_broken_nice=yes
13991else
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013994rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13995 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013996fi
13997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013998fi
13999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14001$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014002if test "$ac_cv_broken_nice" = yes
14003then
Martin v. Löwis11437992002-04-12 09:54:03 +000014004
Matthias Kloseb9621712010-04-24 17:59:49 +000014005$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014006
14007fi
14008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14010$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014011if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014012 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014013else
Matthias Kloseb9621712010-04-24 17:59:49 +000014014 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014015 ac_cv_broken_poll=no
14016else
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014018/* end confdefs.h. */
14019
14020#include <poll.h>
14021
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014022int main()
14023{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014024 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014025 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014026
14027 close (42);
14028
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014029 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014030 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014031 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014032 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014033 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014034 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014035 return 1;
14036}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014037
14038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014039if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014040 ac_cv_broken_poll=yes
14041else
Matthias Kloseb9621712010-04-24 17:59:49 +000014042 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014048fi
14049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14051$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014052if test "$ac_cv_broken_poll" = yes
14053then
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014056
14057fi
14058
Brett Cannon43802422005-02-10 20:48:03 +000014059# 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 +000014060# (which is not required by ISO C or UNIX spec) and/or if we support
14061# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014062ac_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 +000014063#include <$ac_cv_struct_tm>
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065"
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014067
14068cat >>confdefs.h <<_ACEOF
14069#define HAVE_STRUCT_TM_TM_ZONE 1
14070_ACEOF
14071
14072
14073fi
14074
14075if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014078
14079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14081"
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086fi
14087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014089#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014090_ACEOF
14091
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14093$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014094if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014096else
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014098/* end confdefs.h. */
14099#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100#if !HAVE_DECL_TZNAME
14101extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014102#endif
14103
14104int
14105main ()
14106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014108 ;
14109 return 0;
14110}
14111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014112if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014113 ac_cv_var_tzname=yes
14114else
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014117rm -f core conftest.err conftest.$ac_objext \
14118 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14121$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014122 if test $ac_cv_var_tzname = yes; then
14123
Matthias Kloseb9621712010-04-24 17:59:49 +000014124$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014125
14126 fi
14127fi
14128
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014129
Martin v. Löwis1d459062005-03-14 21:23:33 +000014130# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14132$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014133if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014135else
14136
Matthias Kloseb9621712010-04-24 17:59:49 +000014137if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014138 ac_cv_working_tzset=no
14139else
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014141/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014142
14143#include <stdlib.h>
14144#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014145#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014146
14147#if HAVE_TZNAME
14148extern char *tzname[];
14149#endif
14150
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014151int main()
14152{
Brett Cannon18367812003-09-19 00:59:16 +000014153 /* Note that we need to ensure that not only does tzset(3)
14154 do 'something' with localtime, but it works as documented
14155 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014156 This includes making sure that tzname is set properly if
14157 tm->tm_zone does not exist since it is the alternative way
14158 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014159
14160 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014161 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014162 */
14163
Martin v. Löwis1d459062005-03-14 21:23:33 +000014164 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014165 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14166
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014167 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014168 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014169 if (localtime(&groundhogday)->tm_hour != 0)
14170 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014171#if HAVE_TZNAME
14172 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14173 if (strcmp(tzname[0], "UTC") ||
14174 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14175 exit(1);
14176#endif
Brett Cannon18367812003-09-19 00:59:16 +000014177
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014178 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014179 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014180 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014181 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014182#if HAVE_TZNAME
14183 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14184 exit(1);
14185#endif
Brett Cannon18367812003-09-19 00:59:16 +000014186
14187 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14188 tzset();
14189 if (localtime(&groundhogday)->tm_hour != 11)
14190 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014191#if HAVE_TZNAME
14192 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14193 exit(1);
14194#endif
14195
14196#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014197 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14198 exit(1);
14199 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14200 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014201#endif
Brett Cannon18367812003-09-19 00:59:16 +000014202
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014203 exit(0);
14204}
14205
14206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014207if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014208 ac_cv_working_tzset=yes
14209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14213 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014214fi
14215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014216fi
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14219$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014220if test "$ac_cv_working_tzset" = yes
14221then
14222
Matthias Kloseb9621712010-04-24 17:59:49 +000014223$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014224
14225fi
14226
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014227# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14229$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014230if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014234/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014235#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014236int
14237main ()
14238{
14239
14240struct stat st;
14241st.st_mtim.tv_nsec = 1;
14242
14243 ;
14244 return 0;
14245}
14246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014248 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14253fi
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14256$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014257if test "$ac_cv_stat_tv_nsec" = yes
14258then
14259
Matthias Kloseb9621712010-04-24 17:59:49 +000014260$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014261
14262fi
14263
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014264# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14266$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014267if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014269else
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014271/* end confdefs.h. */
14272#include <sys/stat.h>
14273int
14274main ()
14275{
14276
14277struct stat st;
14278st.st_mtimespec.tv_nsec = 1;
14279
14280 ;
14281 return 0;
14282}
14283_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014284if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014285 ac_cv_stat_tv_nsec2=yes
14286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14290fi
14291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14293$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014294if test "$ac_cv_stat_tv_nsec2" = yes
14295then
14296
Matthias Kloseb9621712010-04-24 17:59:49 +000014297$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014298
14299fi
14300
Jack Jansen666b1e72001-10-31 12:11:48 +000014301# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14303$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014304if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014306else
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014308/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014309#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014310int
14311main ()
14312{
Jack Jansen666b1e72001-10-31 12:11:48 +000014313
14314 int rtn;
14315 rtn = mvwdelch(0,0,0);
14316
Martin v. Löwis11437992002-04-12 09:54:03 +000014317 ;
14318 return 0;
14319}
14320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014321if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014322 ac_cv_mvwdelch_is_expression=yes
14323else
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14327fi
14328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14330$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014331
14332if test "$ac_cv_mvwdelch_is_expression" = yes
14333then
Martin v. Löwis11437992002-04-12 09:54:03 +000014334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014336
14337fi
14338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14340$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014341if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014343else
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014345/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014346#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014347int
14348main ()
14349{
Jack Jansen666b1e72001-10-31 12:11:48 +000014350
14351 WINDOW *w;
14352 w->_flags = 0;
14353
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ;
14355 return 0;
14356}
14357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014358if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014359 ac_cv_window_has_flags=yes
14360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14364fi
14365
Matthias Kloseb9621712010-04-24 17:59:49 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14367$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014368
Jack Jansen666b1e72001-10-31 12:11:48 +000014369
14370if test "$ac_cv_window_has_flags" = yes
14371then
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014374
14375fi
14376
Matthias Kloseb9621712010-04-24 17:59:49 +000014377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14378$as_echo_n "checking for is_term_resized... " >&6; }
14379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014380/* end confdefs.h. */
14381#include <curses.h>
14382int
14383main ()
14384{
14385void *x=is_term_resized
14386 ;
14387 return 0;
14388}
14389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014393
Matthias Kloseb159a552010-04-25 21:00:44 +000014394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014395$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014396else
Matthias Kloseb9621712010-04-24 17:59:49 +000014397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14398$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014399
14400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14402
Matthias Kloseb9621712010-04-24 17:59:49 +000014403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14404$as_echo_n "checking for resize_term... " >&6; }
14405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014406/* end confdefs.h. */
14407#include <curses.h>
14408int
14409main ()
14410{
14411void *x=resize_term
14412 ;
14413 return 0;
14414}
14415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014416if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014419
Matthias Kloseb159a552010-04-25 21:00:44 +000014420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014421$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14424$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014425
14426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14430$as_echo_n "checking for resizeterm... " >&6; }
14431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014432/* end confdefs.h. */
14433#include <curses.h>
14434int
14435main ()
14436{
14437void *x=resizeterm
14438 ;
14439 return 0;
14440}
14441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014442if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014445
Matthias Kloseb159a552010-04-25 21:00:44 +000014446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014447$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014448else
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14450$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014451
14452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14454
Matthias Kloseb9621712010-04-24 17:59:49 +000014455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14456$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014457
14458if test -r /dev/ptmx
14459then
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14461$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014464
Thomas Wouters89f507f2006-12-13 04:49:30 +000014465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014468fi
14469
Matthias Kloseb9621712010-04-24 17:59:49 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14471$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014472
14473if test -r /dev/ptc
14474then
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14476$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014477
Matthias Kloseb9621712010-04-24 17:59:49 +000014478$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014479
Thomas Wouters89f507f2006-12-13 04:49:30 +000014480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14482$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014483fi
14484
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014485if test "$have_long_long" = yes
14486then
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14488$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014489 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014491else
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014493 ac_cv_have_long_long_format="cross -- assuming no"
14494 if test x$GCC = xyes; then
14495 save_CFLAGS=$CFLAGS
14496 CFLAGS="$CFLAGS -Werror -Wformat"
14497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498/* end confdefs.h. */
14499
14500 #include <stdio.h>
14501 #include <stddef.h>
14502
14503int
14504main ()
14505{
14506
14507 char *buffer;
14508 sprintf(buffer, "%lld", (long long)123);
14509 sprintf(buffer, "%lld", (long long)-123);
14510 sprintf(buffer, "%llu", (unsigned long long)123);
14511
14512 ;
14513 return 0;
14514}
14515_ACEOF
14516if ac_fn_c_try_compile "$LINENO"; then :
14517 ac_cv_have_long_long_format=yes
14518
14519fi
14520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14521 CFLAGS=$save_CFLAGS
14522 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014523else
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014525/* end confdefs.h. */
14526
14527 #include <stdio.h>
14528 #include <stddef.h>
14529 #include <string.h>
14530
14531 #ifdef HAVE_SYS_TYPES_H
14532 #include <sys/types.h>
14533 #endif
14534
14535 int main()
14536 {
14537 char buffer[256];
14538
14539 if (sprintf(buffer, "%lld", (long long)123) < 0)
14540 return 1;
14541 if (strcmp(buffer, "123"))
14542 return 1;
14543
14544 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14545 return 1;
14546 if (strcmp(buffer, "-123"))
14547 return 1;
14548
14549 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14550 return 1;
14551 if (strcmp(buffer, "123"))
14552 return 1;
14553
14554 return 0;
14555 }
14556
14557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014558if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014559 ac_cv_have_long_long_format=yes
14560else
Matthias Kloseb9621712010-04-24 17:59:49 +000014561 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14564 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014565fi
14566
14567
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014568fi
14569
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14571$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014572fi
14573
Mark Dickinson89d7d412009-12-31 20:50:59 +000014574if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014575then
14576
Matthias Kloseb9621712010-04-24 17:59:49 +000014577$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014578
14579fi
14580
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014581if test $ac_sys_system = Darwin
14582then
14583 LIBS="$LIBS -framework CoreFoundation"
14584fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14587$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014588if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014590else
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014592 ac_cv_have_size_t_format="cross -- assuming yes"
14593
Thomas Wouters477c8d52006-05-27 19:21:47 +000014594else
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014596/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014597
Thomas Wouters477c8d52006-05-27 19:21:47 +000014598#include <stdio.h>
14599#include <stddef.h>
14600#include <string.h>
14601
Christian Heimes2c181612007-12-17 20:04:13 +000014602#ifdef HAVE_SYS_TYPES_H
14603#include <sys/types.h>
14604#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014605
14606#ifdef HAVE_SSIZE_T
14607typedef ssize_t Py_ssize_t;
14608#elif SIZEOF_VOID_P == SIZEOF_LONG
14609typedef long Py_ssize_t;
14610#else
14611typedef int Py_ssize_t;
14612#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014613
Christian Heimes2c181612007-12-17 20:04:13 +000014614int main()
14615{
14616 char buffer[256];
14617
Thomas Wouters477c8d52006-05-27 19:21:47 +000014618 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14619 return 1;
14620
Thomas Wouters89f507f2006-12-13 04:49:30 +000014621 if (strcmp(buffer, "123"))
14622 return 1;
14623
14624 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14625 return 1;
14626
14627 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014628 return 1;
14629
14630 return 0;
14631}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014632
Thomas Wouters477c8d52006-05-27 19:21:47 +000014633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014634if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014635 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014639rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14640 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014641fi
14642
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14645$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014646if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014649
14650fi
14651
Matthias Kloseb9621712010-04-24 17:59:49 +000014652ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014653#ifdef HAVE_SYS_TYPES_H
14654#include <sys/types.h>
14655#endif
14656#ifdef HAVE_SYS_SOCKET_H
14657#include <sys/socket.h>
14658#endif
14659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660"
Victor Stinnere0be4232011-10-25 13:06:09 +020014661if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014662
Martin v. Löwis11437992002-04-12 09:54:03 +000014663else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014666
14667fi
14668
Michael W. Hudson54241132001-12-07 15:38:26 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14671$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014672if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014674else
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014676 ac_cv_broken_mbstowcs=no
14677else
Matthias Kloseb9621712010-04-24 17:59:49 +000014678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014679/* end confdefs.h. */
14680
14681#include<stdlib.h>
14682int main() {
14683 size_t len = -1;
14684 const char *str = "text";
14685 len = mbstowcs(NULL, str, 0);
14686 return (len != 4);
14687}
14688
14689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014690if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014691 ac_cv_broken_mbstowcs=no
14692else
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14696 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014697fi
14698
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014699fi
14700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14702$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014703if test "$ac_cv_broken_mbstowcs" = yes
14704then
14705
Matthias Kloseb9621712010-04-24 17:59:49 +000014706$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014707
14708fi
14709
Antoine Pitroub52ec782009-01-25 16:34:23 +000014710# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14712$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014713
14714# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014715if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014716 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014717if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014718then
14719
Matthias Kloseb9621712010-04-24 17:59:49 +000014720$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014721
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14723$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014724fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014725if test "$withval" = no
14726then
14727
14728$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14731$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014732fi
14733
Antoine Pitrou042b1282010-08-13 21:15:58 +000014734else
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14736$as_echo "no value specified" >&6; }
14737fi
14738
Antoine Pitroub52ec782009-01-25 16:34:23 +000014739
Matthias Kloseb17289e2012-03-15 19:51:34 +010014740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14741$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14742if ${ac_cv_computed_gotos+:} false; then :
14743 $as_echo_n "(cached) " >&6
14744else
14745 if test "$cross_compiling" = yes; then :
14746 if test "${with_computed_gotos+set}" = set; then
14747 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14748 else
14749 ac_cv_computed_gotos=no
14750 fi
14751else
14752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14753/* end confdefs.h. */
14754
14755int main(int argc, char **argv)
14756{
14757 static void *targets[1] = { &&LABEL1 };
14758 goto LABEL2;
14759LABEL1:
14760 return 0;
14761LABEL2:
14762 goto *targets[0];
14763 return 1;
14764}
14765
14766_ACEOF
14767if ac_fn_c_try_run "$LINENO"; then :
14768 ac_cv_computed_gotos=yes
14769else
14770 ac_cv_computed_gotos=no
14771fi
14772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14773 conftest.$ac_objext conftest.beam conftest.$ac_ext
14774fi
14775
14776fi
14777
14778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14779$as_echo "$ac_cv_computed_gotos" >&6; }
14780case "$ac_cv_computed_gotos" in yes*)
14781
14782$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14783
14784esac
14785
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014786case $ac_sys_system in
14787AIX*)
14788
14789$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14790 ;;
14791esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014792
Michael W. Hudson54241132001-12-07 15:38:26 +000014793
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014794
14795
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014796for h in `(cd $srcdir;echo Python/thread_*.h)`
14797do
14798 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14799done
14800
Michael W. Hudson54241132001-12-07 15:38:26 +000014801
Neal Norwitzd24499d2005-12-18 21:36:39 +000014802SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14804$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014805for dir in $SRCDIRS; do
14806 if test ! -d $dir; then
14807 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014808 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014809done
Matthias Kloseb9621712010-04-24 17:59:49 +000014810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14811$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014812
Stefan Krah1919b7e2012-03-21 18:25:23 +010014813# Availability of -O2:
14814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14815$as_echo_n "checking for -O2... " >&6; }
14816saved_cflags="$CFLAGS"
14817CFLAGS="-O2"
14818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14819/* end confdefs.h. */
14820
14821int
14822main ()
14823{
14824
14825
14826 ;
14827 return 0;
14828}
14829_ACEOF
14830if ac_fn_c_try_compile "$LINENO"; then :
14831 have_O2=yes
14832else
14833 have_O2=no
14834fi
14835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14837$as_echo "$have_O2" >&6; }
14838CFLAGS="$saved_cflags"
14839
14840# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14841# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14843$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14844saved_cflags="$CFLAGS"
14845CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14846if test "$have_O2" = no; then
14847 CFLAGS=""
14848fi
14849if test "$cross_compiling" = yes; then :
14850 have_glibc_memmove_bug=undefined
14851else
14852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14853/* end confdefs.h. */
14854
14855#include <stdio.h>
14856#include <stdlib.h>
14857#include <string.h>
14858void foo(void *p, void *q) { memmove(p, q, 19); }
14859int main() {
14860 char a[32] = "123456789000000000";
14861 foo(&a[9], a);
14862 if (strcmp(a, "123456789123456789000000000") != 0)
14863 return 1;
14864 foo(a, &a[9]);
14865 if (strcmp(a, "123456789000000000") != 0)
14866 return 1;
14867 return 0;
14868}
14869
14870_ACEOF
14871if ac_fn_c_try_run "$LINENO"; then :
14872 have_glibc_memmove_bug=no
14873else
14874 have_glibc_memmove_bug=yes
14875fi
14876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14877 conftest.$ac_objext conftest.beam conftest.$ac_ext
14878fi
14879
14880CFLAGS="$saved_cflags"
14881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14882$as_echo "$have_glibc_memmove_bug" >&6; }
14883if test "$have_glibc_memmove_bug" = yes; then
14884
14885$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14886
14887fi
14888
14889if test "$have_gcc_asm_for_x87" = yes; then
14890 # Some versions of gcc miscompile inline asm:
14891 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14892 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14893 case $CC in
14894 *gcc*)
14895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14896$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14897 saved_cflags="$CFLAGS"
14898 CFLAGS="-O2"
14899 if test "$cross_compiling" = yes; then :
14900 have_ipa_pure_const_bug=undefined
14901else
14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14903/* end confdefs.h. */
14904
14905 __attribute__((noinline)) int
14906 foo(int *p) {
14907 int r;
14908 asm ( "movl \$6, (%1)\n\t"
14909 "xorl %0, %0\n\t"
14910 : "=r" (r) : "r" (p) : "memory"
14911 );
14912 return r;
14913 }
14914 int main() {
14915 int p = 8;
14916 if ((foo(&p) ? : p) != 6)
14917 return 1;
14918 return 0;
14919 }
14920
14921_ACEOF
14922if ac_fn_c_try_run "$LINENO"; then :
14923 have_ipa_pure_const_bug=no
14924else
14925 have_ipa_pure_const_bug=yes
14926fi
14927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14928 conftest.$ac_objext conftest.beam conftest.$ac_ext
14929fi
14930
14931 CFLAGS="$saved_cflags"
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14933$as_echo "$have_ipa_pure_const_bug" >&6; }
14934 if test "$have_ipa_pure_const_bug" = yes; then
14935
14936$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14937
14938 fi
14939 ;;
14940 esac
14941fi
14942
Guido van Rossum627b2d71993-12-24 10:39:16 +000014943# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014944ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014945
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014946ac_config_files="$ac_config_files Modules/ld_so_aix"
14947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014949# This file is a shell script that caches the results of configure
14950# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014951# scripts and configure runs, see configure's option --config-cache.
14952# It is not useful on other systems. If it contains results you don't
14953# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014954#
Martin v. Löwis11437992002-04-12 09:54:03 +000014955# config.status only pays attention to the cache file if you give it
14956# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014957#
Skip Montanaro6dead952003-09-25 14:50:04 +000014958# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014959# loading this file, other *unset* `ac_cv_foo' will be assigned the
14960# following values.
14961
14962_ACEOF
14963
Guido van Rossumf78abae1997-01-21 22:02:36 +000014964# The following way of writing the cache mishandles newlines in values,
14965# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014966# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014967# Ultrix sh set writes to stderr and can't be redirected directly,
14968# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014969(
14970 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14971 eval ac_val=\$$ac_var
14972 case $ac_val in #(
14973 *${as_nl}*)
14974 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14976$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977 esac
14978 case $ac_var in #(
14979 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014980 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14981 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982 esac ;;
14983 esac
14984 done
14985
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14988 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014989 # `set' does not quote correctly, so add quotes: double-quote
14990 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014991 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014992 "s/'/'\\\\''/g;
14993 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 *)
14996 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014997 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014998 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014999 esac |
15000 sort
15001) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015003 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015005 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15007 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15009 :end' >>confcache
15010if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15011 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015012 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15014$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015015 if test ! -f "$cache_file" || test -h "$cache_file"; then
15016 cat confcache >"$cache_file"
15017 else
15018 case $cache_file in #(
15019 */* | ?:*)
15020 mv -f confcache "$cache_file"$$ &&
15021 mv -f "$cache_file"$$ "$cache_file" ;; #(
15022 *)
15023 mv -f confcache "$cache_file" ;;
15024 esac
15025 fi
15026 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015027 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15029$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015030 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015031fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015032rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015033
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015034test "x$prefix" = xNONE && prefix=$ac_default_prefix
15035# Let make expand exec_prefix.
15036test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015037
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015038DEFS=-DHAVE_CONFIG_H
15039
Skip Montanaro6dead952003-09-25 14:50:04 +000015040ac_libobjs=
15041ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015042U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015043for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15044 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015047 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15048 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15050 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015051done
15052LIBOBJS=$ac_libobjs
15053
15054LTLIBOBJS=$ac_ltlibobjs
15055
15056
Martin v. Löwis11437992002-04-12 09:54:03 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058
Victor Stinnere0be4232011-10-25 13:06:09 +020015059: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015060ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015061ac_clean_files_save=$ac_clean_files
15062ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015063{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15064$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15065as_write_fail=0
15066cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015067#! $SHELL
15068# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015069# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015070# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015071# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015074ac_cs_recheck=false
15075ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015076
Matthias Kloseb9621712010-04-24 17:59:49 +000015077SHELL=\${CONFIG_SHELL-$SHELL}
15078export SHELL
15079_ASEOF
15080cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15081## -------------------- ##
15082## M4sh Initialization. ##
15083## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085# Be more Bourne compatible
15086DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015087if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 emulate sh
15089 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015091 # is contrary to our usage. Disable this feature.
15092 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015094else
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 case `(set -o) 2>/dev/null` in #(
15096 *posix*) :
15097 set -o posix ;; #(
15098 *) :
15099 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015100esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015101fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015102
15103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104as_nl='
15105'
15106export as_nl
15107# Printing a long string crashes Solaris 7 /usr/bin/printf.
15108as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15109as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15110as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15111# Prefer a ksh shell builtin over an external printf program on Solaris,
15112# but without wasting forks for bash or zsh.
15113if test -z "$BASH_VERSION$ZSH_VERSION" \
15114 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15115 as_echo='print -r --'
15116 as_echo_n='print -rn --'
15117elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15118 as_echo='printf %s\n'
15119 as_echo_n='printf %s'
15120else
15121 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15122 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15123 as_echo_n='/usr/ucb/echo -n'
15124 else
15125 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15126 as_echo_n_body='eval
15127 arg=$1;
15128 case $arg in #(
15129 *"$as_nl"*)
15130 expr "X$arg" : "X\\(.*\\)$as_nl";
15131 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15132 esac;
15133 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15134 '
15135 export as_echo_n_body
15136 as_echo_n='sh -c $as_echo_n_body as_echo'
15137 fi
15138 export as_echo_body
15139 as_echo='sh -c $as_echo_body as_echo'
15140fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015141
15142# The user is always right.
15143if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 PATH_SEPARATOR=:
15145 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15146 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15147 PATH_SEPARATOR=';'
15148 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151
15152# IFS
15153# We need space, tab and new line, in precisely that order. Quoting is
15154# there to prevent editors from complaining about space-tab.
15155# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15156# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157IFS=" "" $as_nl"
15158
15159# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015160as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015161case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 *[\\/]* ) as_myself=$0 ;;
15163 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015164for as_dir in $PATH
15165do
15166 IFS=$as_save_IFS
15167 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15169 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 ;;
15173esac
15174# We did not find ourselves, most probably we were run as `sh COMMAND'
15175# in which case we are not to be found in the path.
15176if test "x$as_myself" = x; then
15177 as_myself=$0
15178fi
15179if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15181 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182fi
15183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184# Unset variables that we do not need and which cause bugs (e.g. in
15185# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15186# suppresses any "Segmentation fault" message there. '((' could
15187# trigger a bug in pdksh 5.2.14.
15188for as_var in BASH_ENV ENV MAIL MAILPATH
15189do eval test x\${$as_var+set} = xset \
15190 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191done
15192PS1='$ '
15193PS2='> '
15194PS4='+ '
15195
15196# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015197LC_ALL=C
15198export LC_ALL
15199LANGUAGE=C
15200export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015201
Matthias Kloseb9621712010-04-24 17:59:49 +000015202# CDPATH.
15203(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15204
15205
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015206# as_fn_error STATUS ERROR [LINENO LOG_FD]
15207# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015208# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15209# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015210# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015211as_fn_error ()
15212{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015213 as_status=$1; test $as_status -eq 0 && as_status=1
15214 if test "$4"; then
15215 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15216 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015218 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015219 as_fn_exit $as_status
15220} # as_fn_error
15221
15222
15223# as_fn_set_status STATUS
15224# -----------------------
15225# Set $? to STATUS, without forking.
15226as_fn_set_status ()
15227{
15228 return $1
15229} # as_fn_set_status
15230
15231# as_fn_exit STATUS
15232# -----------------
15233# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15234as_fn_exit ()
15235{
15236 set +e
15237 as_fn_set_status $1
15238 exit $1
15239} # as_fn_exit
15240
15241# as_fn_unset VAR
15242# ---------------
15243# Portably unset VAR.
15244as_fn_unset ()
15245{
15246 { eval $1=; unset $1;}
15247}
15248as_unset=as_fn_unset
15249# as_fn_append VAR VALUE
15250# ----------------------
15251# Append the text in VALUE to the end of the definition contained in VAR. Take
15252# advantage of any shell optimizations that allow amortized linear growth over
15253# repeated appends, instead of the typical quadratic growth present in naive
15254# implementations.
15255if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15256 eval 'as_fn_append ()
15257 {
15258 eval $1+=\$2
15259 }'
15260else
15261 as_fn_append ()
15262 {
15263 eval $1=\$$1\$2
15264 }
15265fi # as_fn_append
15266
15267# as_fn_arith ARG...
15268# ------------------
15269# Perform arithmetic evaluation on the ARGs, and store the result in the
15270# global $as_val. Take advantage of shells that can avoid forks. The arguments
15271# must be portable across $(()) and expr.
15272if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15273 eval 'as_fn_arith ()
15274 {
15275 as_val=$(( $* ))
15276 }'
15277else
15278 as_fn_arith ()
15279 {
15280 as_val=`expr "$@" || test $? -eq 1`
15281 }
15282fi # as_fn_arith
15283
15284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015285if expr a : '\(a\)' >/dev/null 2>&1 &&
15286 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15287 as_expr=expr
15288else
15289 as_expr=false
15290fi
15291
15292if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15293 as_basename=basename
15294else
15295 as_basename=false
15296fi
15297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15299 as_dirname=dirname
15300else
15301 as_dirname=false
15302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304as_me=`$as_basename -- "$0" ||
15305$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15306 X"$0" : 'X\(//\)$' \| \
15307 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015308$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309 sed '/^.*\/\([^/][^/]*\)\/*$/{
15310 s//\1/
15311 q
15312 }
15313 /^X\/\(\/\/\)$/{
15314 s//\1/
15315 q
15316 }
15317 /^X\/\(\/\).*/{
15318 s//\1/
15319 q
15320 }
15321 s/.*/./; q'`
15322
Matthias Kloseb9621712010-04-24 17:59:49 +000015323# Avoid depending upon Character Ranges.
15324as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15325as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15326as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15327as_cr_digits='0123456789'
15328as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329
15330ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015331case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 xy) ECHO_C='\c';;
15336 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15337 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338 esac;;
15339*)
15340 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015341esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015342
Martin v. Löwis11437992002-04-12 09:54:03 +000015343rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344if test -d conf$$.dir; then
15345 rm -f conf$$.dir/conf$$.file
15346else
15347 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015350if (echo >conf$$.file) 2>/dev/null; then
15351 if ln -s conf$$.file conf$$ 2>/dev/null; then
15352 as_ln_s='ln -s'
15353 # ... but there are two gotchas:
15354 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15355 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015356 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015358 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 elif ln conf$$.file conf$$ 2>/dev/null; then
15360 as_ln_s=ln
15361 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015362 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015364else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015365 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15368rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370
15371# as_fn_mkdir_p
15372# -------------
15373# Create "$as_dir" as a directory, including parents if necessary.
15374as_fn_mkdir_p ()
15375{
15376
15377 case $as_dir in #(
15378 -*) as_dir=./$as_dir;;
15379 esac
15380 test -d "$as_dir" || eval $as_mkdir_p || {
15381 as_dirs=
15382 while :; do
15383 case $as_dir in #(
15384 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15385 *) as_qdir=$as_dir;;
15386 esac
15387 as_dirs="'$as_qdir' $as_dirs"
15388 as_dir=`$as_dirname -- "$as_dir" ||
15389$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15390 X"$as_dir" : 'X\(//\)[^/]' \| \
15391 X"$as_dir" : 'X\(//\)$' \| \
15392 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15393$as_echo X"$as_dir" |
15394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15395 s//\1/
15396 q
15397 }
15398 /^X\(\/\/\)[^/].*/{
15399 s//\1/
15400 q
15401 }
15402 /^X\(\/\/\)$/{
15403 s//\1/
15404 q
15405 }
15406 /^X\(\/\).*/{
15407 s//\1/
15408 q
15409 }
15410 s/.*/./; q'`
15411 test -d "$as_dir" && break
15412 done
15413 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015414 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015415
15416
15417} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015418if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015420else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015421 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015422 as_mkdir_p=false
15423fi
15424
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015425if test -x / >/dev/null 2>&1; then
15426 as_test_x='test -x'
15427else
15428 if ls -dL / >/dev/null 2>&1; then
15429 as_ls_L_option=L
15430 else
15431 as_ls_L_option=
15432 fi
15433 as_test_x='
15434 eval sh -c '\''
15435 if test -d "$1"; then
15436 test -d "$1/.";
15437 else
15438 case $1 in #(
15439 -*)set "./$1";;
15440 esac;
15441 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15442 ???[sx]*):;;*)false;;esac;fi
15443 '\'' sh
15444 '
15445fi
15446as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015447
15448# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015449as_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 +000015450
15451# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015452as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454
Martin v. Löwis11437992002-04-12 09:54:03 +000015455exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015456## ----------------------------------- ##
15457## Main body of $CONFIG_STATUS script. ##
15458## ----------------------------------- ##
15459_ASEOF
15460test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15463# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015464# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465# values after options handling.
15466ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015467This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015468generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015469
15470 CONFIG_FILES = $CONFIG_FILES
15471 CONFIG_HEADERS = $CONFIG_HEADERS
15472 CONFIG_LINKS = $CONFIG_LINKS
15473 CONFIG_COMMANDS = $CONFIG_COMMANDS
15474 $ $0 $@
15475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476on `(hostname || uname -n) 2>/dev/null | sed 1q`
15477"
15478
Martin v. Löwis11437992002-04-12 09:54:03 +000015479_ACEOF
15480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481case $ac_config_files in *"
15482"*) set x $ac_config_files; shift; ac_config_files=$*;;
15483esac
15484
15485case $ac_config_headers in *"
15486"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15487esac
15488
15489
15490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015491# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015492config_files="$ac_config_files"
15493config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015498ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015499\`$as_me' instantiates files and other configuration actions
15500from templates according to the current configuration. Unless the files
15501and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
15505 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015507 --config print configuration, then exit
15508 -q, --quiet, --silent
15509 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015510 -d, --debug don't remove temporary files
15511 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 --file=FILE[:TEMPLATE]
15513 instantiate the configuration file FILE
15514 --header=FILE[:TEMPLATE]
15515 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015516
15517Configuration files:
15518$config_files
15519
15520Configuration headers:
15521$config_headers
15522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15527ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015528ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015529python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015530configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015532
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015533Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015534This config.status script is free software; the Free Software Foundation
15535gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536
15537ac_pwd='$ac_pwd'
15538srcdir='$srcdir'
15539INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015540MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015541test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015542_ACEOF
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15545# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015546ac_need_defaults=:
15547while test $# != 0
15548do
15549 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015550 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15552 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015553 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015555 --*=)
15556 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15557 ac_optarg=
15558 ac_shift=:
15559 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015561 ac_option=$1
15562 ac_optarg=$2
15563 ac_shift=shift
15564 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 esac
15566
Skip Montanaro6dead952003-09-25 14:50:04 +000015567 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015568 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015569 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15570 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 $as_echo "$ac_cs_version"; exit ;;
15573 --config | --confi | --conf | --con | --co | --c )
15574 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 debug=: ;;
15577 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015578 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015579 case $ac_optarg in
15580 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015581 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 esac
15583 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 ac_need_defaults=false;;
15585 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015586 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015587 case $ac_optarg in
15588 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15589 esac
15590 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592 --he | --h)
15593 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015594 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015595Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015597 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015598 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15599 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15600 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015601
15602 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015603 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015604Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015605
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015608
15609 esac
15610 shift
15611done
15612
Skip Montanaro6dead952003-09-25 14:50:04 +000015613ac_configure_extra_args=
15614
15615if $ac_cs_silent; then
15616 exec 6>/dev/null
15617 ac_configure_extra_args="$ac_configure_extra_args --silent"
15618fi
15619
15620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015622if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015623 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015624 shift
15625 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15626 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015629fi
15630
Martin v. Löwis11437992002-04-12 09:54:03 +000015631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633exec 5>>config.log
15634{
15635 echo
15636 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15637## Running $as_me. ##
15638_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015639 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015645
Matthias Kloseb9621712010-04-24 17:59:49 +000015646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647
15648# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015649for ac_config_target in $ac_config_targets
15650do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651 case $ac_config_target in
15652 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15653 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15654 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015655 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15656 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15658 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015659 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015660 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661
Victor Stinnere0be4232011-10-25 13:06:09 +020015662 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 esac
15664done
15665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667# If the user did not use the arguments to specify the items to instantiate,
15668# then the envvar interface is used. Set only those that are not.
15669# We use the long form for the default assignment because of an extremely
15670# bizarre bug on SunOS 4.1.3.
15671if $ac_need_defaults; then
15672 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15673 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15674fi
15675
Skip Montanaro6dead952003-09-25 14:50:04 +000015676# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015678# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679# Hook for its removal unless debugging.
15680# Note that there is a small window in which the directory will not be cleaned:
15681# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015682$debug ||
15683{
Victor Stinnere0be4232011-10-25 13:06:09 +020015684 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015686 : "${ac_tmp:=$tmp}"
15687 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015690}
Martin v. Löwis11437992002-04-12 09:54:03 +000015691# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015692
Martin v. Löwis11437992002-04-12 09:54:03 +000015693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015694 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015695 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015696} ||
15697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698 tmp=./conf$$-$RANDOM
15699 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015700} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015701ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015702
Matthias Kloseb9621712010-04-24 17:59:49 +000015703# Set up the scripts for CONFIG_FILES section.
15704# No need to generate them if there are no CONFIG_FILES.
15705# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015706if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708
15709ac_cr=`echo X | tr X '\015'`
15710# On cygwin, bash can eat \r inside `` if the user requested igncr.
15711# But we know of no other shell where ac_cr would be empty at this
15712# point, so we can use a bashism as a fallback.
15713if test "x$ac_cr" = x; then
15714 eval ac_cr=\$\'\\r\'
15715fi
15716ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15717if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015718 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015719else
15720 ac_cs_awk_cr=$ac_cr
15721fi
15722
Victor Stinnere0be4232011-10-25 13:06:09 +020015723echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
15725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727{
15728 echo "cat >conf$$subs.awk <<_ACEOF" &&
15729 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15730 echo "_ACEOF"
15731} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015732 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15733ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734ac_delim='%!_!# '
15735for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015736 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015737 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15740 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015741 break
15742 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015743 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015744 else
15745 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747done
Matthias Kloseb9621712010-04-24 17:59:49 +000015748rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015751cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015753sed -n '
15754h
15755s/^/S["/; s/!.*/"]=/
15756p
15757g
15758s/^[^!]*!//
15759:repl
15760t repl
15761s/'"$ac_delim"'$//
15762t delim
15763:nl
15764h
15765s/\(.\{148\}\)..*/\1/
15766t more1
15767s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15768p
15769n
15770b repl
15771:more1
15772s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15773p
15774g
15775s/.\{148\}//
15776t nl
15777:delim
15778h
15779s/\(.\{148\}\)..*/\1/
15780t more2
15781s/["\\]/\\&/g; s/^/"/; s/$/"/
15782p
15783b
15784:more2
15785s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15786p
15787g
15788s/.\{148\}//
15789t delim
15790' <conf$$subs.awk | sed '
15791/^[^""]/{
15792 N
15793 s/\n//
15794}
15795' >>$CONFIG_STATUS || ac_write_fail=1
15796rm -f conf$$subs.awk
15797cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15798_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015799cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 for (key in S) S_is_set[key] = 1
15801 FS = ""
15802
15803}
15804{
15805 line = $ 0
15806 nfields = split(line, field, "@")
15807 substed = 0
15808 len = length(field[1])
15809 for (i = 2; i < nfields; i++) {
15810 key = field[i]
15811 keylen = length(key)
15812 if (S_is_set[key]) {
15813 value = S[key]
15814 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15815 len += length(value) + length(field[++i])
15816 substed = 1
15817 } else
15818 len += 1 + keylen
15819 }
15820
15821 print line
15822}
15823
15824_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015826cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15827if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15828 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15829else
15830 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015831fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015832 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015833_ACEOF
15834
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015835# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15836# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837# trailing colons and then remove the whole line if VPATH becomes empty
15838# (actually we leave an empty line to preserve line numbers).
15839if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015840 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15841h
15842s///
15843s/^/:/
15844s/[ ]*$/:/
15845s/:\$(srcdir):/:/g
15846s/:\${srcdir}:/:/g
15847s/:@srcdir@:/:/g
15848s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015850x
15851s/\(=[ ]*\).*/\1/
15852G
15853s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015854s/^[^=]*=[ ]*$//
15855}'
15856fi
15857
Matthias Kloseb9621712010-04-24 17:59:49 +000015858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015859fi # test -n "$CONFIG_FILES"
15860
Matthias Kloseb9621712010-04-24 17:59:49 +000015861# Set up the scripts for CONFIG_HEADERS section.
15862# No need to generate them if there are no CONFIG_HEADERS.
15863# This happens for instance with `./config.status Makefile'.
15864if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015865cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015866BEGIN {
15867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869# Transform confdefs.h into an awk script `defines.awk', embedded as
15870# here-document in config.status, that substitutes the proper values into
15871# config.h.in to produce config.h.
15872
15873# Create a delimiter string that does not exist in confdefs.h, to ease
15874# handling of long lines.
15875ac_delim='%!_!# '
15876for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015877 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15878 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 break
15880 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015881 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 else
15883 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15884 fi
15885done
15886
15887# For the awk script, D is an array of macro values keyed by name,
15888# likewise P contains macro parameters if any. Preserve backslash
15889# newline sequences.
15890
15891ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15892sed -n '
15893s/.\{148\}/&'"$ac_delim"'/g
15894t rset
15895:rset
15896s/^[ ]*#[ ]*define[ ][ ]*/ /
15897t def
15898d
15899:def
15900s/\\$//
15901t bsnl
15902s/["\\]/\\&/g
15903s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15904D["\1"]=" \3"/p
15905s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15906d
15907:bsnl
15908s/["\\]/\\&/g
15909s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15910D["\1"]=" \3\\\\\\n"\\/p
15911t cont
15912s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15913t cont
15914d
15915:cont
15916n
15917s/.\{148\}/&'"$ac_delim"'/g
15918t clear
15919:clear
15920s/\\$//
15921t bsnlc
15922s/["\\]/\\&/g; s/^/"/; s/$/"/p
15923d
15924:bsnlc
15925s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15926b cont
15927' <confdefs.h | sed '
15928s/'"$ac_delim"'/"\\\
15929"/g' >>$CONFIG_STATUS || ac_write_fail=1
15930
15931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15932 for (key in D) D_is_set[key] = 1
15933 FS = ""
15934}
15935/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15936 line = \$ 0
15937 split(line, arg, " ")
15938 if (arg[1] == "#") {
15939 defundef = arg[2]
15940 mac1 = arg[3]
15941 } else {
15942 defundef = substr(arg[1], 2)
15943 mac1 = arg[2]
15944 }
15945 split(mac1, mac2, "(") #)
15946 macro = mac2[1]
15947 prefix = substr(line, 1, index(line, defundef) - 1)
15948 if (D_is_set[macro]) {
15949 # Preserve the white space surrounding the "#".
15950 print prefix "define", macro P[macro] D[macro]
15951 next
15952 } else {
15953 # Replace #undef with comments. This is necessary, for example,
15954 # in the case of _POSIX_SOURCE, which is predefined and required
15955 # on some systems where configure will not decide to define it.
15956 if (defundef == "undef") {
15957 print "/*", prefix defundef, macro, "*/"
15958 next
15959 }
15960 }
15961}
15962{ print }
15963_ACAWK
15964_ACEOF
15965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015966 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015967fi # test -n "$CONFIG_HEADERS"
15968
15969
15970eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15971shift
15972for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015973do
15974 case $ac_tag in
15975 :[FHLC]) ac_mode=$ac_tag; continue;;
15976 esac
15977 case $ac_mode$ac_tag in
15978 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015979 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980 :[FH]-) ac_tag=-:-;;
15981 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15982 esac
15983 ac_save_IFS=$IFS
15984 IFS=:
15985 set x $ac_tag
15986 IFS=$ac_save_IFS
15987 shift
15988 ac_file=$1
15989 shift
15990
15991 case $ac_mode in
15992 :L) ac_source=$1;;
15993 :[FH])
15994 ac_file_inputs=
15995 for ac_f
15996 do
15997 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015998 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999 *) # Look for the file first in the build tree, then in the source tree
16000 # (if the path is not absolute). The absolute path cannot be DOS-style,
16001 # because $ac_f cannot contain `:'.
16002 test -f "$ac_f" ||
16003 case $ac_f in
16004 [\\/$]*) false;;
16005 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16006 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016007 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016009 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16010 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016011 done
16012
16013 # Let's still pretend it is `configure' which instantiates (i.e., don't
16014 # use $as_me), people would be surprised to read:
16015 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016016 configure_input='Generated from '`
16017 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16018 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019 if test x"$ac_file" != x-; then
16020 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016021 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16022$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 # Neutralize special characters interpreted by sed in replacement strings.
16025 case $configure_input in #(
16026 *\&* | *\|* | *\\* )
16027 ac_sed_conf_input=`$as_echo "$configure_input" |
16028 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16029 *) ac_sed_conf_input=$configure_input;;
16030 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016031
16032 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016033 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16034 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035 esac
16036 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016037 esac
16038
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016040$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016041 X"$ac_file" : 'X\(//\)[^/]' \| \
16042 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016044$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16046 s//\1/
16047 q
16048 }
16049 /^X\(\/\/\)[^/].*/{
16050 s//\1/
16051 q
16052 }
16053 /^X\(\/\/\)$/{
16054 s//\1/
16055 q
16056 }
16057 /^X\(\/\).*/{
16058 s//\1/
16059 q
16060 }
16061 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 ac_builddir=.
16064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065case "$ac_dir" in
16066.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16067*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016068 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016070 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071 case $ac_top_builddir_sub in
16072 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16073 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16074 esac ;;
16075esac
16076ac_abs_top_builddir=$ac_pwd
16077ac_abs_builddir=$ac_pwd$ac_dir_suffix
16078# for backward compatibility:
16079ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016080
16081case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016083 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084 ac_top_srcdir=$ac_top_builddir_sub
16085 ac_abs_top_srcdir=$ac_pwd ;;
16086 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088 ac_top_srcdir=$srcdir
16089 ac_abs_top_srcdir=$srcdir ;;
16090 *) # Relative name.
16091 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16092 ac_top_srcdir=$ac_top_build_prefix$srcdir
16093 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016094esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016096
Martin v. Löwis11437992002-04-12 09:54:03 +000016097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016098 case $ac_mode in
16099 :F)
16100 #
16101 # CONFIG_FILE
16102 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016103
16104 case $INSTALL in
16105 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016107 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016108 ac_MKDIR_P=$MKDIR_P
16109 case $MKDIR_P in
16110 [\\/$]* | ?:[\\/]* ) ;;
16111 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16112 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016113_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116# If the template does not know about datarootdir, expand it.
16117# FIXME: This hack should be removed a few years after 2.60.
16118ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016119ac_sed_dataroot='
16120/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121 p
16122 q
16123}
16124/@datadir@/p
16125/@docdir@/p
16126/@infodir@/p
16127/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016128/@mandir@/p'
16129case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016130*datarootdir*) ac_datarootdir_seen=yes;;
16131*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16133$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016135cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 ac_datarootdir_hack='
16137 s&@datadir@&$datadir&g
16138 s&@docdir@&$docdir&g
16139 s&@infodir@&$infodir&g
16140 s&@localedir@&$localedir&g
16141 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016142 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143esac
16144_ACEOF
16145
16146# Neutralize VPATH when `$srcdir' = `.'.
16147# Shell code in configure.ac might set extrasub.
16148# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16150ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016151$extrasub
16152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016153cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016154:t
16155/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016156s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016157s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016158s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159s&@srcdir@&$ac_srcdir&;t t
16160s&@abs_srcdir@&$ac_abs_srcdir&;t t
16161s&@top_srcdir@&$ac_top_srcdir&;t t
16162s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16163s&@builddir@&$ac_builddir&;t t
16164s&@abs_builddir@&$ac_abs_builddir&;t t
16165s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16166s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016167s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016169"
Victor Stinnere0be4232011-10-25 13:06:09 +020016170eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16171 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016172
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016174 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16175 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16176 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016178which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016180which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016181
Victor Stinnere0be4232011-10-25 13:06:09 +020016182 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016184 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16185 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016186 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016187 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188 ;;
16189 :H)
16190 #
16191 # CONFIG_HEADER
16192 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016194 {
16195 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016196 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16197 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016198 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016199 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16201$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016202 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016204 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016205 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 fi
16207 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016209 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016210 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214
16215 esac
16216
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016217
16218 case $ac_file$ac_mode in
16219 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16220
16221 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222done # for ac_tag
16223
Guido van Rossum627b2d71993-12-24 10:39:16 +000016224
Matthias Kloseb9621712010-04-24 17:59:49 +000016225as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016226_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016227ac_clean_files=$ac_clean_files_save
16228
Matthias Kloseb9621712010-04-24 17:59:49 +000016229test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016230 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016231
Martin v. Löwis11437992002-04-12 09:54:03 +000016232
16233# configure is writing to config.log, and then calls config.status.
16234# config.status does its own redirection, appending to config.log.
16235# Unfortunately, on DOS this fails, as config.log is still kept open
16236# by configure, so config.status won't be able to write to it; its
16237# output is simply discarded. So we exec the FD to /dev/null,
16238# effectively closing config.log, so it can be properly (re)opened and
16239# appended to by config.status. When coming back to configure, we
16240# need to make the FD available again.
16241if test "$no_create" != yes; then
16242 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016243 ac_config_status_args=
16244 test "$silent" = yes &&
16245 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016247 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 exec 5>>config.log
16249 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16250 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016251 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016252fi
16253if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16255$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016256fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016257
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016258
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016259echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016260if test ! -f Modules/Setup
16261then
16262 cp $srcdir/Modules/Setup.dist Modules/Setup
16263fi
16264
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016265echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016266if test ! -f Modules/Setup.local
16267then
16268 echo "# Edit this file for local setup changes" >Modules/Setup.local
16269fi
16270
16271echo "creating Makefile"
16272$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16273 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016274 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016275mv config.c Modules