blob: 31fc3d6fbbb65a57aec2a869384867f95b4fd418 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003# Generated by GNU Autoconf 2.68 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +000011#
12#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000015## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000021if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000022 emulate sh
23 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000024 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000028else
Matthias Kloseb9621712010-04-24 17:59:49 +000029 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000034esac
Martin v. Löwis11437992002-04-12 09:54:03 +000035fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000036
37
Matthias Kloseb9621712010-04-24 17:59:49 +000038as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74fi
Martin v. Löwis11437992002-04-12 09:54:03 +000075
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000078 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000085
86# IFS
87# We need space, tab and new line, in precisely that order. Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091IFS=" "" $as_nl"
92
93# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020094as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000095case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000096 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000098for as_dir in $PATH
99do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000105
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000106 ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111 as_myself=$0
112fi
113if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000116fi
117
Matthias Kloseb9621712010-04-24 17:59:49 +0000118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there. '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000135
Matthias Kloseb9621712010-04-24 17:59:49 +0000136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153esac
154fi
155"
156 as_required="as_fn_return () { (exit \$1); }
157as_fn_success () { as_fn_return 0; }
158as_fn_failure () { as_fn_return 1; }
159as_fn_ret_success () { return 0; }
160as_fn_ret_failure () { return 1; }
161
162exitcode=0
163as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169else
170 exitcode=1; echo positional parameters were not saved.
171fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200172test x\$exitcode = x0 || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180else
181 as_have_required=no
182fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187as_found=false
188for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203fi
204fi
205 done;;
206 esac
207 as_found=false
208done
209$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212fi; }
213IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
Matthias Kloseb9621712010-04-24 17:59:49 +0000232fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242$0: http://bugs.python.org/ about your system, including
243$0: any error possibly output before this message. Then
244$0: install a modern shell, or manually run the script
245$0: under such a shell if you do have one."
246 fi
247 exit 1
248fi
249fi
250fi
251SHELL=${CONFIG_SHELL-/bin/sh}
252export SHELL
253# Unset more variables known to interfere with behavior of common tools.
254CLICOLOR_FORCE= GREP_OPTIONS=
255unset CLICOLOR_FORCE GREP_OPTIONS
256
257## --------------------- ##
258## M4sh Shell Functions. ##
259## --------------------- ##
260# as_fn_unset VAR
261# ---------------
262# Portably unset VAR.
263as_fn_unset ()
264{
265 { eval $1=; unset $1;}
266}
267as_unset=as_fn_unset
268
269# as_fn_set_status STATUS
270# -----------------------
271# Set $? to STATUS, without forking.
272as_fn_set_status ()
273{
274 return $1
275} # as_fn_set_status
276
277# as_fn_exit STATUS
278# -----------------
279# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280as_fn_exit ()
281{
282 set +e
283 as_fn_set_status $1
284 exit $1
285} # as_fn_exit
286
287# as_fn_mkdir_p
288# -------------
289# Create "$as_dir" as a directory, including parents if necessary.
290as_fn_mkdir_p ()
291{
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309$as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000331
332
333} # as_fn_mkdir_p
334# as_fn_append VAR VALUE
335# ----------------------
336# Append the text in VALUE to the end of the definition contained in VAR. Take
337# advantage of any shell optimizations that allow amortized linear growth over
338# repeated appends, instead of the typical quadratic growth present in naive
339# implementations.
340if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350fi # as_fn_append
351
352# as_fn_arith ARG...
353# ------------------
354# Perform arithmetic evaluation on the ARGs, and store the result in the
355# global $as_val. Take advantage of shells that can avoid forks. The arguments
356# must be portable across $(()) and expr.
357if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367fi # as_fn_arith
368
369
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200370# as_fn_error STATUS ERROR [LINENO LOG_FD]
371# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000372# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200374# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000375as_fn_error ()
376{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000381 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200382 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000383 as_fn_exit $as_status
384} # as_fn_error
385
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000386if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389else
390 as_expr=false
391fi
392
393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395else
396 as_basename=false
397fi
398
Matthias Kloseb9621712010-04-24 17:59:49 +0000399if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401else
402 as_dirname=false
403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000404
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000405as_me=`$as_basename -- "$0" ||
406$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000409$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
Matthias Kloseb9621712010-04-24 17:59:49 +0000424# Avoid depending upon Character Ranges.
425as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428as_cr_digits='0123456789'
429as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000430
431
Matthias Kloseb9621712010-04-24 17:59:49 +0000432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000446 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000449 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000450 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000451 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000452 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000459 # Exit status is that of the last command.
460 exit
461}
462
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000463ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000464case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000465-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000466 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 esac;;
472*)
473 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000474esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000475
Martin v. Löwis11437992002-04-12 09:54:03 +0000476rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000477if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479else
480 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000481 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000483if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200489 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200491 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200495 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +0000496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000497else
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200498 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000500rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000502
Skip Montanaro6dead952003-09-25 14:50:04 +0000503if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000504 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000505else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000506 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000507 as_mkdir_p=false
508fi
509
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200510if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530fi
531as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000532
533# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000534as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000535
536# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000537as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
539
Matthias Kloseb9621712010-04-24 17:59:49 +0000540test -n "$DJDIR" || exec 7<&0 </dev/null
541exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
543# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200544# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000545# so uname gets run too.
546ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
Martin v. Löwis11437992002-04-12 09:54:03 +0000548#
549# Initializations.
550#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000552ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000553ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000554LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000555cross_compiling=no
556subdirs=
557MFLAGS=
558MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
Martin v. Löwis11437992002-04-12 09:54:03 +0000560# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000561PACKAGE_NAME='python'
562PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000563PACKAGE_VERSION='3.3'
564PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000565PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000566PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000567
568ac_unique_file="Include/object.h"
569# Factoring default headers for most tests.
570ac_includes_default="\
571#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000573# include <sys/types.h>
574#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000575#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000576# include <sys/stat.h>
577#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000578#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000579# include <stdlib.h>
580# include <stddef.h>
581#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000582# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000583# include <stdlib.h>
584# endif
585#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000586#ifdef HAVE_STRING_H
587# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000588# include <memory.h>
589# endif
590# include <string.h>
591#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <strings.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef HAVE_STDINT_H
599# include <stdint.h>
600#endif
601#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <unistd.h>
603#endif"
604
Matthias Kloseb9621712010-04-24 17:59:49 +0000605ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000606SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000607THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000608SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000609LIBC
610LIBM
611HAVE_GETHOSTBYNAME
612HAVE_GETHOSTBYNAME_R
613HAVE_GETHOSTBYNAME_R_3_ARG
614HAVE_GETHOSTBYNAME_R_5_ARG
615HAVE_GETHOSTBYNAME_R_6_ARG
616LIBOBJS
617TRUE
618MACHDEP_OBJS
619DYNLOADFILE
620DLINCLDIR
621THREADOBJ
622LDLAST
623USE_THREAD_MODULE
624SIGNAL_OBJS
625USE_SIGNAL_MODULE
626LIBFFI_INCLUDEDIR
627PKG_CONFIG
628SHLIBS
629CFLAGSFORSHARED
630LINKFORSHARED
631CCSHARED
632BLDSHARED
633LDCXXSHARED
634LDSHARED
635SO
636LIBTOOL_CRUFT
637OTHER_LIBTOOL_OPT
638UNIVERSAL_ARCH_FLAGS
639BASECFLAGS
640OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000641ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000642LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100643MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000644INSTALL_DATA
645INSTALL_SCRIPT
646INSTALL_PROGRAM
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500647HAS_PYTHON
648DISABLE_ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200649ac_ct_READELF
650READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000651ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200652ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000653AR
654RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000655USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000656GNULD
657LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000658LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000659RUNSHARED
660INSTSONAME
661LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000662PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000663BLDLIBRARY
664DLLLIBRARY
665LDLIBRARY
666LIBRARY
667BUILDEXEEXT
668EGREP
669GREP
670CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200671NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000673MAINCC
674CXX
675OBJEXT
676EXEEXT
677ac_ct_CC
678CPPFLAGS
679LDFLAGS
680CFLAGS
681CC
682EXPORT_MACOSX_DEPLOYMENT_TARGET
683CONFIGURE_MACOSX_DEPLOYMENT_TARGET
684SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200685_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000686MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000687FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000688FRAMEWORKUNIXTOOLSPREFIX
689FRAMEWORKALTINSTALLLAST
690FRAMEWORKALTINSTALLFIRST
691FRAMEWORKINSTALLLAST
692FRAMEWORKINSTALLFIRST
693PYTHONFRAMEWORKINSTALLDIR
694PYTHONFRAMEWORKPREFIX
695PYTHONFRAMEWORKDIR
696PYTHONFRAMEWORKIDENTIFIER
697PYTHONFRAMEWORK
698LIPO_32BIT_FLAGS
699ARCH_RUN_32BIT
700UNIVERSALSDK
701CONFIG_ARGS
702SOVERSION
703VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200704PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100705host_os
706host_vendor
707host_cpu
708host
709build_os
710build_vendor
711build_cpu
712build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500713HAS_HG
714HGBRANCH
715HGTAG
716HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000717target_alias
718host_alias
719build_alias
720LIBS
721ECHO_T
722ECHO_N
723ECHO_C
724DEFS
725mandir
726localedir
727libdir
728psdir
729pdfdir
730dvidir
731htmldir
732infodir
733docdir
734oldincludedir
735includedir
736localstatedir
737sharedstatedir
738sysconfdir
739datadir
740datarootdir
741libexecdir
742sbindir
743bindir
744program_transform_name
745prefix
746exec_prefix
747PACKAGE_URL
748PACKAGE_BUGREPORT
749PACKAGE_STRING
750PACKAGE_VERSION
751PACKAGE_TARNAME
752PACKAGE_NAME
753PATH_SEPARATOR
754SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000755ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000756ac_user_opts='
757enable_option_checking
758enable_universalsdk
759with_universal_archs
760with_framework_name
761enable_framework
762with_gcc
763with_cxx_main
764with_suffix
765enable_shared
766enable_profiling
767with_pydebug
768with_libs
769with_system_expat
770with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100771with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000772enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000773with_dbmliborder
774with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000775with_threads
776with_thread
777enable_ipv6
778with_doc_strings
779with_tsc
780with_pymalloc
781with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000782with_fpectl
783with_libm
784with_libc
785enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000786with_computed_gotos
787'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788 ac_precious_vars='build_alias
789host_alias
790target_alias
791CC
792CFLAGS
793LDFLAGS
794LIBS
795CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200796CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000797
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000800ac_init_help=
801ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000802ac_unrecognized_opts=
803ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804# The variables have the same names as the options, with
805# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000806cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809no_recursion=
810prefix=NONE
811program_prefix=NONE
812program_suffix=NONE
813program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818x_includes=NONE
819x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000820
821# Installation directory options.
822# These are left unexpanded so users can "make install exec_prefix=/foo"
823# and all the variables that are supposed to be based on exec_prefix
824# by default will actually change.
825# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827bindir='${exec_prefix}/bin'
828sbindir='${exec_prefix}/sbin'
829libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830datarootdir='${prefix}/share'
831datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000832sysconfdir='${prefix}/etc'
833sharedstatedir='${prefix}/com'
834localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835includedir='${prefix}/include'
836oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
838infodir='${datarootdir}/info'
839htmldir='${docdir}'
840dvidir='${docdir}'
841pdfdir='${docdir}'
842psdir='${docdir}'
843libdir='${exec_prefix}/lib'
844localedir='${datarootdir}/locale'
845mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 # If the previous option needs an argument, assign it.
852 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854 ac_prev=
855 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200859 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
860 *=) ac_optarg= ;;
861 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 # Accept the important Cygnus configure options, so we can diagnose typos.
865
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866 case $ac_dashdash$ac_option in
867 --)
868 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870 -bindir | --bindir | --bindi | --bind | --bin | --bi)
871 ac_prev=bindir ;;
872 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874
875 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880 -cache-file | --cache-file | --cache-fil | --cache-fi \
881 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
882 ac_prev=cache_file ;;
883 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
884 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 cache_file=$ac_optarg ;;
886
887 --config-cache | -C)
888 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
896 | --dataroo | --dataro | --datar)
897 ac_prev=datarootdir ;;
898 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
899 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
900 datarootdir=$ac_optarg ;;
901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000903 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000905 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200906 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000907 ac_useropt_orig=$ac_useropt
908 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
909 case $ac_user_opts in
910 *"
911"enable_$ac_useropt"
912"*) ;;
913 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
914 ac_unrecognized_sep=', ';;
915 esac
916 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917
918 -docdir | --docdir | --docdi | --doc | --do)
919 ac_prev=docdir ;;
920 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
921 docdir=$ac_optarg ;;
922
923 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
924 ac_prev=dvidir ;;
925 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
926 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
928 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200932 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 ac_useropt_orig=$ac_useropt
934 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
935 case $ac_user_opts in
936 *"
937"enable_$ac_useropt"
938"*) ;;
939 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
940 ac_unrecognized_sep=', ';;
941 esac
942 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
945 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
946 | --exec | --exe | --ex)
947 ac_prev=exec_prefix ;;
948 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
949 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
950 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952
953 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Obsolete; use --with-gas.
955 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 -help | --help | --hel | --he | -h)
958 ac_init_help=long ;;
959 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
960 ac_init_help=recursive ;;
961 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
962 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000969 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
970 ac_prev=htmldir ;;
971 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
972 | --ht=*)
973 htmldir=$ac_optarg ;;
974
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000975 -includedir | --includedir | --includedi | --included | --include \
976 | --includ | --inclu | --incl | --inc)
977 ac_prev=includedir ;;
978 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
979 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981
982 -infodir | --infodir | --infodi | --infod | --info | --inf)
983 ac_prev=infodir ;;
984 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -libdir | --libdir | --libdi | --libd)
988 ac_prev=libdir ;;
989 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
993 | --libexe | --libex | --libe)
994 ac_prev=libexecdir ;;
995 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
996 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 -localedir | --localedir | --localedi | --localed | --locale)
1000 ac_prev=localedir ;;
1001 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1002 localedir=$ac_optarg ;;
1003
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001006 ac_prev=localstatedir ;;
1007 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001008 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1012 ac_prev=mandir ;;
1013 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --without-fp.
1018 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 no_create=yes ;;
1023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1025 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1026 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1029 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1030 | --oldin | --oldi | --old | --ol | --o)
1031 ac_prev=oldincludedir ;;
1032 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1033 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1034 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1038 ac_prev=prefix ;;
1039 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1043 | --program-pre | --program-pr | --program-p)
1044 ac_prev=program_prefix ;;
1045 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1046 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
1049 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1050 | --program-suf | --program-su | --program-s)
1051 ac_prev=program_suffix ;;
1052 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1053 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -program-transform-name | --program-transform-name \
1057 | --program-transform-nam | --program-transform-na \
1058 | --program-transform-n | --program-transform- \
1059 | --program-transform | --program-transfor \
1060 | --program-transfo | --program-transf \
1061 | --program-trans | --program-tran \
1062 | --progr-tra | --program-tr | --program-t)
1063 ac_prev=program_transform_name ;;
1064 -program-transform-name=* | --program-transform-name=* \
1065 | --program-transform-nam=* | --program-transform-na=* \
1066 | --program-transform-n=* | --program-transform-=* \
1067 | --program-transform=* | --program-transfor=* \
1068 | --program-transfo=* | --program-transf=* \
1069 | --program-trans=* | --program-tran=* \
1070 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1074 ac_prev=pdfdir ;;
1075 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1076 pdfdir=$ac_optarg ;;
1077
1078 -psdir | --psdir | --psdi | --psd | --ps)
1079 ac_prev=psdir ;;
1080 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1081 psdir=$ac_optarg ;;
1082
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1084 | -silent | --silent | --silen | --sile | --sil)
1085 silent=yes ;;
1086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1088 ac_prev=sbindir ;;
1089 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1090 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
1093 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1094 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1095 | --sharedst | --shareds | --shared | --share | --shar \
1096 | --sha | --sh)
1097 ac_prev=sharedstatedir ;;
1098 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1099 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1100 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1101 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001104 -site | --site | --sit)
1105 ac_prev=site ;;
1106 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1110 ac_prev=srcdir ;;
1111 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1115 | --syscon | --sysco | --sysc | --sys | --sy)
1116 ac_prev=sysconfdir ;;
1117 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1118 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
1126 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1127 verbose=yes ;;
1128
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 -version | --version | --versio | --versi | --vers | -V)
1130 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001133 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001136 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001150 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001151 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001152 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001153 ac_useropt_orig=$ac_useropt
1154 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1155 case $ac_user_opts in
1156 *"
1157"with_$ac_useropt"
1158"*) ;;
1159 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1160 ac_unrecognized_sep=', ';;
1161 esac
1162 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 --x)
1165 # Obsolete; use --with-x.
1166 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1169 | --x-incl | --x-inc | --x-in | --x-i)
1170 ac_prev=x_includes ;;
1171 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1172 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1176 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1177 ac_prev=x_libraries ;;
1178 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1179 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001182 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1183Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ;;
1185
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 *=*)
1187 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1188 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 case $ac_envvar in #(
1190 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001191 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001193 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 export $ac_envvar ;;
1195
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001196 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001201 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202 ;;
1203
1204 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205done
1206
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210fi
1211
Matthias Kloseb9621712010-04-24 17:59:49 +00001212if test -n "$ac_unrecognized_opts"; then
1213 case $enable_option_checking in
1214 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1217 esac
1218fi
1219
1220# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1222 datadir sysconfdir sharedstatedir localstatedir includedir \
1223 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1224 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 # Remove trailing slashes.
1228 case $ac_val in
1229 */ )
1230 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1231 eval $ac_var=\$ac_val;;
1232 esac
1233 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 [\\/$]* | ?:[\\/]* ) continue;;
1236 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001238 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001239done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241# There might be people who depend on the old broken behavior: `$host'
1242# used to hold the argument of --host etc.
1243# FIXME: To remove some day.
1244build=$build_alias
1245host=$host_alias
1246target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248# FIXME: To remove some day.
1249if test "x$host_alias" != x; then
1250 if test "x$build_alias" = x; then
1251 cross_compiling=maybe
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001252 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1253 If a cross compiler is detected then cross compile mode will be used" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 elif test "x$build_alias" != "x$host_alias"; then
1255 cross_compiling=yes
1256 fi
1257fi
1258
1259ac_tool_prefix=
1260test -n "$host_alias" && ac_tool_prefix=$host_alias-
1261
1262test "$silent" = yes && exec 6>/dev/null
1263
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265ac_pwd=`pwd` && test -n "$ac_pwd" &&
1266ac_ls_di=`ls -di .` &&
1267ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001270 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271
1272
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273# Find the source files, if location was not specified.
1274if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001277 ac_confdir=`$as_dirname -- "$as_myself" ||
1278$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1279 X"$as_myself" : 'X\(//\)[^/]' \| \
1280 X"$as_myself" : 'X\(//\)$' \| \
1281 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1282$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1284 s//\1/
1285 q
1286 }
1287 /^X\(\/\/\)[^/].*/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\/\)$/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\).*/{
1296 s//\1/
1297 q
1298 }
1299 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302 srcdir=..
1303 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304else
1305 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307if test ! -r "$srcdir/$ac_unique_file"; then
1308 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1312ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001313 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001314 pwd)`
1315# When building in place, set srcdir=.
1316if test "$ac_abs_confdir" = "$ac_pwd"; then
1317 srcdir=.
1318fi
1319# Remove unnecessary trailing slashes from srcdir.
1320# Double slashes in file names in object file debugging info
1321# mess up M-x gdb in Emacs.
1322case $srcdir in
1323*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1324esac
1325for ac_var in $ac_precious_vars; do
1326 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1327 eval ac_env_${ac_var}_value=\$${ac_var}
1328 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1329 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1330done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331
Martin v. Löwis11437992002-04-12 09:54:03 +00001332#
1333# Report the --help message.
1334#
1335if test "$ac_init_help" = "long"; then
1336 # Omit some internal or obsolete options to make the list less imposing.
1337 # This message is too long to be a string in the A/UX 3.1 sh.
1338 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001339\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341Usage: $0 [OPTION]... [VAR=VALUE]...
1342
1343To assign environment variables (e.g., CC, CFLAGS...), specify them as
1344VAR=VALUE. See below for descriptions of some of the useful variables.
1345
1346Defaults for the options are specified in brackets.
1347
1348Configuration:
1349 -h, --help display this help and exit
1350 --help=short display options specific to this package
1351 --help=recursive display the short help of all the included packages
1352 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001353 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001354 --cache-file=FILE cache test results in FILE [disabled]
1355 -C, --config-cache alias for \`--cache-file=config.cache'
1356 -n, --no-create do not create output files
1357 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1358
Martin v. Löwis11437992002-04-12 09:54:03 +00001359Installation directories:
1360 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001361 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001362 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001363 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001364
1365By default, \`make install' will install all the files in
1366\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1367an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1368for instance \`--prefix=\$HOME'.
1369
1370For better control, use the options below.
1371
1372Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 --bindir=DIR user executables [EPREFIX/bin]
1374 --sbindir=DIR system admin executables [EPREFIX/sbin]
1375 --libexecdir=DIR program executables [EPREFIX/libexec]
1376 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1377 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1378 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1379 --libdir=DIR object code libraries [EPREFIX/lib]
1380 --includedir=DIR C header files [PREFIX/include]
1381 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1382 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1383 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1384 --infodir=DIR info documentation [DATAROOTDIR/info]
1385 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1386 --mandir=DIR man documentation [DATAROOTDIR/man]
1387 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1388 --htmldir=DIR html documentation [DOCDIR]
1389 --dvidir=DIR dvi documentation [DOCDIR]
1390 --pdfdir=DIR pdf documentation [DOCDIR]
1391 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392_ACEOF
1393
1394 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001395
1396System types:
1397 --build=BUILD configure for building on BUILD [guessed]
1398 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001399_ACEOF
1400fi
1401
1402if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001403 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001404 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001405 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 cat <<\_ACEOF
1407
1408Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001409 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001410 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1411 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001412 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001413 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001414 --enable-framework[=INSTALLDIR]
1415 Build (MacOSX|Darwin) framework
1416 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001417 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001418 --enable-loadable-sqlite-extensions
1419 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --enable-ipv6 Enable ipv6 (with ipv4) support
1421 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001422 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425Optional Packages:
1426 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1427 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001428 --with-universal-archs=ARCH
1429 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001430 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001431 --with-framework-name=FRAMEWORK
1432 specify an alternate name of the framework built
1433 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001435 --with-cxx-main=<compiler>
1436 compile main() and link python executable with C++
1437 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001438 --with-suffix=.exe set executable suffix
1439 --with-pydebug build with Py_DEBUG defined
1440 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001441 --with-system-expat build pyexpat module using an installed expat
1442 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001443 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001444 --with-system-libmpdec build _decimal module using an installed libmpdec
1445 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001446 --with-dbmliborder=db1:db2:...
1447 order to check db backends for dbm. Valid value is a
1448 colon separated string with the backend names
1449 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with(out)-threads[=DIRECTORY]
1452 disable/enable thread support
1453 --with(out)-thread[=DIRECTORY]
1454 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001456 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001458 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with-fpectl enable SIGFPE catching
1460 --with-libm=STRING math library
1461 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001462 --with(out)-computed-gotos
1463 Use computed gotos in evaluation loop (enabled by
1464 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001465
1466Some influential environment variables:
1467 CC C compiler command
1468 CFLAGS C compiler flags
1469 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1470 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001471 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001473 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 CPP C preprocessor
1475
1476Use these variables to override the choices made by `configure' or to help
1477it to find libraries and programs with nonstandard names/locations.
1478
Georg Brandle2e15612009-05-20 18:25:10 +00001479Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001480_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001481ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001482fi
1483
1484if test "$ac_init_help" = "recursive"; then
1485 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 test -d "$ac_dir" ||
1488 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1489 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 ac_builddir=.
1491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492case "$ac_dir" in
1493.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1494*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001497 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498 case $ac_top_builddir_sub in
1499 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1501 esac ;;
1502esac
1503ac_abs_top_builddir=$ac_pwd
1504ac_abs_builddir=$ac_pwd$ac_dir_suffix
1505# for backward compatibility:
1506ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001507
1508case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001509 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 ac_top_srcdir=$ac_top_builddir_sub
1512 ac_abs_top_srcdir=$ac_pwd ;;
1513 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 ac_top_srcdir=$srcdir
1516 ac_abs_top_srcdir=$srcdir ;;
1517 *) # Relative name.
1518 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1519 ac_top_srcdir=$ac_top_build_prefix$srcdir
1520 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001521esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 cd "$ac_dir" || { ac_status=$?; continue; }
1525 # Check for guested configure.
1526 if test -f "$ac_srcdir/configure.gnu"; then
1527 echo &&
1528 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1529 elif test -f "$ac_srcdir/configure"; then
1530 echo &&
1531 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001533 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 fi || ac_status=$?
1535 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 done
1537fi
1538
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001540if $ac_init_version; then
1541 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001542python configure 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001543generated by GNU Autoconf 2.68
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001545Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546This configure script is free software; the Free Software Foundation
1547gives unlimited permission to copy, distribute and modify it.
1548_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001551
1552## ------------------------ ##
1553## Autoconf initialization. ##
1554## ------------------------ ##
1555
1556# ac_fn_c_try_compile LINENO
1557# --------------------------
1558# Try to compile conftest.$ac_ext, and return whether this succeeded.
1559ac_fn_c_try_compile ()
1560{
1561 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1562 rm -f conftest.$ac_objext
1563 if { { ac_try="$ac_compile"
1564case "(($ac_try" in
1565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1566 *) ac_try_echo=$ac_try;;
1567esac
1568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1569$as_echo "$ac_try_echo"; } >&5
1570 (eval "$ac_compile") 2>conftest.err
1571 ac_status=$?
1572 if test -s conftest.err; then
1573 grep -v '^ *+' conftest.err >conftest.er1
1574 cat conftest.er1 >&5
1575 mv -f conftest.er1 conftest.err
1576 fi
1577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1578 test $ac_status = 0; } && {
1579 test -z "$ac_c_werror_flag" ||
1580 test ! -s conftest.err
1581 } && test -s conftest.$ac_objext; then :
1582 ac_retval=0
1583else
1584 $as_echo "$as_me: failed program was:" >&5
1585sed 's/^/| /' conftest.$ac_ext >&5
1586
1587 ac_retval=1
1588fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001589 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 as_fn_set_status $ac_retval
1591
1592} # ac_fn_c_try_compile
1593
Matthias Kloseb9621712010-04-24 17:59:49 +00001594# ac_fn_c_try_link LINENO
1595# -----------------------
1596# Try to link conftest.$ac_ext, and return whether this succeeded.
1597ac_fn_c_try_link ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 rm -f conftest.$ac_objext conftest$ac_exeext
1601 if { { ac_try="$ac_link"
1602case "(($ac_try" in
1603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1604 *) ac_try_echo=$ac_try;;
1605esac
1606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1607$as_echo "$ac_try_echo"; } >&5
1608 (eval "$ac_link") 2>conftest.err
1609 ac_status=$?
1610 if test -s conftest.err; then
1611 grep -v '^ *+' conftest.err >conftest.er1
1612 cat conftest.er1 >&5
1613 mv -f conftest.er1 conftest.err
1614 fi
1615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1616 test $ac_status = 0; } && {
1617 test -z "$ac_c_werror_flag" ||
1618 test ! -s conftest.err
1619 } && test -s conftest$ac_exeext && {
1620 test "$cross_compiling" = yes ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001621 $as_test_x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001622 }; then :
1623 ac_retval=0
1624else
1625 $as_echo "$as_me: failed program was:" >&5
1626sed 's/^/| /' conftest.$ac_ext >&5
1627
1628 ac_retval=1
1629fi
1630 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1631 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1632 # interfere with the next link command; also delete a directory that is
1633 # left behind by Apple's compiler. We do this before executing the actions.
1634 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001635 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001636 as_fn_set_status $ac_retval
1637
1638} # ac_fn_c_try_link
1639
Matthias Kloseb9621712010-04-24 17:59:49 +00001640# ac_fn_c_try_cpp LINENO
1641# ----------------------
1642# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1643ac_fn_c_try_cpp ()
1644{
1645 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646 if { { ac_try="$ac_cpp conftest.$ac_ext"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001661 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001662 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 }; then :
1665 ac_retval=0
1666else
1667 $as_echo "$as_me: failed program was:" >&5
1668sed 's/^/| /' conftest.$ac_ext >&5
1669
1670 ac_retval=1
1671fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001672 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001673 as_fn_set_status $ac_retval
1674
1675} # ac_fn_c_try_cpp
1676
1677# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1678# -------------------------------------------------------
1679# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1680# the include files in INCLUDES and setting the cache variable VAR
1681# accordingly.
1682ac_fn_c_check_header_mongrel ()
1683{
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001685 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1687$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001688if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001689 $as_echo_n "(cached) " >&6
1690fi
1691eval ac_res=\$$3
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1693$as_echo "$ac_res" >&6; }
1694else
1695 # Is the header compilable?
1696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1697$as_echo_n "checking $2 usability... " >&6; }
1698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699/* end confdefs.h. */
1700$4
1701#include <$2>
1702_ACEOF
1703if ac_fn_c_try_compile "$LINENO"; then :
1704 ac_header_compiler=yes
1705else
1706 ac_header_compiler=no
1707fi
1708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1710$as_echo "$ac_header_compiler" >&6; }
1711
1712# Is the header present?
1713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1714$as_echo_n "checking $2 presence... " >&6; }
1715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1716/* end confdefs.h. */
1717#include <$2>
1718_ACEOF
1719if ac_fn_c_try_cpp "$LINENO"; then :
1720 ac_header_preproc=yes
1721else
1722 ac_header_preproc=no
1723fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001724rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1726$as_echo "$ac_header_preproc" >&6; }
1727
1728# So? What about this header?
1729case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1730 yes:no: )
1731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1732$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1734$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1735 ;;
1736 no:yes:* )
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1738$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1740$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1742$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1744$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1746$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001747( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001748## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001749## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 ) | sed "s/^/$as_me: WARNING: /" >&2
1751 ;;
1752esac
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1754$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001755if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 $as_echo_n "(cached) " >&6
1757else
1758 eval "$3=\$ac_header_compiler"
1759fi
1760eval ac_res=\$$3
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1762$as_echo "$ac_res" >&6; }
1763fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765
1766} # ac_fn_c_check_header_mongrel
1767
1768# ac_fn_c_try_run LINENO
1769# ----------------------
1770# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1771# that executables *can* be run.
1772ac_fn_c_try_run ()
1773{
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1775 if { { ac_try="$ac_link"
1776case "(($ac_try" in
1777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1778 *) ac_try_echo=$ac_try;;
1779esac
1780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1781$as_echo "$ac_try_echo"; } >&5
1782 (eval "$ac_link") 2>&5
1783 ac_status=$?
1784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1785 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1786 { { case "(($ac_try" in
1787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1788 *) ac_try_echo=$ac_try;;
1789esac
1790eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1791$as_echo "$ac_try_echo"; } >&5
1792 (eval "$ac_try") 2>&5
1793 ac_status=$?
1794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1795 test $ac_status = 0; }; }; then :
1796 ac_retval=0
1797else
1798 $as_echo "$as_me: program exited with status $ac_status" >&5
1799 $as_echo "$as_me: failed program was:" >&5
1800sed 's/^/| /' conftest.$ac_ext >&5
1801
1802 ac_retval=$ac_status
1803fi
1804 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001806 as_fn_set_status $ac_retval
1807
1808} # ac_fn_c_try_run
1809
1810# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1811# -------------------------------------------------------
1812# Tests whether HEADER exists and can be compiled using the include files in
1813# INCLUDES, setting the cache variable VAR accordingly.
1814ac_fn_c_check_header_compile ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001819if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 $as_echo_n "(cached) " >&6
1821else
1822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1823/* end confdefs.h. */
1824$4
1825#include <$2>
1826_ACEOF
1827if ac_fn_c_try_compile "$LINENO"; then :
1828 eval "$3=yes"
1829else
1830 eval "$3=no"
1831fi
1832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1833fi
1834eval ac_res=\$$3
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1836$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001838
1839} # ac_fn_c_check_header_compile
1840
Matthias Kloseb9621712010-04-24 17:59:49 +00001841# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1842# -------------------------------------------
1843# Tests whether TYPE exists after having included INCLUDES, setting cache
1844# variable VAR accordingly.
1845ac_fn_c_check_type ()
1846{
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1849$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001850if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 $as_echo_n "(cached) " >&6
1852else
1853 eval "$3=no"
1854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1855/* end confdefs.h. */
1856$4
1857int
1858main ()
1859{
1860if (sizeof ($2))
1861 return 0;
1862 ;
1863 return 0;
1864}
1865_ACEOF
1866if ac_fn_c_try_compile "$LINENO"; then :
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870int
1871main ()
1872{
1873if (sizeof (($2)))
1874 return 0;
1875 ;
1876 return 0;
1877}
1878_ACEOF
1879if ac_fn_c_try_compile "$LINENO"; then :
1880
1881else
1882 eval "$3=yes"
1883fi
1884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1885fi
1886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1887fi
1888eval ac_res=\$$3
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1890$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001891 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001892
1893} # ac_fn_c_check_type
1894
1895# ac_fn_c_find_uintX_t LINENO BITS VAR
1896# ------------------------------------
1897# Finds an unsigned integer type with width BITS, setting cache variable VAR
1898# accordingly.
1899ac_fn_c_find_uintX_t ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1903$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001904if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001905 $as_echo_n "(cached) " >&6
1906else
1907 eval "$3=no"
1908 # Order is important - never check a type that is potentially smaller
1909 # than half of the expected target width.
1910 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1911 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$ac_includes_default
1915int
1916main ()
1917{
1918static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001919test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921 ;
1922 return 0;
1923}
1924_ACEOF
1925if ac_fn_c_try_compile "$LINENO"; then :
1926 case $ac_type in #(
1927 uint$2_t) :
1928 eval "$3=yes" ;; #(
1929 *) :
1930 eval "$3=\$ac_type" ;;
1931esac
1932fi
1933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001934 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001935
1936else
1937 break
1938fi
1939 done
1940fi
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001945
1946} # ac_fn_c_find_uintX_t
1947
1948# ac_fn_c_find_intX_t LINENO BITS VAR
1949# -----------------------------------
1950# Finds a signed integer type with width BITS, setting cache variable VAR
1951# accordingly.
1952ac_fn_c_find_intX_t ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1956$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 $as_echo_n "(cached) " >&6
1959else
1960 eval "$3=no"
1961 # Order is important - never check a type that is potentially smaller
1962 # than half of the expected target width.
1963 for ac_type in int$2_t 'int' 'long int' \
1964 'long long int' 'short int' 'signed char'; do
1965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966/* end confdefs.h. */
1967$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001968 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001969int
1970main ()
1971{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001972static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001973test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001983 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001984int
1985main ()
1986{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001987static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00001988 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02001989test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991 ;
1992 return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"; then :
1996
1997else
1998 case $ac_type in #(
1999 int$2_t) :
2000 eval "$3=yes" ;; #(
2001 *) :
2002 eval "$3=\$ac_type" ;;
2003esac
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006fi
2007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002008 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002009
2010else
2011 break
2012fi
2013 done
2014fi
2015eval ac_res=\$$3
2016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2017$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002018 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020} # ac_fn_c_find_intX_t
2021
2022# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2023# --------------------------------------------
2024# Tries to find the compile-time value of EXPR in a program that includes
2025# INCLUDES, setting VAR accordingly. Returns whether the value could be
2026# computed
2027ac_fn_c_compute_int ()
2028{
2029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030 if test "$cross_compiling" = yes; then
2031 # Depending upon the size, compute the lo and hi bounds.
2032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$4
2035int
2036main ()
2037{
2038static int test_array [1 - 2 * !(($2) >= 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002039test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002040
2041 ;
2042 return 0;
2043}
2044_ACEOF
2045if ac_fn_c_try_compile "$LINENO"; then :
2046 ac_lo=0 ac_mid=0
2047 while :; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$4
2051int
2052main ()
2053{
2054static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002055test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=$ac_mid; break
2063else
2064 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2065 if test $ac_lo -le $ac_mid; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002081test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002082
2083 ;
2084 return 0;
2085}
2086_ACEOF
2087if ac_fn_c_try_compile "$LINENO"; then :
2088 ac_hi=-1 ac_mid=-1
2089 while :; do
2090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h. */
2092$4
2093int
2094main ()
2095{
2096static int test_array [1 - 2 * !(($2) >= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002097test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_lo=$ac_mid; break
2105else
2106 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2107 if test $ac_mid -le $ac_hi; then
2108 ac_lo= ac_hi=
2109 break
2110 fi
2111 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114 done
2115else
2116 ac_lo= ac_hi=
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121# Binary search between lo and hi bounds.
2122while test "x$ac_lo" != "x$ac_hi"; do
2123 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) <= $ac_mid)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002131test_array [0] = 0
Matthias Kloseb9621712010-04-24 17:59:49 +00002132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_hi=$ac_mid
2139else
2140 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143done
2144case $ac_lo in #((
2145?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2146'') ac_retval=1 ;;
2147esac
2148 else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152static long int longval () { return $2; }
2153static unsigned long int ulongval () { return $2; }
2154#include <stdio.h>
2155#include <stdlib.h>
2156int
2157main ()
2158{
2159
2160 FILE *f = fopen ("conftest.val", "w");
2161 if (! f)
2162 return 1;
2163 if (($2) < 0)
2164 {
2165 long int i = longval ();
2166 if (i != ($2))
2167 return 1;
2168 fprintf (f, "%ld", i);
2169 }
2170 else
2171 {
2172 unsigned long int i = ulongval ();
2173 if (i != ($2))
2174 return 1;
2175 fprintf (f, "%lu", i);
2176 }
2177 /* Do not output a trailing newline, as this causes \r\n confusion
2178 on some platforms. */
2179 return ferror (f) || fclose (f) != 0;
2180
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_run "$LINENO"; then :
2186 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2187else
2188 ac_retval=1
2189fi
2190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2191 conftest.$ac_objext conftest.beam conftest.$ac_ext
2192rm -f conftest.val
2193
2194 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002195 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002196 as_fn_set_status $ac_retval
2197
2198} # ac_fn_c_compute_int
2199
2200# ac_fn_c_check_func LINENO FUNC VAR
2201# ----------------------------------
2202# Tests whether FUNC exists, setting the cache variable VAR accordingly
2203ac_fn_c_check_func ()
2204{
2205 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002208if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002209 $as_echo_n "(cached) " >&6
2210else
2211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212/* end confdefs.h. */
2213/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2214 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2215#define $2 innocuous_$2
2216
2217/* System header to define __stub macros and hopefully few prototypes,
2218 which can conflict with char $2 (); below.
2219 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2220 <limits.h> exists even on freestanding compilers. */
2221
2222#ifdef __STDC__
2223# include <limits.h>
2224#else
2225# include <assert.h>
2226#endif
2227
2228#undef $2
2229
2230/* Override any GCC internal prototype to avoid an error.
2231 Use char because int might match the return type of a GCC
2232 builtin and then its argument prototype would still apply. */
2233#ifdef __cplusplus
2234extern "C"
2235#endif
2236char $2 ();
2237/* The GNU C library defines this for functions which it implements
2238 to always fail with ENOSYS. Some functions are actually named
2239 something starting with __ and the normal name is an alias. */
2240#if defined __stub_$2 || defined __stub___$2
2241choke me
2242#endif
2243
2244int
2245main ()
2246{
2247return $2 ();
2248 ;
2249 return 0;
2250}
2251_ACEOF
2252if ac_fn_c_try_link "$LINENO"; then :
2253 eval "$3=yes"
2254else
2255 eval "$3=no"
2256fi
2257rm -f core conftest.err conftest.$ac_objext \
2258 conftest$ac_exeext conftest.$ac_ext
2259fi
2260eval ac_res=\$$3
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2262$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002263 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002264
2265} # ac_fn_c_check_func
2266
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002267# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2268# ---------------------------------------------
2269# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2270# accordingly.
2271ac_fn_c_check_decl ()
2272{
2273 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274 as_decl_name=`echo $2|sed 's/ *(.*//'`
2275 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2277$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2278if eval \${$3+:} false; then :
2279 $as_echo_n "(cached) " >&6
2280else
2281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282/* end confdefs.h. */
2283$4
2284int
2285main ()
2286{
2287#ifndef $as_decl_name
2288#ifdef __cplusplus
2289 (void) $as_decl_use;
2290#else
2291 (void) $as_decl_name;
2292#endif
2293#endif
2294
2295 ;
2296 return 0;
2297}
2298_ACEOF
2299if ac_fn_c_try_compile "$LINENO"; then :
2300 eval "$3=yes"
2301else
2302 eval "$3=no"
2303fi
2304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305fi
2306eval ac_res=\$$3
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2308$as_echo "$ac_res" >&6; }
2309 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310
2311} # ac_fn_c_check_decl
2312
Matthias Kloseb9621712010-04-24 17:59:49 +00002313# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2314# ----------------------------------------------------
2315# Tries to find if the field MEMBER exists in type AGGR, after including
2316# INCLUDES, setting cache variable VAR accordingly.
2317ac_fn_c_check_member ()
2318{
2319 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2321$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002322if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002323 $as_echo_n "(cached) " >&6
2324else
2325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2326/* end confdefs.h. */
2327$5
2328int
2329main ()
2330{
2331static $2 ac_aggr;
2332if (ac_aggr.$3)
2333return 0;
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$4=yes"
2340else
2341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2342/* end confdefs.h. */
2343$5
2344int
2345main ()
2346{
2347static $2 ac_aggr;
2348if (sizeof ac_aggr.$3)
2349return 0;
2350 ;
2351 return 0;
2352}
2353_ACEOF
2354if ac_fn_c_try_compile "$LINENO"; then :
2355 eval "$4=yes"
2356else
2357 eval "$4=no"
2358fi
2359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360fi
2361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362fi
2363eval ac_res=\$$4
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002366 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002367
2368} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002370This file contains any messages produced by compilers while
2371running configure, to aid debugging if configure makes a mistake.
2372
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002373It was created by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002374generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002375
2376 $ $0 $@
2377
2378_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002379exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002380{
2381cat <<_ASUNAME
2382## --------- ##
2383## Platform. ##
2384## --------- ##
2385
2386hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2387uname -m = `(uname -m) 2>/dev/null || echo unknown`
2388uname -r = `(uname -r) 2>/dev/null || echo unknown`
2389uname -s = `(uname -s) 2>/dev/null || echo unknown`
2390uname -v = `(uname -v) 2>/dev/null || echo unknown`
2391
2392/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2393/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2394
2395/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2396/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2397/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002398/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002399/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2400/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2401/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2402
2403_ASUNAME
2404
2405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2406for as_dir in $PATH
2407do
2408 IFS=$as_save_IFS
2409 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 $as_echo "PATH: $as_dir"
2411 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002413
2414} >&5
2415
2416cat >&5 <<_ACEOF
2417
2418
2419## ----------- ##
2420## Core tests. ##
2421## ----------- ##
2422
2423_ACEOF
2424
2425
2426# Keep a trace of the command line.
2427# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002428# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002429# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002430# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002431ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002432ac_configure_args0=
2433ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002434ac_must_keep_next=false
2435for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002436do
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 for ac_arg
2438 do
2439 case $ac_arg in
2440 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2441 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2442 | -silent | --silent | --silen | --sile | --sil)
2443 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002445 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002446 esac
2447 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002449 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002450 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002451 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002452 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002453 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002454 case $ac_arg in
2455 *=* | --config-cache | -C | -disable-* | --disable-* \
2456 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2457 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2458 | -with-* | --with-* | -without-* | --without-* | --x)
2459 case "$ac_configure_args0 " in
2460 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2461 esac
2462 ;;
2463 -* ) ac_must_keep_next=true ;;
2464 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470done
Matthias Kloseb9621712010-04-24 17:59:49 +00002471{ ac_configure_args0=; unset ac_configure_args0;}
2472{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002473
2474# When interrupted or exit'd, cleanup temporary files, and complete
2475# config.log. We remove comments because anyway the quotes in there
2476# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477# WARNING: Use '\'' to represent an apostrophe within the trap.
2478# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002479trap 'exit_status=$?
2480 # Save into config.log some information that might help in debugging.
2481 {
2482 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002483
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002484 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002485## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
2488 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489(
2490 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2491 eval ac_val=\$$ac_var
2492 case $ac_val in #(
2493 *${as_nl}*)
2494 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2496$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
2498 case $ac_var in #(
2499 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2501 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502 esac ;;
2503 esac
2504 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002505 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2507 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 "s/'\''/'\''\\\\'\'''\''/g;
2510 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2511 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002512 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002514 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac |
2516 sort
2517)
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002519
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002521## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 echo
2524 for ac_var in $ac_subst_vars
2525 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 eval ac_val=\$$ac_var
2527 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 done | sort
2532 echo
2533
2534 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 echo
2539 for ac_var in $ac_subst_files
2540 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 eval ac_val=\$$ac_var
2542 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 done | sort
2547 echo
2548 fi
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002552## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002556 echo
2557 fi
2558 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 $as_echo "$as_me: caught signal $ac_signal"
2560 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 rm -f core *.core core.conftest.* &&
2563 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002566for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002567 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002568done
2569ac_signal=0
2570
2571# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
Matthias Kloseb9621712010-04-24 17:59:49 +00002574$as_echo "/* confdefs.h */" > confdefs.h
2575
Martin v. Löwis11437992002-04-12 09:54:03 +00002576# Predefined preprocessor variables.
2577
2578cat >>confdefs.h <<_ACEOF
2579#define PACKAGE_NAME "$PACKAGE_NAME"
2580_ACEOF
2581
Martin v. Löwis11437992002-04-12 09:54:03 +00002582cat >>confdefs.h <<_ACEOF
2583#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2584_ACEOF
2585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586cat >>confdefs.h <<_ACEOF
2587#define PACKAGE_VERSION "$PACKAGE_VERSION"
2588_ACEOF
2589
Martin v. Löwis11437992002-04-12 09:54:03 +00002590cat >>confdefs.h <<_ACEOF
2591#define PACKAGE_STRING "$PACKAGE_STRING"
2592_ACEOF
2593
Martin v. Löwis11437992002-04-12 09:54:03 +00002594cat >>confdefs.h <<_ACEOF
2595#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2596_ACEOF
2597
Matthias Kloseb9621712010-04-24 17:59:49 +00002598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_URL "$PACKAGE_URL"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602
2603# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002604# Prefer an explicitly selected file to automatically selected ones.
2605ac_site_file1=NONE
2606ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002608 # We do not want a PATH search for config.site.
2609 case $CONFIG_SITE in #((
2610 -*) ac_site_file1=./$CONFIG_SITE;;
2611 */*) ac_site_file1=$CONFIG_SITE;;
2612 *) ac_site_file1=./$CONFIG_SITE;;
2613 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 ac_site_file1=$prefix/share/config.site
2616 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 ac_site_file1=$ac_default_prefix/share/config.site
2619 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002621for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622do
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 test "x$ac_site_file" = xNONE && continue
2624 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2626$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002628 . "$ac_site_file" \
2629 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2630$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2631as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002632See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633 fi
2634done
2635
2636if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 # Some versions of bash will fail to source /dev/null (special files
2638 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2639 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2641$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2644 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 esac
2646 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647else
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2649$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 >$cache_file
2651fi
2652
2653# Check that the precious variables saved in the cache have kept the same
2654# value.
2655ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2658 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002659 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2660 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 case $ac_old_set,$ac_new_set in
2662 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2664$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 ac_cache_corrupted=: ;;
2666 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2668$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 ac_cache_corrupted=: ;;
2670 ,);;
2671 *)
2672 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 # differences in whitespace do not lead to failure.
2674 ac_old_val_w=`echo x $ac_old_val`
2675 ac_new_val_w=`echo x $ac_new_val`
2676 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2678$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2679 ac_cache_corrupted=:
2680 else
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2682$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2683 eval $ac_var=\$ac_old_val
2684 fi
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2686$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2687 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2688$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 fi;;
2690 esac
2691 # Pass precious variables to config.status.
2692 if test "$ac_new_set" = set; then
2693 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 *) ac_arg=$ac_var=$ac_new_val ;;
2696 esac
2697 case " $ac_configure_args " in
2698 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002699 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 esac
2701 fi
2702done
2703if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2707$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002708 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002710## -------------------- ##
2711## Main body of script. ##
2712## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713
Guido van Rossum7f43da71994-08-01 12:15:30 +00002714ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2718ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002719
Guido van Rossum627b2d71993-12-24 10:39:16 +00002720
Michael W. Hudson54241132001-12-07 15:38:26 +00002721
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722
2723
2724
2725
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002726if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727then
2728# Extract the first word of "hg", so it can be a program name with args.
2729set dummy hg; ac_word=$2
2730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2731$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002732if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo_n "(cached) " >&6
2734else
2735 if test -n "$HAS_HG"; then
2736 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2737else
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
2743 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02002744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002745 ac_cv_prog_HAS_HG="found"
2746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2747 break 2
2748 fi
2749done
2750 done
2751IFS=$as_save_IFS
2752
2753 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2754fi
2755fi
2756HAS_HG=$ac_cv_prog_HAS_HG
2757if test -n "$HAS_HG"; then
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2759$as_echo "$HAS_HG" >&6; }
2760else
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2762$as_echo "no" >&6; }
2763fi
2764
2765
2766else
2767HAS_HG=no-repository
2768fi
2769if test $HAS_HG = found
2770then
2771 HGVERSION="hg id -i \$(srcdir)"
2772 HGTAG="hg id -t \$(srcdir)"
2773 HGBRANCH="hg id -b \$(srcdir)"
2774else
2775 HGVERSION=""
2776 HGTAG=""
2777 HGBRANCH=""
2778fi
2779
2780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002781ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002782
2783
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002784ac_aux_dir=
2785for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2786 if test -f "$ac_dir/install-sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install-sh -c"
2789 break
2790 elif test -f "$ac_dir/install.sh"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/install.sh -c"
2793 break
2794 elif test -f "$ac_dir/shtool"; then
2795 ac_aux_dir=$ac_dir
2796 ac_install_sh="$ac_aux_dir/shtool install -c"
2797 break
2798 fi
2799done
2800if test -z "$ac_aux_dir"; then
2801 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2802fi
2803
2804# These three variables are undocumented and unsupported,
2805# and are intended to be withdrawn in a future Autoconf release.
2806# They can cause serious problems if a builder's source tree is in a directory
2807# whose full name contains unusual characters.
2808ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2809ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2810ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2811
2812
2813# Make sure we can run config.sub.
2814$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2815 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2816
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2818$as_echo_n "checking build system type... " >&6; }
2819if ${ac_cv_build+:} false; then :
2820 $as_echo_n "(cached) " >&6
2821else
2822 ac_build_alias=$build_alias
2823test "x$ac_build_alias" = x &&
2824 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2825test "x$ac_build_alias" = x &&
2826 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2827ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2828 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2829
2830fi
2831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2832$as_echo "$ac_cv_build" >&6; }
2833case $ac_cv_build in
2834*-*-*) ;;
2835*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2836esac
2837build=$ac_cv_build
2838ac_save_IFS=$IFS; IFS='-'
2839set x $ac_cv_build
2840shift
2841build_cpu=$1
2842build_vendor=$2
2843shift; shift
2844# Remember, the first character of IFS is used to create $*,
2845# except with old shells:
2846build_os=$*
2847IFS=$ac_save_IFS
2848case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2849
2850
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2852$as_echo_n "checking host system type... " >&6; }
2853if ${ac_cv_host+:} false; then :
2854 $as_echo_n "(cached) " >&6
2855else
2856 if test "x$host_alias" = x; then
2857 ac_cv_host=$ac_cv_build
2858else
2859 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2860 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2861fi
2862
2863fi
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2865$as_echo "$ac_cv_host" >&6; }
2866case $ac_cv_host in
2867*-*-*) ;;
2868*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2869esac
2870host=$ac_cv_host
2871ac_save_IFS=$IFS; IFS='-'
2872set x $ac_cv_host
2873shift
2874host_cpu=$1
2875host_vendor=$2
2876shift; shift
2877# Remember, the first character of IFS is used to create $*,
2878# except with old shells:
2879host_os=$*
2880IFS=$ac_save_IFS
2881case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2882
2883
2884
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002885if test "$cross_compiling" = yes; then
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2887$as_echo_n "checking for python interpreter for cross build... " >&6; }
2888 if test -z "$PYTHON_FOR_BUILD"; then
2889 for interp in python$PACKAGE_VERSION python3 python; do
2890 which $interp >/dev/null 2>&1 || continue
2891 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2892 break
2893 fi
2894 interp=
2895 done
2896 if test x$interp = x; then
2897 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2898 fi
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2900$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002901 PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002902 fi
2903else
2904 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2905fi
2906
2907
Martin v. Löwis11437992002-04-12 09:54:03 +00002908
Benjamin Petersond23f8222009-04-05 19:13:16 +00002909if test "$prefix" != "/"; then
2910 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2911fi
2912
2913
Martin v. Löwis11437992002-04-12 09:54:03 +00002914
2915
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002916# We don't use PACKAGE_ variables, and they cause conflicts
2917# with other autoconf-based packages that include Python.h
2918grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2919rm confdefs.h
2920mv confdefs.h.new confdefs.h
2921
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002922
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002923VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002924
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002925# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002926
2927SOVERSION=1.0
2928
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002929# The later defininition of _XOPEN_SOURCE disables certain features
2930# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2931
Matthias Kloseb9621712010-04-24 17:59:49 +00002932$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002933
2934
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002935# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2936# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2937# them.
2938
Matthias Kloseb9621712010-04-24 17:59:49 +00002939$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002940
2941
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002942# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2943# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2944# them.
2945
Matthias Kloseb9621712010-04-24 17:59:49 +00002946$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002947
2948
Martin v. Löwisd6320502004-08-12 13:45:08 +00002949# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2950# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2951
Matthias Kloseb9621712010-04-24 17:59:49 +00002952$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002953
2954
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002955# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2956# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2957# them.
2958
Matthias Kloseb9621712010-04-24 17:59:49 +00002959$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002960
2961
2962
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002963define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002964
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002965# Arguments passed to configure.
2966
2967CONFIG_ARGS="$ac_configure_args"
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2970$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002971# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002972if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002973 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002974 case $enableval in
2975 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002976 # Locate the best usable SDK, see Mac/README.txt for more
2977 # information
2978 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2979 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002980 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002981 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2982 if test ! -d "${enableval}"
2983 then
2984 enableval=/
2985 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002986 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002987 ;;
2988 esac
2989 case $enableval in
2990 no)
2991 UNIVERSALSDK=
2992 enable_universalsdk=
2993 ;;
2994 *)
2995 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002996 if test ! -d "${UNIVERSALSDK}"
2997 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002998 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002999 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003000 ;;
3001 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003002
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003003
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004else
3005
3006 UNIVERSALSDK=
3007 enable_universalsdk=
3008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003011if test -n "${UNIVERSALSDK}"
3012then
Matthias Kloseb9621712010-04-24 17:59:49 +00003013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3014$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015else
Matthias Kloseb9621712010-04-24 17:59:49 +00003016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3017$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003021
3022
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023# For backward compatibility reasons we prefer to select '32-bit' if available,
3024# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026if test "`uname -s`" = "Darwin"
3027then
3028 if test -n "${UNIVERSALSDK}"
3029 then
3030 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3031 then
3032 UNIVERSAL_ARCHS="intel"
3033 fi
3034 fi
3035fi
3036
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3039$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003040
3041# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003042if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3045$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003046 UNIVERSAL_ARCHS="$withval"
3047
3048else
3049
Ned Deilycbfb9a52012-06-23 16:02:19 -07003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3051$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003052
3053fi
3054
3055
3056
3057
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003058
3059# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003060if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003061 withval=$with_framework_name;
3062 PYTHONFRAMEWORK=${withval}
3063 PYTHONFRAMEWORKDIR=${withval}.framework
3064 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3065
3066else
3067
3068 PYTHONFRAMEWORK=Python
3069 PYTHONFRAMEWORKDIR=Python.framework
3070 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3071
3072fi
3073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003075if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003076 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003077 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003078 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003079 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003080 esac
3081 case $enableval in
3082 no)
3083 PYTHONFRAMEWORK=
3084 PYTHONFRAMEWORKDIR=no-framework
3085 PYTHONFRAMEWORKPREFIX=
3086 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003087 FRAMEWORKINSTALLFIRST=
3088 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003089 FRAMEWORKALTINSTALLFIRST=
3090 FRAMEWORKALTINSTALLLAST=
3091 if test "x${prefix}" = "xNONE"; then
3092 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3093 else
3094 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3095 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003096 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003097 ;;
3098 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003099 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003101 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003102 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003103 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3104 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003105 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003107 if test "x${prefix}" = "xNONE" ; then
3108 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003109
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003113
3114 case "${enableval}" in
3115 /System*)
3116 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3117 if test "${prefix}" = "NONE" ; then
3118 # See below
3119 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3120 fi
3121 ;;
3122
3123 /Library*)
3124 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3125 ;;
3126
3127 */Library/Frameworks)
3128 MDIR="`dirname "${enableval}"`"
3129 MDIR="`dirname "${MDIR}"`"
3130 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3131
3132 if test "${prefix}" = "NONE"; then
3133 # User hasn't specified the
3134 # --prefix option, but wants to install
3135 # the framework in a non-default location,
3136 # ensure that the compatibility links get
3137 # installed relative to that prefix as well
3138 # instead of in /usr/local.
3139 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3140 fi
3141 ;;
3142
3143 *)
3144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3145 ;;
3146 esac
3147
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003150 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003153
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003154 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003156 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3157
3158 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3159
Jack Jansene578a632001-08-15 01:27:14 +00003160 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Guido van Rossum563e7081996-09-10 18:20:48 +00003162else
Martin v. Löwis11437992002-04-12 09:54:03 +00003163
Jack Jansene578a632001-08-15 01:27:14 +00003164 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003165 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003166 PYTHONFRAMEWORKPREFIX=
3167 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003168 FRAMEWORKINSTALLFIRST=
3169 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003170 FRAMEWORKALTINSTALLFIRST=
3171 FRAMEWORKALTINSTALLLAST=
3172 if test "x${prefix}" = "xNONE" ; then
3173 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3174 else
3175 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3176 fi
Jack Jansene578a632001-08-15 01:27:14 +00003177 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003178
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003180fi
3181
Thomas Wouters477c8d52006-05-27 19:21:47 +00003182
3183
Michael W. Hudson54241132001-12-07 15:38:26 +00003184
3185
3186
3187
Jack Jansene578a632001-08-15 01:27:14 +00003188
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003189
3190
3191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003193
Jack Jansene578a632001-08-15 01:27:14 +00003194##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003195## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003196## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003197##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003198# Set name for machine-dependent library files
3199
Matthias Kloseb9621712010-04-24 17:59:49 +00003200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3201$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003202if test -z "$MACHDEP"
3203then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003204 # avoid using uname for cross builds
3205 if test "$cross_compiling" = yes; then
3206 # ac_sys_system and ac_sys_release are only used for setting
3207 # `define_xopen_source' in the case statement below. For the
3208 # current supported cross builds, this macro is not adjusted.
3209 case "$host" in
3210 *-*-linux*)
3211 ac_sys_system=Linux
3212 ;;
3213 *-*-cygwin*)
3214 ac_sys_system=Cygwin
3215 ;;
3216 *)
3217 # for now, limit cross builds to known configurations
3218 MACHDEP="unknown"
3219 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3220 esac
3221 ac_sys_release=
3222 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003223 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003224 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003225 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003226 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003227 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003228 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003230 fi
3231 ac_md_system=`echo $ac_sys_system |
3232 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3233 ac_md_release=`echo $ac_sys_release |
3234 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3235 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003236
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003237 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003238 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003239 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003240 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003241 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003242 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244fi
Guido van Rossum91922671997-10-09 20:24:13 +00003245
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003246
3247if test "$cross_compiling" = yes; then
3248 case "$host" in
3249 *-*-linux*)
3250 case "$host_cpu" in
3251 arm*)
3252 _host_cpu=arm
3253 ;;
3254 *)
3255 _host_cpu=$host_cpu
3256 esac
3257 ;;
3258 *-*-cygwin*)
3259 _host_cpu=
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3267fi
3268
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003269# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3270# disable features if it is defined, without any means to access these
3271# features as extensions. For these systems, we skip the definition of
3272# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3273# some feature, make sure there is no alternative way to access this
3274# feature. Also, when using wildcards, make sure you have verified the
3275# need for not defining _XOPEN_SOURCE on all systems matching the
3276# wildcard, and that the wildcard does not include future systems
3277# (which may remove their limitations).
3278case $ac_sys_system/$ac_sys_release in
3279 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3280 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003281 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003282 # In addition, Stefan Krah confirms that issue #1244610 exists through
3283 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003284 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003285 define_xopen_source=no
3286 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3287 # also defined. This can be overridden by defining _BSD_SOURCE
3288 # As this has a different meaning on Linux, only define it on OpenBSD
3289
Matthias Kloseb9621712010-04-24 17:59:49 +00003290$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003291
3292 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003293 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003294 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3295 # also defined. This can be overridden by defining _BSD_SOURCE
3296 # As this has a different meaning on Linux, only define it on OpenBSD
3297
Matthias Kloseb9621712010-04-24 17:59:49 +00003298$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003299
3300 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003301 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3302 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3303 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003304 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003305 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003306 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3307 # request to enable features supported by the standard as a request
3308 # to disable features not supported by the standard. The best way
3309 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3310 # entirely and define __EXTENSIONS__ instead.
3311 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003312 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003313 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3314 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003315 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003316 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003317 define_xopen_source=no;;
3318 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003319 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003320 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003321 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003322 # On FreeBSD 4, the math functions C89 does not cover are never defined
3323 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3324 FreeBSD/4.*)
3325 define_xopen_source=no;;
3326 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3327 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3328 # identifies itself as Darwin/7.*
3329 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3330 # disables platform specific features beyond repair.
3331 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3332 # has no effect, don't bother defining them
3333 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003334 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003335 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003336 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003337 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3338 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3339 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003340 AIX/4)
3341 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003342 AIX/5)
3343 if test `uname -r` -eq 1; then
3344 define_xopen_source=no
3345 fi
3346 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003347 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3348 # defining NI_NUMERICHOST.
3349 QNX/6.3.2)
3350 define_xopen_source=no
3351 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003352
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003353esac
3354
3355if test $define_xopen_source = yes
3356then
Victor Stinner14d098d2011-09-07 22:29:43 +02003357 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003358
Victor Stinner14d098d2011-09-07 22:29:43 +02003359$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003360
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003361
3362 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3363 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3364 # several APIs are not declared. Since this is also needed in some
3365 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003366
Matthias Kloseb9621712010-04-24 17:59:49 +00003367$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003368
3369
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003370
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003371$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003372
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003373fi
3374
Guido van Rossum91922671997-10-09 20:24:13 +00003375#
3376# SGI compilers allow the specification of the both the ABI and the
3377# ISA on the command line. Depending on the values of these switches,
3378# different and often incompatable code will be generated.
3379#
3380# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3381# thus supply support for various ABI/ISA combinations. The MACHDEP
3382# variable is also adjusted.
3383#
3384
3385if test ! -z "$SGI_ABI"
3386then
3387 CC="cc $SGI_ABI"
3388 LDFLAGS="$SGI_ABI $LDFLAGS"
3389 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3392$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003393
Jack Jansen6b08a402004-06-03 12:41:45 +00003394# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3395# it may influence the way we can build extensions, so distutils
3396# needs to check it
3397
Thomas Wouters477c8d52006-05-27 19:21:47 +00003398
Jack Jansen6b08a402004-06-03 12:41:45 +00003399CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003400EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003401
Guido van Rossum627b2d71993-12-24 10:39:16 +00003402# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003403
3404# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3405# for debug/optimization stuff. BASECFLAGS is for flags that are required
3406# just to get things to compile and link. Users are free to override OPT
3407# when running configure or make. The build should not break if they do.
3408# BASECFLAGS should generally not be messed with, however.
3409
3410# XXX shouldn't some/most/all of this code be merged with the stuff later
3411# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3413$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003415# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003416if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003417 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003418 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003419 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003420 without_gcc=yes;;
3421 yes) CC=gcc
3422 without_gcc=no;;
3423 *) CC=$withval
3424 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003425 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003426else
Martin v. Löwis11437992002-04-12 09:54:03 +00003427
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003428 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003429 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003430 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003431 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003432 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433fi
3434
Matthias Kloseb9621712010-04-24 17:59:49 +00003435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3436$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003437
Guido van Rossum8b131c51995-03-09 14:10:13 +00003438# If the user switches compilers, we can't believe the cache
3439if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3440then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003441 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003442(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003443fi
3444
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003445# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3446# when the compiler supports them, but we don't always want -O2, and
3447# we set -g later.
3448if test -z "$CFLAGS"; then
3449 CFLAGS=
3450fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003451
3452if test "$ac_sys_system" = "Darwin"
3453then
3454 # Compiler selection on MacOSX is more complicated than
3455 # AC_PROG_CC can handle, see Mac/README.txt for more
3456 # information
3457 if test -z "${CC}"
3458 then
3459 found_gcc=
3460 found_clang=
3461 as_save_IFS=$IFS; IFS=:
3462 for as_dir in $PATH
3463 do
3464 IFS=$as_save_IFS
3465 if test -x $as_dir/gcc; then
3466 if test -z "${found_gcc}"; then
3467 found_gcc=$as_dir/gcc
3468 fi
3469 fi
3470 if test -x $as_dir/clang; then
3471 if test -z "${found_clang}"; then
3472 found_clang=$as_dir/clang
3473 fi
3474 fi
3475 done
3476 IFS=$as_save_IFS
3477
3478 if test -n "$found_gcc" -a -n "$found_clang"
3479 then
3480 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3481 then
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3483$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3484 CC="$found_clang"
3485 CXX="$found_clang++"
3486 fi
3487
3488
3489 elif test -z "$found_gcc" -a -n "$found_clang"
3490 then
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3492$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3493 CC="$found_clang"
3494 CXX="$found_clang++"
3495
3496 elif test -z "$found_gcc" -a -z "$found_clang"
3497 then
3498 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3499 if test -n "${found_clang}"
3500 then
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3502$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3503 CC="${found_clang}"
3504 CXX="`/usr/bin/xcrun -find clang++`"
3505
3506 # else: use default behaviour
3507 fi
3508 fi
3509 fi
3510fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003511ac_ext=c
3512ac_cpp='$CPP $CPPFLAGS'
3513ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3514ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3515ac_compiler_gnu=$ac_cv_c_compiler_gnu
3516if test -n "$ac_tool_prefix"; then
3517 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3518set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3520$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003521if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003522 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003523else
3524 if test -n "$CC"; then
3525 ac_cv_prog_CC="$CC" # Let the user override the test.
3526else
Martin v. Löwis11437992002-04-12 09:54:03 +00003527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3528for as_dir in $PATH
3529do
3530 IFS=$as_save_IFS
3531 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003532 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003533 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003536 break 2
3537 fi
3538done
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003540IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003541
Jack Jansendd19cf82001-12-06 22:36:17 +00003542fi
3543fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003544CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003545if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3547$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003548else
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3550$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003551fi
3552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553
Martin v. Löwis11437992002-04-12 09:54:03 +00003554fi
3555if test -z "$ac_cv_prog_CC"; then
3556 ac_ct_CC=$CC
3557 # Extract the first word of "gcc", so it can be a program name with args.
3558set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3560$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003561if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003562 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003563else
3564 if test -n "$ac_ct_CC"; then
3565 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3566else
3567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568for as_dir in $PATH
3569do
3570 IFS=$as_save_IFS
3571 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003573 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 break 2
3577 fi
3578done
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003580IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003581
3582fi
3583fi
3584ac_ct_CC=$ac_cv_prog_ac_ct_CC
3585if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3587$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003588else
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3590$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003591fi
3592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003593 if test "x$ac_ct_CC" = x; then
3594 CC=""
3595 else
3596 case $cross_compiling:$ac_tool_warned in
3597yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600ac_tool_warned=yes ;;
3601esac
3602 CC=$ac_ct_CC
3603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604else
3605 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003606fi
3607
Jack Jansendd19cf82001-12-06 22:36:17 +00003608if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609 if test -n "$ac_tool_prefix"; then
3610 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003611set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003614if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003616else
3617 if test -n "$CC"; then
3618 ac_cv_prog_CC="$CC" # Let the user override the test.
3619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003626 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 break 2
3630 fi
3631done
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003634
3635fi
3636fi
3637CC=$ac_cv_prog_CC
3638if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3640$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641else
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003648fi
3649if test -z "$CC"; then
3650 # Extract the first word of "cc", so it can be a program name with args.
3651set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003654if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
3657 if test -n "$CC"; then
3658 ac_cv_prog_CC="$CC" # Let the user override the test.
3659else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003660 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003667 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3669 ac_prog_rejected=yes
3670 continue
3671 fi
3672 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003674 break 2
3675 fi
3676done
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003680if test $ac_prog_rejected = yes; then
3681 # We found a bogon in the path, so make sure we never use it.
3682 set dummy $ac_cv_prog_CC
3683 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003685 # We chose a different compiler from the bogus one.
3686 # However, it has the same basename, so the bogon will be chosen
3687 # first if we set CC to just the basename; use the full file name.
3688 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003689 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690 fi
3691fi
3692fi
3693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003694CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3697$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701fi
3702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703
Martin v. Löwis11437992002-04-12 09:54:03 +00003704fi
3705if test -z "$CC"; then
3706 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 do
3709 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3710set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003725 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003730done
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
3734fi
3735fi
3736CC=$ac_cv_prog_CC
3737if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3739$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003743fi
3744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 test -n "$CC" && break
3747 done
3748fi
3749if test -z "$CC"; then
3750 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003752do
3753 # Extract the first word of "$ac_prog", so it can be a program name with args.
3754set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3756$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003757if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003759else
3760 if test -n "$ac_ct_CC"; then
3761 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3762else
3763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02003769 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 break 2
3773 fi
3774done
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
3779fi
3780ac_ct_CC=$ac_cv_prog_ac_ct_CC
3781if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3783$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003784else
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 test -n "$ac_ct_CC" && break
3791done
Michael W. Hudson54241132001-12-07 15:38:26 +00003792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 if test "x$ac_ct_CC" = x; then
3794 CC=""
3795 else
3796 case $cross_compiling:$ac_tool_warned in
3797yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800ac_tool_warned=yes ;;
3801esac
3802 CC=$ac_ct_CC
3803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
3805
3806fi
3807
3808
Matthias Kloseb9621712010-04-24 17:59:49 +00003809test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003811as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003812See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813
3814# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003815$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3816set X $ac_compile
3817ac_compiler=$2
3818for ac_option in --version -v -V -qversion; do
3819 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820case "(($ac_try" in
3821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3822 *) ac_try_echo=$ac_try;;
3823esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3825$as_echo "$ac_try_echo"; } >&5
3826 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 if test -s conftest.err; then
3829 sed '10a\
3830... rest of stderr output deleted ...
3831 10q' conftest.err >conftest.er1
3832 cat conftest.er1 >&5
3833 fi
3834 rm -f conftest.er1 conftest.err
3835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3836 test $ac_status = 0; }
3837done
Martin v. Löwis11437992002-04-12 09:54:03 +00003838
Matthias Kloseb9621712010-04-24 17:59:49 +00003839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003840/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003841
Martin v. Löwis11437992002-04-12 09:54:03 +00003842int
3843main ()
3844{
3845
3846 ;
3847 return 0;
3848}
3849_ACEOF
3850ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003851ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003852# Try to create an executable without -o first, disregard a.out.
3853# It will help us diagnose broken compilers, and finding out an intuition
3854# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3856$as_echo_n "checking whether the C compiler works... " >&6; }
3857ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3858
3859# The possible output files:
3860ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862ac_rmfiles=
3863for ac_file in $ac_files
3864do
3865 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3868 esac
3869done
3870rm -f $ac_rmfiles
3871
Matthias Kloseb9621712010-04-24 17:59:49 +00003872if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3878$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3882 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3884# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3885# in a Makefile. We should not override ac_cv_exeext if it was cached,
3886# so that the user can short-circuit this test for compilers unknown to
3887# Autoconf.
3888for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003889do
3890 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003893 ;;
3894 [ab].out )
3895 # We found the default executable, but exeext='' is most
3896 # certainly right.
3897 break;;
3898 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 then :; else
3901 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3902 fi
3903 # We set ac_cv_exeext here because the later test for it is not
3904 # safe: cross compilers may not add the suffix if given an `-o'
3905 # argument, so we may need to know it at that point already.
3906 # Even if this section looks crufty: it has the advantage of
3907 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003908 break;;
3909 * )
3910 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 esac
3912done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913test "$ac_cv_exeext" = no && ac_cv_exeext=
3914
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003915else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 ac_file=''
3917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003918if test -z "$ac_file"; then :
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3920$as_echo "no" >&6; }
3921$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003922sed 's/^/| /' conftest.$ac_ext >&5
3923
Matthias Kloseb9621712010-04-24 17:59:49 +00003924{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003926as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003927See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003928else
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3930$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3933$as_echo_n "checking for C compiler default output file name... " >&6; }
3934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3935$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003937
Matthias Kloseb9621712010-04-24 17:59:49 +00003938rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003939ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3941$as_echo_n "checking for suffix of executables... " >&6; }
3942if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943case "(($ac_try" in
3944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3945 *) ac_try_echo=$ac_try;;
3946esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3948$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3952 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3954# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3955# work properly (i.e., refer to `conftest.exe'), while it won't with
3956# `rm'.
3957for ac_file in conftest.exe conftest conftest.*; do
3958 test -f "$ac_file" || continue
3959 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3962 break;;
3963 * ) break;;
3964 esac
3965done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966else
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003972rm -f conftest conftest$ac_cv_exeext
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3974$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975
3976rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003977EXEEXT=$ac_cv_exeext
3978ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3980/* end confdefs.h. */
3981#include <stdio.h>
3982int
3983main ()
3984{
3985FILE *f = fopen ("conftest.out", "w");
3986 return ferror (f) || fclose (f) != 0;
3987
3988 ;
3989 return 0;
3990}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003992ac_clean_files="$ac_clean_files conftest.out"
3993# Check that the compiler produces executables we can run. If not, either
3994# the compiler is broken, or we cross compile.
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3996$as_echo_n "checking whether we are cross compiling... " >&6; }
3997if test "$cross_compiling" != yes; then
3998 { { ac_try="$ac_link"
3999case "(($ac_try" in
4000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4001 *) ac_try_echo=$ac_try;;
4002esac
4003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4004$as_echo "$ac_try_echo"; } >&5
4005 (eval "$ac_link") 2>&5
4006 ac_status=$?
4007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4008 test $ac_status = 0; }
4009 if { ac_try='./conftest$ac_cv_exeext'
4010 { { case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
4016 (eval "$ac_try") 2>&5
4017 ac_status=$?
4018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }; }; then
4020 cross_compiling=no
4021 else
4022 if test "$cross_compiling" = maybe; then
4023 cross_compiling=yes
4024 else
4025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004027as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004028If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004030 fi
4031 fi
4032fi
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4034$as_echo "$cross_compiling" >&6; }
4035
4036rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4037ac_clean_files=$ac_clean_files_save
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4039$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004040if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 $as_echo_n "(cached) " >&6
4042else
4043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044/* end confdefs.h. */
4045
4046int
4047main ()
4048{
4049
4050 ;
4051 return 0;
4052}
4053_ACEOF
4054rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004055if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004056case "(($ac_try" in
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4059esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004060eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004062 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004063 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004066 for ac_file in conftest.o conftest.obj conftest.*; do
4067 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004068 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004069 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4071 break;;
4072 esac
4073done
4074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004076sed 's/^/| /' conftest.$ac_ext >&5
4077
Matthias Kloseb9621712010-04-24 17:59:49 +00004078{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004080as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004081See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004082fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4086$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004087OBJEXT=$ac_cv_objext
4088ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4090$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004091if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004093else
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004096
Martin v. Löwis11437992002-04-12 09:54:03 +00004097int
4098main ()
4099{
4100#ifndef __GNUC__
4101 choke me
4102#endif
4103
4104 ;
4105 return 0;
4106}
4107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 ac_compiler_gnu=yes
4110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004114ac_cv_c_compiler_gnu=$ac_compiler_gnu
4115
4116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4118$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4119if test $ac_compiler_gnu = yes; then
4120 GCC=yes
4121else
4122 GCC=
4123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004124ac_test_CFLAGS=${CFLAGS+set}
4125ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4127$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004128if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004130else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131 ac_save_c_werror_flag=$ac_c_werror_flag
4132 ac_c_werror_flag=yes
4133 ac_cv_prog_cc_g=no
4134 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004137
Martin v. Löwis11437992002-04-12 09:54:03 +00004138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004146if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004147 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004148else
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 CFLAGS=""
4150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151/* end confdefs.h. */
4152
4153int
4154main ()
4155{
4156
4157 ;
4158 return 0;
4159}
4160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004161if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162
Matthias Kloseb9621712010-04-24 17:59:49 +00004163else
4164 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004165 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004167/* end confdefs.h. */
4168
4169int
4170main ()
4171{
4172
4173 ;
4174 return 0;
4175}
4176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004177if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4183fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4185 ac_c_werror_flag=$ac_save_c_werror_flag
4186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4188$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004189if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004190 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004191elif test $ac_cv_prog_cc_g = yes; then
4192 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193 CFLAGS="-g -O2"
4194 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004195 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196 fi
4197else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004198 if test "$GCC" = yes; then
4199 CFLAGS="-O2"
4200 else
4201 CFLAGS=
4202 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4205$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004206if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004208else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004210ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004212/* end confdefs.h. */
4213#include <stdarg.h>
4214#include <stdio.h>
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004215#include <sys/types.h>
4216#include <sys/stat.h>
Skip Montanaro6dead952003-09-25 14:50:04 +00004217/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4218struct buf { int x; };
4219FILE * (*rcsopen) (struct buf *, struct stat *, int);
4220static char *e (p, i)
4221 char **p;
4222 int i;
4223{
4224 return p[i];
4225}
4226static char *f (char * (*g) (char **, int), char **p, ...)
4227{
4228 char *s;
4229 va_list v;
4230 va_start (v,p);
4231 s = g (p, va_arg (v,int));
4232 va_end (v);
4233 return s;
4234}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004235
4236/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4237 function prototypes and stuff, but not '\xHH' hex character constants.
4238 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004240 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4241 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004243int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4246 inside strings and character constants. */
4247#define FOO(x) 'x'
4248int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4249
Skip Montanaro6dead952003-09-25 14:50:04 +00004250int test (int i, double x);
4251struct s1 {int (*f) (int a);};
4252struct s2 {int (*f) (double a);};
4253int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4254int argc;
4255char **argv;
4256int
4257main ()
4258{
4259return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4260 ;
4261 return 0;
4262}
4263_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4265 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004266do
4267 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext
4272 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004273done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004275CC=$ac_save_CC
4276
4277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278# AC_CACHE_VAL
4279case "x$ac_cv_prog_cc_c89" in
4280 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4282$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4285$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004286 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4289$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004290esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004291if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004292
Matthias Kloseb9621712010-04-24 17:59:49 +00004293fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295ac_ext=c
4296ac_cpp='$CPP $CPPFLAGS'
4297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4299ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004301
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004302
4303
Matthias Kloseb9621712010-04-24 17:59:49 +00004304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4305$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004310
4311 case $withval in
4312 no) with_cxx_main=no
4313 MAINCC='$(CC)';;
4314 yes) with_cxx_main=yes
4315 MAINCC='$(CXX)';;
4316 *) with_cxx_main=yes
4317 MAINCC=$withval
4318 if test -z "$CXX"
4319 then
4320 CXX=$withval
4321 fi;;
4322 esac
4323else
4324
4325 with_cxx_main=no
4326 MAINCC='$(CC)'
4327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328fi
4329
Matthias Kloseb9621712010-04-24 17:59:49 +00004330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4331$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004332
4333preset_cxx="$CXX"
4334if test -z "$CXX"
4335then
4336 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004337 gcc) if test -n "$ac_tool_prefix"; then
4338 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4339set dummy ${ac_tool_prefix}g++; ac_word=$2
4340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4341$as_echo_n "checking for $ac_word... " >&6; }
4342if ${ac_cv_path_CXX+:} false; then :
4343 $as_echo_n "(cached) " >&6
4344else
4345 case $CXX in
4346 [\\/]* | ?:[\\/]*)
4347 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4348 ;;
4349 *)
4350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4351for as_dir in notfound
4352do
4353 IFS=$as_save_IFS
4354 test -z "$as_dir" && as_dir=.
4355 for ac_exec_ext in '' $ac_executable_extensions; do
4356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4357 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4358 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4359 break 2
4360 fi
4361done
4362 done
4363IFS=$as_save_IFS
4364
4365 ;;
4366esac
4367fi
4368CXX=$ac_cv_path_CXX
4369if test -n "$CXX"; then
4370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4371$as_echo "$CXX" >&6; }
4372else
4373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4374$as_echo "no" >&6; }
4375fi
4376
4377
4378fi
4379if test -z "$ac_cv_path_CXX"; then
4380 ac_pt_CXX=$CXX
4381 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004382set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4384$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004385if ${ac_cv_path_ac_pt_CXX+:} false; then :
4386 $as_echo_n "(cached) " >&6
4387else
4388 case $ac_pt_CXX in
4389 [\\/]* | ?:[\\/]*)
4390 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4391 ;;
4392 *)
4393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4394for as_dir in notfound
4395do
4396 IFS=$as_save_IFS
4397 test -z "$as_dir" && as_dir=.
4398 for ac_exec_ext in '' $ac_executable_extensions; do
4399 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4400 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4401 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4402 break 2
4403 fi
4404done
4405 done
4406IFS=$as_save_IFS
4407
4408 ;;
4409esac
4410fi
4411ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4412if test -n "$ac_pt_CXX"; then
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4414$as_echo "$ac_pt_CXX" >&6; }
4415else
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417$as_echo "no" >&6; }
4418fi
4419
4420 if test "x$ac_pt_CXX" = x; then
4421 CXX="g++"
4422 else
4423 case $cross_compiling:$ac_tool_warned in
4424yes:)
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4426$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4427ac_tool_warned=yes ;;
4428esac
4429 CXX=$ac_pt_CXX
4430 fi
4431else
4432 CXX="$ac_cv_path_CXX"
4433fi
4434 ;;
4435 cc) if test -n "$ac_tool_prefix"; then
4436 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4437set dummy ${ac_tool_prefix}c++; ac_word=$2
4438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004440if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004441 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004442else
4443 case $CXX in
4444 [\\/]* | ?:[\\/]*)
4445 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4446 ;;
4447 *)
4448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449for as_dir in notfound
4450do
4451 IFS=$as_save_IFS
4452 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004453 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004454 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004455 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004457 break 2
4458 fi
4459done
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004462
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004463 ;;
4464esac
4465fi
4466CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004467if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4469$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004470else
Matthias Kloseb9621712010-04-24 17:59:49 +00004471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4472$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004475
4476fi
4477if test -z "$ac_cv_path_CXX"; then
4478 ac_pt_CXX=$CXX
4479 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004480set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4482$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004483if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004484 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004485else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004486 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004488 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004489 ;;
4490 *)
4491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4492for as_dir in notfound
4493do
4494 IFS=$as_save_IFS
4495 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004497 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4498 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004500 break 2
4501 fi
4502done
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004504IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506 ;;
4507esac
4508fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004509ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4510if test -n "$ac_pt_CXX"; then
4511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4512$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004513else
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4515$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004517
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004518 if test "x$ac_pt_CXX" = x; then
4519 CXX="c++"
4520 else
4521 case $cross_compiling:$ac_tool_warned in
4522yes:)
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4524$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4525ac_tool_warned=yes ;;
4526esac
4527 CXX=$ac_pt_CXX
4528 fi
4529else
4530 CXX="$ac_cv_path_CXX"
4531fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004532 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533 clang|*/clang) if test -n "$ac_tool_prefix"; then
4534 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4535set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4537$as_echo_n "checking for $ac_word... " >&6; }
4538if ${ac_cv_path_CXX+:} false; then :
4539 $as_echo_n "(cached) " >&6
4540else
4541 case $CXX in
4542 [\\/]* | ?:[\\/]*)
4543 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4544 ;;
4545 *)
4546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4547for as_dir in notfound
4548do
4549 IFS=$as_save_IFS
4550 test -z "$as_dir" && as_dir=.
4551 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004552 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004553 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4554 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4555 break 2
4556 fi
4557done
4558 done
4559IFS=$as_save_IFS
4560
Ned Deilycbfb9a52012-06-23 16:02:19 -07004561 ;;
4562esac
4563fi
4564CXX=$ac_cv_path_CXX
4565if test -n "$CXX"; then
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4567$as_echo "$CXX" >&6; }
4568else
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4570$as_echo "no" >&6; }
4571fi
4572
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004573
4574fi
4575if test -z "$ac_cv_path_CXX"; then
4576 ac_pt_CXX=$CXX
4577 # Extract the first word of "clang++", so it can be a program name with args.
4578set dummy clang++; ac_word=$2
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580$as_echo_n "checking for $ac_word... " >&6; }
4581if ${ac_cv_path_ac_pt_CXX+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583else
4584 case $ac_pt_CXX in
4585 [\\/]* | ?:[\\/]*)
4586 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4587 ;;
4588 *)
4589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in notfound
4591do
4592 IFS=$as_save_IFS
4593 test -z "$as_dir" && as_dir=.
4594 for ac_exec_ext in '' $ac_executable_extensions; do
4595 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4596 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4597 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598 break 2
4599 fi
4600done
4601 done
4602IFS=$as_save_IFS
4603
4604 ;;
4605esac
4606fi
4607ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4608if test -n "$ac_pt_CXX"; then
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4610$as_echo "$ac_pt_CXX" >&6; }
4611else
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613$as_echo "no" >&6; }
4614fi
4615
4616 if test "x$ac_pt_CXX" = x; then
4617 CXX="clang++"
4618 else
4619 case $cross_compiling:$ac_tool_warned in
4620yes:)
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4623ac_tool_warned=yes ;;
4624esac
4625 CXX=$ac_pt_CXX
4626 fi
4627else
4628 CXX="$ac_cv_path_CXX"
4629fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004630 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004631 esac
4632 if test "$CXX" = "notfound"
4633 then
4634 CXX=""
4635 fi
4636fi
4637if test -z "$CXX"
4638then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004639 if test -n "$ac_tool_prefix"; then
4640 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4641 do
4642 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004646if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004647 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648else
4649 if test -n "$CXX"; then
4650 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4651else
4652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4653for as_dir in $PATH
4654do
4655 IFS=$as_save_IFS
4656 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004657 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4659 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004661 break 2
4662 fi
4663done
Matthias Kloseb9621712010-04-24 17:59:49 +00004664 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004665IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004666
4667fi
4668fi
4669CXX=$ac_cv_prog_CXX
4670if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4672$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673else
Matthias Kloseb9621712010-04-24 17:59:49 +00004674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4675$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004676fi
4677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004678
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 test -n "$CXX" && break
4680 done
4681fi
4682if test -z "$CXX"; then
4683 ac_ct_CXX=$CXX
4684 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4685do
4686 # Extract the first word of "$ac_prog", so it can be a program name with args.
4687set dummy $ac_prog; ac_word=$2
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
4690if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692else
4693 if test -n "$ac_ct_CXX"; then
4694 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4695else
4696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
4701 for ac_exec_ext in '' $ac_executable_extensions; do
4702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4703 ac_cv_prog_ac_ct_CXX="$ac_prog"
4704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705 break 2
4706 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004707done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708 done
4709IFS=$as_save_IFS
4710
4711fi
4712fi
4713ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4714if test -n "$ac_ct_CXX"; then
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4716$as_echo "$ac_ct_CXX" >&6; }
4717else
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
4720fi
4721
4722
4723 test -n "$ac_ct_CXX" && break
4724done
4725
4726 if test "x$ac_ct_CXX" = x; then
4727 CXX="notfound"
4728 else
4729 case $cross_compiling:$ac_tool_warned in
4730yes:)
4731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4733ac_tool_warned=yes ;;
4734esac
4735 CXX=$ac_ct_CXX
4736 fi
4737fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738
4739 if test "$CXX" = "notfound"
4740 then
4741 CXX=""
4742 fi
4743fi
4744if test "$preset_cxx" != "$CXX"
4745then
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747
4748 By default, distutils will build C++ extension modules with \"$CXX\".
4749 If this is not intended, then set CXX on the configure command line.
4750 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004751$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752
4753 By default, distutils will build C++ extension modules with \"$CXX\".
4754 If this is not intended, then set CXX on the configure command line.
4755 " >&2;}
4756fi
4757
4758
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4760$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4761save_LDFLAGS="$LDFLAGS"
4762LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004763
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4765/* end confdefs.h. */
4766
4767int
4768main ()
4769{
4770
4771 ;
4772 return 0;
4773}
4774_ACEOF
4775if ac_fn_c_try_link "$LINENO"; then :
4776 NO_AS_NEEDED="-Wl,--no-as-needed"
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4778$as_echo "yes" >&6; }
4779else
4780 NO_AS_NEEDED=""
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784rm -f core conftest.err conftest.$ac_objext \
4785 conftest$ac_exeext conftest.$ac_ext
4786LDFLAGS="$save_LDFLAGS"
4787
4788
4789
4790# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004791ac_ext=c
4792ac_cpp='$CPP $CPPFLAGS'
4793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4797$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004798# On Suns, sometimes $CPP names a directory.
4799if test -n "$CPP" && test -d "$CPP"; then
4800 CPP=
4801fi
4802if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004803 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004805else
Martin v. Löwis11437992002-04-12 09:54:03 +00004806 # Double quotes because CPP needs to be expanded
4807 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4808 do
4809 ac_preproc_ok=false
4810for ac_c_preproc_warn_flag in '' yes
4811do
4812 # Use a header file that comes with gcc, so configuring glibc
4813 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004814 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4815 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004816 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004819/* end confdefs.h. */
4820#ifdef __STDC__
4821# include <limits.h>
4822#else
4823# include <assert.h>
4824#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004825 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004827if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004828
Matthias Kloseb9621712010-04-24 17:59:49 +00004829else
Martin v. Löwis11437992002-04-12 09:54:03 +00004830 # Broken: fails on valid input.
4831continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004832fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004833rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004836 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004839#include <ac_nonexistent.h>
4840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004841if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 # Broken: success on invalid input.
4843continue
4844else
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # Passes both tests.
4846ac_preproc_ok=:
4847break
4848fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004849rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004850
4851done
4852# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004853rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004854if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 break
4856fi
4857
4858 done
4859 ac_cv_prog_CPP=$CPP
4860
4861fi
4862 CPP=$ac_cv_prog_CPP
4863else
4864 ac_cv_prog_CPP=$CPP
4865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4867$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004868ac_preproc_ok=false
4869for ac_c_preproc_warn_flag in '' yes
4870do
4871 # Use a header file that comes with gcc, so configuring glibc
4872 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004873 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4874 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 # On the NeXT, cc -E runs the code through the compiler's parser,
4876 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004878/* end confdefs.h. */
4879#ifdef __STDC__
4880# include <limits.h>
4881#else
4882# include <assert.h>
4883#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004884 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004886if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004887
Matthias Kloseb9621712010-04-24 17:59:49 +00004888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 # Broken: fails on valid input.
4890continue
4891fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004892rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004893
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004894 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004898#include <ac_nonexistent.h>
4899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004900if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 # Broken: success on invalid input.
4902continue
4903else
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 # Passes both tests.
4905ac_preproc_ok=:
4906break
4907fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004908rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004909
4910done
4911# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004912rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004913if $ac_preproc_ok; then :
4914
Martin v. Löwis11437992002-04-12 09:54:03 +00004915else
Matthias Kloseb9621712010-04-24 17:59:49 +00004916 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004918as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004919See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004920fi
4921
4922ac_ext=c
4923ac_cpp='$CPP $CPPFLAGS'
4924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4926ac_compiler_gnu=$ac_cv_c_compiler_gnu
4927
4928
Matthias Kloseb9621712010-04-24 17:59:49 +00004929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4930$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004931if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004932 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004933else
Matthias Kloseb9621712010-04-24 17:59:49 +00004934 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004935 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 # Loop through the user's path and test for each of PROGNAME-LIST
4937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004938for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4939do
4940 IFS=$as_save_IFS
4941 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004942 for ac_prog in grep ggrep; do
4943 for ac_exec_ext in '' $ac_executable_extensions; do
4944 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004945 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004946# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004947 # Check for GNU $ac_path_GREP
4948case `"$ac_path_GREP" --version 2>&1` in
4949*GNU*)
4950 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4951*)
4952 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004953 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954 while :
4955 do
4956 cat "conftest.in" "conftest.in" >"conftest.tmp"
4957 mv "conftest.tmp" "conftest.in"
4958 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004959 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004960 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4961 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004962 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004963 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4964 # Best one so far, save it but keep looking for a better one
4965 ac_cv_path_GREP="$ac_path_GREP"
4966 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004967 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004968 # 10*(2^10) chars as input seems more than enough
4969 test $ac_count -gt 10 && break
4970 done
4971 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4972esac
4973
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $ac_path_GREP_found && break 3
4975 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004976 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004977 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004978IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004980 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982else
4983 ac_cv_path_GREP=$GREP
4984fi
4985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4988$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 GREP="$ac_cv_path_GREP"
4990
4991
Matthias Kloseb9621712010-04-24 17:59:49 +00004992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4993$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004994if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996else
4997 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4998 then ac_cv_path_EGREP="$GREP -E"
4999 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005000 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005001 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 # Loop through the user's path and test for each of PROGNAME-LIST
5003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5005do
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005008 for ac_prog in egrep; do
5009 for ac_exec_ext in '' $ac_executable_extensions; do
5010 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005011 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005012# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013 # Check for GNU $ac_path_EGREP
5014case `"$ac_path_EGREP" --version 2>&1` in
5015*GNU*)
5016 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5017*)
5018 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 while :
5021 do
5022 cat "conftest.in" "conftest.in" >"conftest.tmp"
5023 mv "conftest.tmp" "conftest.in"
5024 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5027 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5030 # Best one so far, save it but keep looking for a better one
5031 ac_cv_path_EGREP="$ac_path_EGREP"
5032 ac_path_EGREP_max=$ac_count
5033 fi
5034 # 10*(2^10) chars as input seems more than enough
5035 test $ac_count -gt 10 && break
5036 done
5037 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5038esac
5039
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 $ac_path_EGREP_found && break 3
5041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005046 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048else
5049 ac_cv_path_EGREP=$EGREP
5050fi
5051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 fi
5053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5055$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005057
5058
Matthias Kloseb9621712010-04-24 17:59:49 +00005059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5060$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005061if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $as_echo_n "(cached) " >&6
5063else
5064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005065/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005066#include <stdlib.h>
5067#include <stdarg.h>
5068#include <string.h>
5069#include <float.h>
5070
5071int
5072main ()
5073{
5074
5075 ;
5076 return 0;
5077}
5078_ACEOF
5079if ac_fn_c_try_compile "$LINENO"; then :
5080 ac_cv_header_stdc=yes
5081else
5082 ac_cv_header_stdc=no
5083fi
5084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5085
5086if test $ac_cv_header_stdc = yes; then
5087 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5089/* end confdefs.h. */
5090#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005091
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005092_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005093if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005095
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005096else
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005098fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005099rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005100
Matthias Kloseb9621712010-04-24 17:59:49 +00005101fi
5102
5103if test $ac_cv_header_stdc = yes; then
5104 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106/* end confdefs.h. */
5107#include <stdlib.h>
5108
5109_ACEOF
5110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5111 $EGREP "free" >/dev/null 2>&1; then :
5112
5113else
5114 ac_cv_header_stdc=no
5115fi
5116rm -f conftest*
5117
5118fi
5119
5120if test $ac_cv_header_stdc = yes; then
5121 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5122 if test "$cross_compiling" = yes; then :
5123 :
5124else
5125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5126/* end confdefs.h. */
5127#include <ctype.h>
5128#include <stdlib.h>
5129#if ((' ' & 0x0FF) == 0x020)
5130# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5131# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5132#else
5133# define ISLOWER(c) \
5134 (('a' <= (c) && (c) <= 'i') \
5135 || ('j' <= (c) && (c) <= 'r') \
5136 || ('s' <= (c) && (c) <= 'z'))
5137# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5138#endif
5139
5140#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5141int
5142main ()
5143{
5144 int i;
5145 for (i = 0; i < 256; i++)
5146 if (XOR (islower (i), ISLOWER (i))
5147 || toupper (i) != TOUPPER (i))
5148 return 2;
5149 return 0;
5150}
5151_ACEOF
5152if ac_fn_c_try_run "$LINENO"; then :
5153
5154else
5155 ac_cv_header_stdc=no
5156fi
5157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5158 conftest.$ac_objext conftest.beam conftest.$ac_ext
5159fi
5160
5161fi
5162fi
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5164$as_echo "$ac_cv_header_stdc" >&6; }
5165if test $ac_cv_header_stdc = yes; then
5166
5167$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5168
5169fi
5170
5171# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5172for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5173 inttypes.h stdint.h unistd.h
5174do :
5175 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5176ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5177"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005178if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 cat >>confdefs.h <<_ACEOF
5180#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5181_ACEOF
5182
5183fi
5184
5185done
5186
5187
5188
5189 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005190if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005191 MINIX=yes
5192else
5193 MINIX=
5194fi
5195
5196
5197 if test "$MINIX" = yes; then
5198
5199$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5200
5201
5202$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5203
5204
5205$as_echo "#define _MINIX 1" >>confdefs.h
5206
5207 fi
5208
5209
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5211$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005212if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005213 $as_echo_n "(cached) " >&6
5214else
5215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5216/* end confdefs.h. */
5217
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005218# define __EXTENSIONS__ 1
5219 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005220int
5221main ()
5222{
5223
5224 ;
5225 return 0;
5226}
5227_ACEOF
5228if ac_fn_c_try_compile "$LINENO"; then :
5229 ac_cv_safe_to_define___extensions__=yes
5230else
5231 ac_cv_safe_to_define___extensions__=no
5232fi
5233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5234fi
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5236$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5237 test $ac_cv_safe_to_define___extensions__ = yes &&
5238 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5239
5240 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5241
5242 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5243
5244 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5245
5246 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5247
5248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005249
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005250# Check for unsupported systems
5251case $ac_sys_system/$ac_sys_release in
5252atheos*|Linux*/1*)
5253 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5254 echo See README for details.
5255 exit 1;;
5256esac
5257
5258
Matthias Kloseb9621712010-04-24 17:59:49 +00005259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5260$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005261
5262# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005263if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005264 withval=$with_suffix;
5265 case $withval in
5266 no) EXEEXT=;;
5267 yes) EXEEXT=.exe;;
5268 *) EXEEXT=$withval;;
5269 esac
5270fi
5271
Matthias Kloseb9621712010-04-24 17:59:49 +00005272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5273$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005274
5275# Test whether we're running on a non-case-sensitive system, in which
5276# case we give a warning if no ext is given
5277
Matthias Kloseb9621712010-04-24 17:59:49 +00005278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5279$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280if test ! -d CaseSensitiveTestDir; then
5281mkdir CaseSensitiveTestDir
5282fi
5283
5284if test -d casesensitivetestdir
5285then
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5287$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005288 BUILDEXEEXT=.exe
5289else
Matthias Kloseb9621712010-04-24 17:59:49 +00005290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5291$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292 BUILDEXEEXT=$EXEEXT
5293fi
5294rmdir CaseSensitiveTestDir
5295
5296case $MACHDEP in
5297bsdos*)
5298 case $CC in
5299 gcc) CC="$CC -D_HAVE_BSDI";;
5300 esac;;
5301esac
5302
5303case $ac_sys_system in
5304hp*|HP*)
5305 case $CC in
5306 cc|*/cc) CC="$CC -Ae";;
5307 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308esac
5309
5310
5311
Matthias Kloseb9621712010-04-24 17:59:49 +00005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5313$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314if test -z "$LIBRARY"
5315then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005316 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5319$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005320
5321# LDLIBRARY is the name of the library to link against (as opposed to the
5322# name of the library into which to insert object files). BLDLIBRARY is also
5323# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5324# is blank as the main program is not linked directly against LDLIBRARY.
5325# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5326# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5327# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5328# DLLLIBRARY is the shared (i.e., DLL) library.
5329#
5330# RUNSHARED is used to run shared python without installed libraries
5331#
5332# INSTSONAME is the name of the shared library that will be use to install
5333# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005334#
5335# LDVERSION is the shared library version number, normally the Python version
5336# with the ABI build flags appended.
5337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338
5339
5340
5341
5342
5343
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005345LDLIBRARY="$LIBRARY"
5346BLDLIBRARY='$(LDLIBRARY)'
5347INSTSONAME='$(LDLIBRARY)'
5348DLLLIBRARY=''
5349LDLIBRARYDIR=''
5350RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005351LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353# LINKCC is the command that links the python executable -- default is $(CC).
5354# If CXX is set, and if it is needed to link a main function that was
5355# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5356# python might then depend on the C++ runtime
5357# This is altered for AIX in order to build the export list before
5358# linking.
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5361$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362if test -z "$LINKCC"
5363then
5364 LINKCC='$(PURIFY) $(MAINCC)'
5365 case $ac_sys_system in
5366 AIX*)
5367 exp_extra="\"\""
5368 if test $ac_sys_release -ge 5 -o \
5369 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5370 exp_extra="."
5371 fi
5372 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373 QNX*)
5374 # qcc must be used because the other compilers do not
5375 # support -N.
5376 LINKCC=qcc;;
5377 esac
5378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5380$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381
5382# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5383# make sure we default having it set to "no": this is used by
5384# distutils.unixccompiler to know if it should add --enable-new-dtags
5385# to linker command lines, and failing to detect GNU ld simply results
5386# in the same bahaviour as before.
5387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5389$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390ac_prog=ld
5391if test "$GCC" = yes; then
5392 ac_prog=`$CC -print-prog-name=ld`
5393fi
5394case `"$ac_prog" -V 2>&1 < /dev/null` in
5395 *GNU*)
5396 GNULD=yes;;
5397 *)
5398 GNULD=no;;
5399esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5401$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005402
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5404$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005405if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005406 $as_echo_n "(cached) " >&6
5407else
5408 ac_cv_c_inline=no
5409for ac_kw in inline __inline__ __inline; do
5410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5411/* end confdefs.h. */
5412#ifndef __cplusplus
5413typedef int foo_t;
5414static $ac_kw foo_t static_foo () {return 0; }
5415$ac_kw foo_t foo () {return 0; }
5416#endif
5417
5418_ACEOF
5419if ac_fn_c_try_compile "$LINENO"; then :
5420 ac_cv_c_inline=$ac_kw
5421fi
5422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5423 test "$ac_cv_c_inline" != no && break
5424done
5425
5426fi
5427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5428$as_echo "$ac_cv_c_inline" >&6; }
5429
5430case $ac_cv_c_inline in
5431 inline | yes) ;;
5432 *)
5433 case $ac_cv_c_inline in
5434 no) ac_val=;;
5435 *) ac_val=$ac_cv_c_inline;;
5436 esac
5437 cat >>confdefs.h <<_ACEOF
5438#ifndef __cplusplus
5439#define inline $ac_val
5440#endif
5441_ACEOF
5442 ;;
5443esac
5444
5445if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005446
5447$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005448
5449
5450fi
5451
5452
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5454$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005456if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457 enableval=$enable_shared;
5458fi
5459
5460
5461if test -z "$enable_shared"
5462then
5463 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005464 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465 enable_shared="yes";;
5466 *)
5467 enable_shared="no";;
5468 esac
5469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5471$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5474$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005476if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005477 enableval=$enable_profiling;
5478fi
5479
5480if test "x$enable_profiling" = xyes; then
5481 ac_save_cc="$CC"
5482 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484/* end confdefs.h. */
5485int main() { return 0; }
5486_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005487if ac_fn_c_try_link "$LINENO"; then :
5488
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005490 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005491fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005492rm -f core conftest.err conftest.$ac_objext \
5493 conftest$ac_exeext conftest.$ac_ext
5494 CC="$ac_save_cc"
5495else
5496 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5499$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005500
doko@ubuntu.comba015832012-06-30 16:52:05 +02005501if test "x$enable_profiling" = xyes; then
5502 BASECFLAGS="-pg $BASECFLAGS"
5503 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005504fi
5505
Matthias Kloseb9621712010-04-24 17:59:49 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5507$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508
5509# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5510# library that we build, but we do not want to link against it (we
5511# will find it with a -framework option). For this reason there is an
5512# extra variable BLDLIBRARY against which Python and the extension
5513# modules are linked, BLDLIBRARY. This is normally the same as
5514# LDLIBRARY, but empty for MacOSX framework builds.
5515if test "$enable_framework"
5516then
5517 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5518 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5519 BLDLIBRARY=''
5520else
5521 BLDLIBRARY='$(LDLIBRARY)'
5522fi
5523
5524# Other platforms follow
5525if test $enable_shared = "yes"; then
5526
Matthias Kloseb9621712010-04-24 17:59:49 +00005527$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528
5529 case $ac_sys_system in
5530 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005531 LDLIBRARY='libpython$(LDVERSION).dll.a'
5532 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533 ;;
5534 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005535 LDLIBRARY='libpython$(LDVERSION).so'
5536 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5538 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005539 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005540 then
5541 PY3LIBRARY=libpython3.so
5542 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005544 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005545 LDLIBRARY='libpython$(LDVERSION).so'
5546 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5548 case $ac_sys_system in
5549 FreeBSD*)
5550 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5551 ;;
5552 esac
5553 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005554 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005555 then
5556 PY3LIBRARY=libpython3.so
5557 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558 ;;
5559 hp*|HP*)
5560 case `uname -m` in
5561 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005562 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563 ;;
5564 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005565 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566 ;;
5567 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005568 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5570 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005572 LDLIBRARY='libpython$(LDVERSION).dylib'
5573 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5575 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005576 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005577 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005578 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5579 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
5581 esac
5582else # shared is disabled
5583 case $ac_sys_system in
5584 CYGWIN*)
5585 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005586 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 ;;
5588 esac
5589fi
5590
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005591if test "$cross_compiling" = yes; then
5592 RUNSHARED=
5593fi
5594
Matthias Kloseb9621712010-04-24 17:59:49 +00005595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5596$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
5598if test -n "$ac_tool_prefix"; then
5599 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5600set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005603if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005604 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605else
5606 if test -n "$RANLIB"; then
5607 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5608else
5609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612 IFS=$as_save_IFS
5613 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005614 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005615 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 break 2
5619 fi
5620done
Matthias Kloseb9621712010-04-24 17:59:49 +00005621 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622IFS=$as_save_IFS
5623
5624fi
5625fi
5626RANLIB=$ac_cv_prog_RANLIB
5627if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5629$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630else
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633fi
5634
5635
5636fi
5637if test -z "$ac_cv_prog_RANLIB"; then
5638 ac_ct_RANLIB=$RANLIB
5639 # Extract the first word of "ranlib", so it can be a program name with args.
5640set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005643if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005644 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005645else
5646 if test -n "$ac_ct_RANLIB"; then
5647 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5648else
5649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5650for as_dir in $PATH
5651do
5652 IFS=$as_save_IFS
5653 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 break 2
5659 fi
5660done
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662IFS=$as_save_IFS
5663
5664fi
5665fi
5666ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5667if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5669$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670else
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5672$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673fi
5674
5675 if test "x$ac_ct_RANLIB" = x; then
5676 RANLIB=":"
5677 else
5678 case $cross_compiling:$ac_tool_warned in
5679yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5681$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682ac_tool_warned=yes ;;
5683esac
5684 RANLIB=$ac_ct_RANLIB
5685 fi
5686else
5687 RANLIB="$ac_cv_prog_RANLIB"
5688fi
5689
5690
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005691if test -n "$ac_tool_prefix"; then
5692 for ac_prog in ar aal
5693 do
5694 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5695set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005698if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700else
5701 if test -n "$AR"; then
5702 ac_cv_prog_AR="$AR" # Let the user override the test.
5703else
5704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707 IFS=$as_save_IFS
5708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005710 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5711 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713 break 2
5714 fi
5715done
Matthias Kloseb9621712010-04-24 17:59:49 +00005716 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717IFS=$as_save_IFS
5718
5719fi
5720fi
5721AR=$ac_cv_prog_AR
5722if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5724$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725else
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728fi
5729
5730
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005731 test -n "$AR" && break
5732 done
5733fi
5734if test -z "$AR"; then
5735 ac_ct_AR=$AR
5736 for ac_prog in ar aal
5737do
5738 # Extract the first word of "$ac_prog", so it can be a program name with args.
5739set dummy $ac_prog; ac_word=$2
5740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
5742if ${ac_cv_prog_ac_ct_AR+:} false; then :
5743 $as_echo_n "(cached) " >&6
5744else
5745 if test -n "$ac_ct_AR"; then
5746 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5747else
5748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751 IFS=$as_save_IFS
5752 test -z "$as_dir" && as_dir=.
5753 for ac_exec_ext in '' $ac_executable_extensions; do
5754 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5755 ac_cv_prog_ac_ct_AR="$ac_prog"
5756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5757 break 2
5758 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005760 done
5761IFS=$as_save_IFS
5762
5763fi
5764fi
5765ac_ct_AR=$ac_cv_prog_ac_ct_AR
5766if test -n "$ac_ct_AR"; then
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5768$as_echo "$ac_ct_AR" >&6; }
5769else
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
5772fi
5773
5774
5775 test -n "$ac_ct_AR" && break
5776done
5777
5778 if test "x$ac_ct_AR" = x; then
5779 AR="ar"
5780 else
5781 case $cross_compiling:$ac_tool_warned in
5782yes:)
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5784$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5785ac_tool_warned=yes ;;
5786esac
5787 AR=$ac_ct_AR
5788 fi
5789fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
5791
5792# tweak ARFLAGS only if the user didn't set it on the command line
5793
5794if test -z "$ARFLAGS"
5795then
5796 ARFLAGS="rc"
5797fi
5798
doko@ubuntu.com58844492012-06-30 18:25:32 +02005799if test -n "$ac_tool_prefix"; then
5800 for ac_prog in readelf
5801 do
5802 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805$as_echo_n "checking for $ac_word... " >&6; }
5806if ${ac_cv_prog_READELF+:} false; then :
5807 $as_echo_n "(cached) " >&6
5808else
5809 if test -n "$READELF"; then
5810 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5811else
5812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813for as_dir in $PATH
5814do
5815 IFS=$as_save_IFS
5816 test -z "$as_dir" && as_dir=.
5817 for ac_exec_ext in '' $ac_executable_extensions; do
5818 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5819 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5820 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821 break 2
5822 fi
5823done
5824 done
5825IFS=$as_save_IFS
5826
5827fi
5828fi
5829READELF=$ac_cv_prog_READELF
5830if test -n "$READELF"; then
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5832$as_echo "$READELF" >&6; }
5833else
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839 test -n "$READELF" && break
5840 done
5841fi
5842if test -z "$READELF"; then
5843 ac_ct_READELF=$READELF
5844 for ac_prog in readelf
5845do
5846 # Extract the first word of "$ac_prog", so it can be a program name with args.
5847set dummy $ac_prog; ac_word=$2
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849$as_echo_n "checking for $ac_word... " >&6; }
5850if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5851 $as_echo_n "(cached) " >&6
5852else
5853 if test -n "$ac_ct_READELF"; then
5854 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5855else
5856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
5861 for ac_exec_ext in '' $ac_executable_extensions; do
5862 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5863 ac_cv_prog_ac_ct_READELF="$ac_prog"
5864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865 break 2
5866 fi
5867done
5868 done
5869IFS=$as_save_IFS
5870
5871fi
5872fi
5873ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5874if test -n "$ac_ct_READELF"; then
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5876$as_echo "$ac_ct_READELF" >&6; }
5877else
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
5880fi
5881
5882
5883 test -n "$ac_ct_READELF" && break
5884done
5885
5886 if test "x$ac_ct_READELF" = x; then
5887 READELF=":"
5888 else
5889 case $cross_compiling:$ac_tool_warned in
5890yes:)
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5893ac_tool_warned=yes ;;
5894esac
5895 READELF=$ac_ct_READELF
5896 fi
5897fi
5898
5899if test "$cross_compiling" = yes; then
5900 case "$READELF" in
5901 readelf|:)
5902 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5903 ;;
5904 esac
5905fi
5906
5907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005909DISABLE_ASDLGEN=""
5910# Extract the first word of "python", so it can be a program name with args.
5911set dummy python; ac_word=$2
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005914if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005915 $as_echo_n "(cached) " >&6
5916else
5917 if test -n "$HAS_PYTHON"; then
5918 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5919else
5920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921for as_dir in $PATH
5922do
5923 IFS=$as_save_IFS
5924 test -z "$as_dir" && as_dir=.
5925 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005927 ac_cv_prog_HAS_PYTHON="found"
5928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929 break 2
5930 fi
5931done
5932 done
5933IFS=$as_save_IFS
5934
5935 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5936fi
5937fi
5938HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5939if test -n "$HAS_PYTHON"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5941$as_echo "$HAS_PYTHON" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948if test $HAS_HG != found -o $HAS_PYTHON != found
5949then
5950 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5951fi
5952
5953
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954case $MACHDEP in
5955bsdos*|hp*|HP*)
5956 # install -d does not work on BSDI or HP-UX
5957 if test -z "$INSTALL"
5958 then
5959 INSTALL="${srcdir}/install-sh -c"
5960 fi
5961esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962# Find a good install program. We prefer a C program (faster),
5963# so one script is as good as another. But avoid the broken or
5964# incompatible versions:
5965# SysV /etc/install, /usr/sbin/install
5966# SunOS /usr/etc/install
5967# IRIX /sbin/install
5968# AIX /bin/install
5969# AmigaOS /C/install, which installs bootblocks on floppy discs
5970# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5971# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5972# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5973# OS/2's system install, which has a completely different semantic
5974# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005975# Reject install programs that cannot install multiple files.
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5977$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005978if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005979if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
5982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985 IFS=$as_save_IFS
5986 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005987 # Account for people who put trailing slashes in PATH elements.
5988case $as_dir/ in #((
5989 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 /usr/ucb/* ) ;;
5993 *)
5994 # OSF1 and SCO ODT 3.0 have their own names for install.
5995 # Don't use installbsd from OSF since it installs stuff as root
5996 # by default.
5997 for ac_prog in ginstall scoinst install; do
5998 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005999 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000 if test $ac_prog = install &&
6001 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6002 # AIX install. It has an incompatible calling convention.
6003 :
6004 elif test $ac_prog = install &&
6005 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6006 # program-specific install script used by HP pwplus--don't use.
6007 :
6008 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006009 rm -rf conftest.one conftest.two conftest.dir
6010 echo one > conftest.one
6011 echo two > conftest.two
6012 mkdir conftest.dir
6013 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6014 test -s conftest.one && test -s conftest.two &&
6015 test -s conftest.dir/conftest.one &&
6016 test -s conftest.dir/conftest.two
6017 then
6018 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6019 break 3
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 fi
6022 fi
6023 done
6024 done
6025 ;;
6026esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006027
6028 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006029IFS=$as_save_IFS
6030
Matthias Kloseb9621712010-04-24 17:59:49 +00006031rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033fi
6034 if test "${ac_cv_path_install+set}" = set; then
6035 INSTALL=$ac_cv_path_install
6036 else
6037 # As a last resort, use the slow shell script. Don't cache a
6038 # value for INSTALL within a source directory, because that will
6039 # break other packages using the cache if that directory is
6040 # removed, or if the value is a relative name.
6041 INSTALL=$ac_install_sh
6042 fi
6043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6045$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046
6047# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6048# It thinks the first close brace ends the variable substitution.
6049test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6050
6051test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6052
6053test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6054
Matthias Klose93a0ef12012-03-15 18:08:34 +01006055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6056$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6057if test -z "$MKDIR_P"; then
6058 if ${ac_cv_path_mkdir+:} false; then :
6059 $as_echo_n "(cached) " >&6
6060else
6061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_prog in mkdir gmkdir; do
6067 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006068 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006069 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6070 'mkdir (GNU coreutils) '* | \
6071 'mkdir (coreutils) '* | \
6072 'mkdir (fileutils) '4.1*)
6073 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6074 break 3;;
6075 esac
6076 done
6077 done
6078 done
6079IFS=$as_save_IFS
6080
6081fi
6082
6083 test -d ./--version && rmdir ./--version
6084 if test "${ac_cv_path_mkdir+set}" = set; then
6085 MKDIR_P="$ac_cv_path_mkdir -p"
6086 else
6087 # As a last resort, use the slow shell script. Don't cache a
6088 # value for MKDIR_P within a source directory, because that will
6089 # break other packages using the cache if that directory is
6090 # removed, or if the value is a relative name.
6091 MKDIR_P="$ac_install_sh -d"
6092 fi
6093fi
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6095$as_echo "$MKDIR_P" >&6; }
6096
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097
6098# Not every filesystem supports hard links
6099
6100if test -z "$LN" ; then
6101 case $ac_sys_system in
6102 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103 *) LN=ln;;
6104 esac
6105fi
6106
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006107# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006108
6109ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006110
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6113$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114
6115# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006116if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117 withval=$with_pydebug;
6118if test "$withval" != no
6119then
6120
Matthias Kloseb9621712010-04-24 17:59:49 +00006121$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122
Matthias Kloseb9621712010-04-24 17:59:49 +00006123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6124$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006126 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006127else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129fi
6130else
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133fi
6134
6135
6136# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6137# merged with this chunk of code?
6138
6139# Optimizer/debugger flags
6140# ------------------------
6141# (The following bit of code is complicated enough - please keep things
6142# indented properly. Just pretend you're editing Python code. ;-)
6143
6144# There are two parallel sets of case statements below, one that checks to
6145# see if OPT was set and one that does BASECFLAGS setting based upon
6146# compiler and platform. BASECFLAGS tweaks need to be made even if the
6147# user set OPT.
6148
6149# tweak OPT based on compiler and platform, only if the user didn't set
6150# it on the command line
6151
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006152if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153then
6154 case $GCC in
6155 yes)
6156 if test "$CC" != 'g++' ; then
6157 STRICT_PROTO="-Wstrict-prototypes"
6158 fi
6159 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6160 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6161 WRAP="-fwrapv"
6162 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006163
6164 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006165 case $CC in
6166 *clang*) WRAP="-fwrapv"
6167 ;;
6168 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170 case $ac_cv_prog_cc_g in
6171 yes)
6172 if test "$Py_DEBUG" = 'true' ; then
6173 # Optimization messes up debuggers, so turn it off for
6174 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006175 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176 else
6177 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6178 fi
6179 ;;
6180 *)
6181 OPT="-O3 -Wall $STRICT_PROTO"
6182 ;;
6183 esac
6184 case $ac_sys_system in
6185 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6186 ;;
6187 esac
6188 ;;
6189
6190 *)
6191 OPT="-O"
6192 ;;
6193 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194fi
6195
6196
6197
6198# The -arch flags for universal builds on OSX
6199UNIVERSAL_ARCH_FLAGS=
6200
6201
6202# tweak BASECFLAGS based on compiler and platform
6203case $GCC in
6204yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006205 # Python doesn't violate C99 aliasing rules, but older versions of
6206 # GCC produce warnings for legal Python code. Enable
6207 # -fno-strict-aliasing on versions of GCC that support but produce
6208 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6210$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 ac_save_cc="$CC"
6212 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006213 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006214 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006215 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006216else
Matthias Kloseb9621712010-04-24 17:59:49 +00006217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006219
Matthias Kloseb159a552010-04-25 21:00:44 +00006220
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006221int
6222main ()
6223{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006224
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006225 ;
6226 return 0;
6227}
Matthias Kloseb159a552010-04-25 21:00:44 +00006228
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006230if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006231
6232 CC="$ac_save_cc -fstrict-aliasing"
6233 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006235/* end confdefs.h. */
6236
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006237 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006238int
6239main ()
6240{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006241double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006242 ;
6243 return 0;
6244}
Matthias Kloseb159a552010-04-25 21:00:44 +00006245
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006247if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006248
6249 ac_cv_no_strict_aliasing=no
6250
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251else
Matthias Kloseb159a552010-04-25 21:00:44 +00006252
6253 ac_cv_no_strict_aliasing=yes
6254
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006255fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006257
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006258else
Matthias Kloseb159a552010-04-25 21:00:44 +00006259
6260 ac_cv_no_strict_aliasing=no
6261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006264fi
6265
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006266 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6269$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006270 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271 then
6272 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6273 fi
6274
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6276$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6277 ac_save_cc="$CC"
6278 CC="$CC -Wunused-result -Werror"
6279 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006280 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006281 $as_echo_n "(cached) " >&6
6282else
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284/* end confdefs.h. */
6285
6286
6287int
6288main ()
6289{
6290
6291 ;
6292 return 0;
6293}
6294
6295_ACEOF
6296if ac_fn_c_try_compile "$LINENO"; then :
6297
6298 ac_cv_disable_unused_result_warning=yes
6299
6300else
6301
6302 ac_cv_disable_unused_result_warning=no
6303
6304fi
6305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6306fi
6307
6308 CFLAGS="$save_CFLAGS"
6309 CC="$ac_save_cc"
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6311$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6312
6313 if test $ac_cv_disable_unused_result_warning = yes
6314 then
6315 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6316 fi
6317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6319 # support. Without this, treatment of subnormals doesn't follow
6320 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006321 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 alpha*)
6323 BASECFLAGS="$BASECFLAGS -mieee"
6324 ;;
6325 esac
6326
6327 case $ac_sys_system in
6328 SCO_SV*)
6329 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6330 ;;
6331 # is there any other compiler on Darwin besides gcc?
6332 Darwin*)
6333 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6334 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006335 if test "${CC}" = gcc
6336 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6338$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006339 case "${UNIVERSALSDK}" in
6340 */MacOSX10.4u.sdk)
6341 # Build using 10.4 SDK, force usage of gcc when the
6342 # compiler is gcc, otherwise the user will get very
6343 # confusing error messages when building on OSX 10.6
6344 CC=gcc-4.0
6345 CPP=cpp-4.0
6346 ;;
6347 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6349$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351
6352
6353 if test "${enable_universalsdk}"; then
6354 UNIVERSAL_ARCH_FLAGS=""
6355 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6356 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6357 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006358 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6360 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006361 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006362 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363
6364 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6365 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006366 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006367 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006369 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6370 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006371 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006372 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006373
6374 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6375 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006376 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006377 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006378
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006380 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381
6382 fi
6383
6384
Ronald Oussoren666028b2010-04-18 19:07:43 +00006385 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6386 if test "${UNIVERSALSDK}" != "/"
6387 then
6388 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6389 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006390 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 fi
6392 fi
6393
6394 # Calculate the right deployment target for this build.
6395 #
6396 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006397 if test ${cur_target} '>' 10.2 && \
6398 test ${cur_target} '<' 10.6
6399 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006401 if test ${enable_universalsdk}; then
6402 if test "${UNIVERSAL_ARCHS}" = "all"; then
6403 # Ensure that the default platform for a
6404 # 4-way universal build is OSX 10.5,
6405 # that's the first OS release where
6406 # 4-way builds make sense.
6407 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006408
6409 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6410 cur_target='10.5'
6411
6412 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6413 cur_target='10.5'
6414
6415 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6416 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006417 fi
6418 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006419 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006420 # On Intel macs default to a deployment
6421 # target of 10.4, that's the first OSX
6422 # release with Intel support.
6423 cur_target="10.4"
6424 fi
6425 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426 fi
6427 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6428
6429 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6430 # environment with a value that is the same as what we'll use
6431 # in the Makefile to ensure that we'll get the same compiler
6432 # environment during configure and build time.
6433 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6434 export MACOSX_DEPLOYMENT_TARGET
6435 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6436
6437 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 esac
6439 ;;
6440
6441*)
6442 case $ac_sys_system in
6443 OpenUNIX*|UnixWare*)
6444 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6445 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 SCO_SV*)
6447 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6448 ;;
6449 esac
6450 ;;
6451esac
6452
6453if test "$Py_DEBUG" = 'true'; then
6454 :
6455else
6456 OPT="-DNDEBUG $OPT"
6457fi
6458
6459if test "$ac_arch_flags"
6460then
6461 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6462fi
6463
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464# Check whether GCC supports PyArg_ParseTuple format
6465if test "$GCC" = "yes"
6466then
Matthias Kloseb9621712010-04-24 17:59:49 +00006467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6468$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006469 save_CFLAGS=$CFLAGS
6470 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472/* end confdefs.h. */
6473
6474 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475int
6476main ()
6477{
6478
6479 ;
6480 return 0;
6481}
Matthias Kloseb159a552010-04-25 21:00:44 +00006482
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006484if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485
Matthias Kloseb159a552010-04-25 21:00:44 +00006486
Matthias Kloseb9621712010-04-24 17:59:49 +00006487$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006488
Matthias Kloseb159a552010-04-25 21:00:44 +00006489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006490$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006491
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492else
Matthias Kloseb159a552010-04-25 21:00:44 +00006493
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006495$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496
6497fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6499 CFLAGS=$save_CFLAGS
6500fi
6501
6502# On some compilers, pthreads are available without further options
6503# (e.g. MacOS X). On some of these systems, the compiler will not
6504# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6505# So we have to see first whether pthreads are available without
6506# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6508$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006509if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006510 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511else
Matthias Kloseb9621712010-04-24 17:59:49 +00006512 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513 ac_cv_pthread_is_default=no
6514else
Matthias Kloseb9621712010-04-24 17:59:49 +00006515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516/* end confdefs.h. */
6517
6518#include <pthread.h>
6519
6520void* routine(void* p){return NULL;}
6521
6522int main(){
6523 pthread_t p;
6524 if(pthread_create(&p,NULL,routine,NULL)!=0)
6525 return 1;
6526 (void)pthread_detach(p);
6527 return 0;
6528}
6529
6530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006531if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
6533 ac_cv_pthread_is_default=yes
6534 ac_cv_kthread=no
6535 ac_cv_pthread=no
6536
6537else
Matthias Kloseb9621712010-04-24 17:59:49 +00006538 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6541 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542fi
6543
6544
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545fi
6546
Matthias Kloseb9621712010-04-24 17:59:49 +00006547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6548$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549
6550
6551if test $ac_cv_pthread_is_default = yes
6552then
6553 ac_cv_kpthread=no
6554else
6555# -Kpthread, if available, provides the right #defines
6556# and linker options to make pthread_create available
6557# Some compilers won't report that they do not support -Kpthread,
6558# so we need to run a program to see whether it really made the
6559# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6561$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006562if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006563 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564else
6565 ac_save_cc="$CC"
6566CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006567if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568 ac_cv_kpthread=no
6569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571/* end confdefs.h. */
6572
6573#include <pthread.h>
6574
6575void* routine(void* p){return NULL;}
6576
6577int main(){
6578 pthread_t p;
6579 if(pthread_create(&p,NULL,routine,NULL)!=0)
6580 return 1;
6581 (void)pthread_detach(p);
6582 return 0;
6583}
6584
6585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006586if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587 ac_cv_kpthread=yes
6588else
Matthias Kloseb9621712010-04-24 17:59:49 +00006589 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6592 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593fi
6594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595CC="$ac_save_cc"
6596fi
6597
Matthias Kloseb9621712010-04-24 17:59:49 +00006598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6599$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006600fi
6601
6602if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6603then
6604# -Kthread, if available, provides the right #defines
6605# and linker options to make pthread_create available
6606# Some compilers won't report that they do not support -Kthread,
6607# so we need to run a program to see whether it really made the
6608# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6610$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006611if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006612 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006613else
6614 ac_save_cc="$CC"
6615CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006616if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006617 ac_cv_kthread=no
6618else
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620/* end confdefs.h. */
6621
6622#include <pthread.h>
6623
6624void* routine(void* p){return NULL;}
6625
6626int main(){
6627 pthread_t p;
6628 if(pthread_create(&p,NULL,routine,NULL)!=0)
6629 return 1;
6630 (void)pthread_detach(p);
6631 return 0;
6632}
6633
6634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006635if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636 ac_cv_kthread=yes
6637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642fi
6643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644CC="$ac_save_cc"
6645fi
6646
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6648$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649fi
6650
6651if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6652then
6653# -pthread, if available, provides the right #defines
6654# and linker options to make pthread_create available
6655# Some compilers won't report that they do not support -pthread,
6656# so we need to run a program to see whether it really made the
6657# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6659$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006660if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662else
6663 ac_save_cc="$CC"
6664CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006665if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666 ac_cv_pthread=no
6667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669/* end confdefs.h. */
6670
6671#include <pthread.h>
6672
6673void* routine(void* p){return NULL;}
6674
6675int main(){
6676 pthread_t p;
6677 if(pthread_create(&p,NULL,routine,NULL)!=0)
6678 return 1;
6679 (void)pthread_detach(p);
6680 return 0;
6681}
6682
6683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006684if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685 ac_cv_pthread=yes
6686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
6692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693CC="$ac_save_cc"
6694fi
6695
Matthias Kloseb9621712010-04-24 17:59:49 +00006696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6697$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006698fi
6699
6700# If we have set a CC compiler flag for thread support then
6701# check if it works for CXX, too.
6702ac_cv_cxx_thread=no
6703if test ! -z "$CXX"
6704then
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6706$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707ac_save_cxx="$CXX"
6708
6709if test "$ac_cv_kpthread" = "yes"
6710then
6711 CXX="$CXX -Kpthread"
6712 ac_cv_cxx_thread=yes
6713elif test "$ac_cv_kthread" = "yes"
6714then
6715 CXX="$CXX -Kthread"
6716 ac_cv_cxx_thread=yes
6717elif test "$ac_cv_pthread" = "yes"
6718then
6719 CXX="$CXX -pthread"
6720 ac_cv_cxx_thread=yes
6721fi
6722
6723if test $ac_cv_cxx_thread = yes
6724then
6725 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6726 $CXX -c conftest.$ac_ext 2>&5
6727 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6728 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6729 then
6730 ac_cv_cxx_thread=yes
6731 else
6732 ac_cv_cxx_thread=no
6733 fi
6734 rm -fr conftest*
6735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6737$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738fi
6739CXX="$ac_save_cxx"
6740
6741
6742# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6744$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006745if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747else
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749/* end confdefs.h. */
6750#include <stdlib.h>
6751#include <stdarg.h>
6752#include <string.h>
6753#include <float.h>
6754
6755int
6756main ()
6757{
6758
6759 ;
6760 return 0;
6761}
6762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006763if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 ac_cv_header_stdc=yes
6765else
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6769
6770if test $ac_cv_header_stdc = yes; then
6771 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773/* end confdefs.h. */
6774#include <string.h>
6775
6776_ACEOF
6777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 $EGREP "memchr" >/dev/null 2>&1; then :
6779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780else
6781 ac_cv_header_stdc=no
6782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006783rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784
6785fi
6786
6787if test $ac_cv_header_stdc = yes; then
6788 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790/* end confdefs.h. */
6791#include <stdlib.h>
6792
6793_ACEOF
6794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 $EGREP "free" >/dev/null 2>&1; then :
6796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797else
6798 ac_cv_header_stdc=no
6799fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006800rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006801
6802fi
6803
6804if test $ac_cv_header_stdc = yes; then
6805 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807 :
6808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810/* end confdefs.h. */
6811#include <ctype.h>
6812#include <stdlib.h>
6813#if ((' ' & 0x0FF) == 0x020)
6814# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6815# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6816#else
6817# define ISLOWER(c) \
6818 (('a' <= (c) && (c) <= 'i') \
6819 || ('j' <= (c) && (c) <= 'r') \
6820 || ('s' <= (c) && (c) <= 'z'))
6821# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6822#endif
6823
6824#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6825int
6826main ()
6827{
6828 int i;
6829 for (i = 0; i < 256; i++)
6830 if (XOR (islower (i), ISLOWER (i))
6831 || toupper (i) != TOUPPER (i))
6832 return 2;
6833 return 0;
6834}
6835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006836if ac_fn_c_try_run "$LINENO"; then :
6837
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843fi
6844
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845fi
6846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6848$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849if test $ac_cv_header_stdc = yes; then
6850
Matthias Kloseb9621712010-04-24 17:59:49 +00006851$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852
6853fi
6854
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006855ac_save_cppflags="$CPPFLAGS"
6856CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006857for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006858fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006859ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006860sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006861unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006862poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006863sys/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 +01006864sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006865sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006866sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006867sys/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 -07006868libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006869bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006870do :
6871 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6872ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006873if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006874 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006876_ACEOF
6877
6878fi
6879
Guido van Rossum627b2d71993-12-24 10:39:16 +00006880done
6881
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006882CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006883ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006884for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6887$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006888if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890else
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006892/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006893#include <sys/types.h>
6894#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006895
Martin v. Löwis11437992002-04-12 09:54:03 +00006896int
6897main ()
6898{
6899if ((DIR *) 0)
6900return 0;
6901 ;
6902 return 0;
6903}
6904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006905if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006906 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006907else
Matthias Kloseb9621712010-04-24 17:59:49 +00006908 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006912eval ac_res=\$$as_ac_Header
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6914$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006915if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006917#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006918_ACEOF
6919
6920ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006921fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006922
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006923done
6924# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6925if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6927$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006928if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006930else
Martin v. Löwis11437992002-04-12 09:54:03 +00006931 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006934
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935/* Override any GCC internal prototype to avoid an error.
6936 Use char because int might match the return type of a GCC
6937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006938#ifdef __cplusplus
6939extern "C"
6940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006941char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006942int
6943main ()
6944{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006946 ;
6947 return 0;
6948}
6949_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006950for ac_lib in '' dir; do
6951 if test -z "$ac_lib"; then
6952 ac_res="none required"
6953 else
6954 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006955 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006956 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006958 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006960rm -f core conftest.err conftest.$ac_objext \
6961 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006962 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006963 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006965done
Victor Stinnere0be4232011-10-25 13:06:09 +02006966if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968else
6969 ac_cv_search_opendir=no
6970fi
6971rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006972LIBS=$ac_func_search_save_LIBS
6973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6975$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006976ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006977if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
Michael W. Hudson54241132001-12-07 15:38:26 +00006982else
Matthias Kloseb9621712010-04-24 17:59:49 +00006983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6984$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006985if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006986 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006987else
6988 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006991
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992/* Override any GCC internal prototype to avoid an error.
6993 Use char because int might match the return type of a GCC
6994 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006995#ifdef __cplusplus
6996extern "C"
6997#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006998char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006999int
7000main ()
7001{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007002return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007003 ;
7004 return 0;
7005}
7006_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007for ac_lib in '' x; do
7008 if test -z "$ac_lib"; then
7009 ac_res="none required"
7010 else
7011 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007012 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007013 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007017rm -f core conftest.err conftest.$ac_objext \
7018 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007019 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022done
Victor Stinnere0be4232011-10-25 13:06:09 +02007023if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025else
7026 ac_cv_search_opendir=no
7027fi
7028rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007029LIBS=$ac_func_search_save_LIBS
7030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7032$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007034if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037fi
7038
7039fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007040
Matthias Kloseb9621712010-04-24 17:59:49 +00007041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7042$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007043if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007045else
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007047/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007048#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007049int
7050main ()
7051{
7052return makedev(0, 0);
7053 ;
7054 return 0;
7055}
7056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007058 ac_cv_header_sys_types_h_makedev=yes
7059else
Matthias Kloseb9621712010-04-24 17:59:49 +00007060 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007062rm -f core conftest.err conftest.$ac_objext \
7063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007064
7065fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7067$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007068
7069if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007070ac_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 +02007071if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007072
Matthias Kloseb9621712010-04-24 17:59:49 +00007073$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007074
7075fi
7076
7077
7078
7079 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 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 +02007081if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007082
Matthias Kloseb9621712010-04-24 17:59:49 +00007083$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007084
7085fi
7086
7087
7088 fi
7089fi
7090
Michael W. Hudson54241132001-12-07 15:38:26 +00007091
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007092# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7093for ac_header in net/if.h
7094do :
7095 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7096#ifdef STDC_HEADERS
7097# include <stdlib.h>
7098# include <stddef.h>
7099#else
7100# ifdef HAVE_STDLIB_H
7101# include <stdlib.h>
7102# endif
7103#endif
7104#ifdef HAVE_SYS_SOCKET_H
7105# include <sys/socket.h>
7106#endif
7107
7108"
Victor Stinnere0be4232011-10-25 13:06:09 +02007109if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007110 cat >>confdefs.h <<_ACEOF
7111#define HAVE_NET_IF_H 1
7112_ACEOF
7113
7114fi
7115
7116done
7117
7118
7119
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007120# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007121for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007122do :
7123 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007124#ifdef HAVE_CURSES_H
7125#include <curses.h>
7126#endif
7127
Matthias Kloseb9621712010-04-24 17:59:49 +00007128"
Victor Stinnere0be4232011-10-25 13:06:09 +02007129if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007130 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007131#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007132_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007133
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007134fi
7135
7136done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007137
7138
Martin v. Löwis11017b12006-01-14 18:12:57 +00007139# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007140for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007141do :
7142 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 +00007143#ifdef HAVE_ASM_TYPES_H
7144#include <asm/types.h>
7145#endif
7146#ifdef HAVE_SYS_SOCKET_H
7147#include <sys/socket.h>
7148#endif
7149
Matthias Kloseb9621712010-04-24 17:59:49 +00007150"
Victor Stinnere0be4232011-10-25 13:06:09 +02007151if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007152 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007153#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007154_ACEOF
7155
7156fi
7157
7158done
7159
7160
Charles-François Natali47413c12011-10-06 19:47:44 +02007161# On Linux, can.h and can/raw.h require sys/socket.h
7162for ac_header in linux/can.h linux/can/raw.h
7163do :
7164 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7165ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7166#ifdef HAVE_SYS_SOCKET_H
7167#include <sys/socket.h>
7168#endif
7169
7170"
7171if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7172 cat >>confdefs.h <<_ACEOF
7173#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7174_ACEOF
7175
7176fi
7177
7178done
7179
7180
Guido van Rossum627b2d71993-12-24 10:39:16 +00007181# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007182was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7184$as_echo_n "checking for clock_t in time.h... " >&6; }
7185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007186/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007187#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007188
7189_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007192 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007193else
Martin v. Löwis11437992002-04-12 09:54:03 +00007194
7195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007197
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007198
Guido van Rossum627b2d71993-12-24 10:39:16 +00007199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007200rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007201
Matthias Kloseb9621712010-04-24 17:59:49 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7203$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007204
Matthias Kloseb9621712010-04-24 17:59:49 +00007205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7206$as_echo_n "checking for makedev... " >&6; }
7207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007208/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007209
Jesus Cea740f53a2010-04-28 11:35:30 +00007210#if defined(MAJOR_IN_MKDEV)
7211#include <sys/mkdev.h>
7212#elif defined(MAJOR_IN_SYSMACROS)
7213#include <sys/sysmacros.h>
7214#else
7215#include <sys/types.h>
7216#endif
7217
Neal Norwitz11690112002-07-30 01:08:28 +00007218int
7219main ()
7220{
Jesus Cea740f53a2010-04-28 11:35:30 +00007221
7222 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007223 ;
7224 return 0;
7225}
Matthias Kloseb159a552010-04-25 21:00:44 +00007226
Neal Norwitz11690112002-07-30 01:08:28 +00007227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007228if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007229 ac_cv_has_makedev=yes
7230else
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007233rm -f core conftest.err conftest.$ac_objext \
7234 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7236$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007237if test "$ac_cv_has_makedev" = "yes"; then
7238
Matthias Kloseb9621712010-04-24 17:59:49 +00007239$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007240
7241fi
7242
Martin v. Löwis399a6892002-10-04 10:22:02 +00007243# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7244# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7245# defined, but the compiler does not support pragma redefine_extname,
7246# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7247# structures (such as rlimit64) without declaring them. As a
7248# work-around, disable LFS on such configurations
7249
7250use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7252$as_echo_n "checking Solaris LFS bug... " >&6; }
7253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007254/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007255
7256#define _LARGEFILE_SOURCE 1
7257#define _FILE_OFFSET_BITS 64
7258#include <sys/resource.h>
7259
Martin v. Löwis399a6892002-10-04 10:22:02 +00007260int
7261main ()
7262{
7263struct rlimit foo;
7264 ;
7265 return 0;
7266}
7267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007269 sol_lfs_bug=no
7270else
Matthias Kloseb9621712010-04-24 17:59:49 +00007271 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7275$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007276if test "$sol_lfs_bug" = "yes"; then
7277 use_lfs=no
7278fi
7279
7280if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007281# Two defines needed to enable largefile support on various platforms
7282# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007283case $ac_sys_system/$ac_sys_release in
7284AIX*)
7285
7286$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7287
7288 ;;
7289esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007290
Matthias Kloseb9621712010-04-24 17:59:49 +00007291$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007292
7293
Matthias Kloseb9621712010-04-24 17:59:49 +00007294$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007295
Martin v. Löwis399a6892002-10-04 10:22:02 +00007296fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007297
Guido van Rossum84e7b241996-08-19 21:59:00 +00007298# Add some code to confdefs.h so that the test for off_t works on SCO
7299cat >> confdefs.h <<\EOF
7300#if defined(SCO_DS)
7301#undef _OFF_T
7302#endif
7303EOF
7304
Guido van Rossumef2255b2000-03-10 22:30:29 +00007305# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007306ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007307if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007309else
Martin v. Löwis11437992002-04-12 09:54:03 +00007310
7311cat >>confdefs.h <<_ACEOF
7312#define mode_t int
7313_ACEOF
7314
7315fi
7316
Matthias Kloseb9621712010-04-24 17:59:49 +00007317ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007318if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007320else
Martin v. Löwis11437992002-04-12 09:54:03 +00007321
7322cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007323#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007324_ACEOF
7325
7326fi
7327
Matthias Kloseb9621712010-04-24 17:59:49 +00007328ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007329if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007330
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007331else
Martin v. Löwis11437992002-04-12 09:54:03 +00007332
7333cat >>confdefs.h <<_ACEOF
7334#define pid_t int
7335_ACEOF
7336
7337fi
7338
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007339
Martin v. Löwis11437992002-04-12 09:54:03 +00007340cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007341#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007342_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007345if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007347else
Martin v. Löwis11437992002-04-12 09:54:03 +00007348
7349cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007350#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007351_ACEOF
7352
7353fi
7354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7356$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007357if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007358 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007359else
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007361/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007362#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007363
7364_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007366 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007367 ac_cv_type_uid_t=yes
7368else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007369 ac_cv_type_uid_t=no
7370fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007371rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7375$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007376if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007379
7380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382
7383fi
7384
Matthias Kloseb9621712010-04-24 17:59:49 +00007385ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7386case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007387 no|yes) ;; #(
7388 *)
7389
Matthias Kloseb9621712010-04-24 17:59:49 +00007390$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007391
7392
7393cat >>confdefs.h <<_ACEOF
7394#define uint32_t $ac_cv_c_uint32_t
7395_ACEOF
7396;;
7397 esac
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7400case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007401 no|yes) ;; #(
7402 *)
7403
Matthias Kloseb9621712010-04-24 17:59:49 +00007404$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007405
7406
7407cat >>confdefs.h <<_ACEOF
7408#define uint64_t $ac_cv_c_uint64_t
7409_ACEOF
7410;;
7411 esac
7412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7414case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007415 no|yes) ;; #(
7416 *)
7417
7418cat >>confdefs.h <<_ACEOF
7419#define int32_t $ac_cv_c_int32_t
7420_ACEOF
7421;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007422esac
7423
Matthias Kloseb9621712010-04-24 17:59:49 +00007424ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7425case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007426 no|yes) ;; #(
7427 *)
7428
7429cat >>confdefs.h <<_ACEOF
7430#define int64_t $ac_cv_c_int64_t
7431_ACEOF
7432;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007433esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007434
Matthias Kloseb9621712010-04-24 17:59:49 +00007435ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007436if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007437
Matthias Kloseb9621712010-04-24 17:59:49 +00007438$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007439
7440fi
7441
Stefan Krah1919b7e2012-03-21 18:25:23 +01007442ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7443if test "x$ac_cv_type___uint128_t" = xyes; then :
7444
7445$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7446
7447fi
7448
Jack Jansendd19cf82001-12-06 22:36:17 +00007449
Michael W. Hudson54241132001-12-07 15:38:26 +00007450# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007451# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007452# The cast to long int works around a bug in the HP C Compiler
7453# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7454# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7455# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7457$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007458if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 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 +00007462
Martin v. Löwis11437992002-04-12 09:54:03 +00007463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 if test "$ac_cv_type_int" = yes; then
7465 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7466$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007467as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007468See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007469 else
7470 ac_cv_sizeof_int=0
7471 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007473
Martin v. Löwis11437992002-04-12 09:54:03 +00007474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7476$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007477
7478
7479
Martin v. Löwis11437992002-04-12 09:54:03 +00007480cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007481#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007482_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007483
7484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007485# The cast to long int works around a bug in the HP C Compiler
7486# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7487# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7488# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7490$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007491if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007492 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 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 +00007495
Martin v. Löwis11437992002-04-12 09:54:03 +00007496else
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 if test "$ac_cv_type_long" = yes; then
7498 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007500as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007501See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007502 else
7503 ac_cv_sizeof_long=0
7504 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007506
Martin v. Löwis11437992002-04-12 09:54:03 +00007507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7509$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007510
7511
7512
Martin v. Löwis11437992002-04-12 09:54:03 +00007513cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007514#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007515_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007516
7517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007518# The cast to long int works around a bug in the HP C Compiler
7519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7521# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7523$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007524if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007526else
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 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 +00007528
Martin v. Löwis11437992002-04-12 09:54:03 +00007529else
Matthias Kloseb9621712010-04-24 17:59:49 +00007530 if test "$ac_cv_type_void_p" = yes; then
7531 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7532$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007533as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007534See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007535 else
7536 ac_cv_sizeof_void_p=0
7537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007539
Martin v. Löwis11437992002-04-12 09:54:03 +00007540fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7542$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543
7544
7545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007547#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007548_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007549
7550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551# The cast to long int works around a bug in the HP C Compiler
7552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7554# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7556$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007557if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 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 +00007561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 if test "$ac_cv_type_short" = yes; then
7564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007566as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007567See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007568 else
7569 ac_cv_sizeof_short=0
7570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7575$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576
7577
7578
Martin v. Löwis11437992002-04-12 09:54:03 +00007579cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007580#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007581_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007582
7583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007584# The cast to long int works around a bug in the HP C Compiler
7585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7587# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7589$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007590if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007592else
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 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 +00007594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 if test "$ac_cv_type_float" = yes; then
7597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007599as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007600See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601 else
7602 ac_cv_sizeof_float=0
7603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7608$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609
7610
7611
Martin v. Löwis11437992002-04-12 09:54:03 +00007612cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007613#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007614_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007615
7616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617# The cast to long int works around a bug in the HP C Compiler
7618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7620# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7622$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007623if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 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 +00007627
Martin v. Löwis11437992002-04-12 09:54:03 +00007628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 if test "$ac_cv_type_double" = yes; then
7630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007632as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007633See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634 else
7635 ac_cv_sizeof_double=0
7636 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7641$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642
7643
7644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007646#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007647_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007648
7649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650# The cast to long int works around a bug in the HP C Compiler
7651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7655$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007656if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 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 +00007660
Martin v. Löwis11437992002-04-12 09:54:03 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 if test "$ac_cv_type_fpos_t" = yes; then
7663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007665as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007666See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667 else
7668 ac_cv_sizeof_fpos_t=0
7669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7674$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675
7676
7677
Martin v. Löwis11437992002-04-12 09:54:03 +00007678cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007679#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007680_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007681
Michael W. Hudson54241132001-12-07 15:38:26 +00007682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683# The cast to long int works around a bug in the HP C Compiler
7684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7688$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007689if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007691else
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 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 +00007693
Martin v. Löwis18e16552006-02-15 17:27:45 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 if test "$ac_cv_type_size_t" = yes; then
7696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007698as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007699See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700 else
7701 ac_cv_sizeof_size_t=0
7702 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704
Martin v. Löwis18e16552006-02-15 17:27:45 +00007705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7707$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708
7709
7710
Martin v. Löwis18e16552006-02-15 17:27:45 +00007711cat >>confdefs.h <<_ACEOF
7712#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7713_ACEOF
7714
7715
Christian Heimes400adb02008-02-01 08:12:03 +00007716# The cast to long int works around a bug in the HP C Compiler
7717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7721$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007722if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 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 +00007726
Christian Heimes400adb02008-02-01 08:12:03 +00007727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 if test "$ac_cv_type_pid_t" = yes; then
7729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007731as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007732See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007733 else
7734 ac_cv_sizeof_pid_t=0
7735 fi
7736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737
Christian Heimes400adb02008-02-01 08:12:03 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7740$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007741
7742
7743
7744cat >>confdefs.h <<_ACEOF
7745#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7746_ACEOF
7747
7748
Michael W. Hudson54241132001-12-07 15:38:26 +00007749
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7751$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007752have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007754/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756int
7757main ()
7758{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007759long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 ;
7761 return 0;
7762}
7763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007764if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007765
7766
Matthias Kloseb9621712010-04-24 17:59:49 +00007767$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007768
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007769 have_long_long=yes
7770
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7774$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007775if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776# The cast to long int works around a bug in the HP C Compiler
7777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7781$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007782if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 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 +00007786
Martin v. Löwis11437992002-04-12 09:54:03 +00007787else
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 if test "$ac_cv_type_long_long" = yes; then
7789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007791as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007792See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 else
7794 ac_cv_sizeof_long_long=0
7795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797
Martin v. Löwis11437992002-04-12 09:54:03 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7800$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801
7802
7803
Martin v. Löwis11437992002-04-12 09:54:03 +00007804cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007805#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007806_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007807
Michael W. Hudson54241132001-12-07 15:38:26 +00007808
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007809fi
7810
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7812$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007813have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007815/* end confdefs.h. */
7816
7817int
7818main ()
7819{
7820long double x; x = (long double)0;
7821 ;
7822 return 0;
7823}
7824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007825if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007826
7827
Matthias Kloseb9621712010-04-24 17:59:49 +00007828$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007829
7830 have_long_double=yes
7831
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007832fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7835$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007836if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007837# The cast to long int works around a bug in the HP C Compiler
7838# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7839# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7840# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7842$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007843if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 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 +00007847
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 if test "$ac_cv_type_long_double" = yes; then
7850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007852as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007853See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007854 else
7855 ac_cv_sizeof_long_double=0
7856 fi
7857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7861$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007862
7863
7864
7865cat >>confdefs.h <<_ACEOF
7866#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7867_ACEOF
7868
7869
7870fi
7871
7872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7874$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007875have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007877/* end confdefs.h. */
7878
7879int
7880main ()
7881{
7882_Bool x; x = (_Bool)0;
7883 ;
7884 return 0;
7885}
7886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007887if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007888
7889
Matthias Kloseb9621712010-04-24 17:59:49 +00007890$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007891
7892 have_c99_bool=yes
7893
Thomas Woutersb2137042007-02-01 18:02:27 +00007894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7897$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007898if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899# The cast to long int works around a bug in the HP C Compiler
7900# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7901# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7902# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7904$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007905if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007907else
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 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 +00007909
Thomas Woutersb2137042007-02-01 18:02:27 +00007910else
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 if test "$ac_cv_type__Bool" = yes; then
7912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007914as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007915See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007916 else
7917 ac_cv_sizeof__Bool=0
7918 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920
Thomas Woutersb2137042007-02-01 18:02:27 +00007921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7923$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924
7925
7926
Thomas Woutersb2137042007-02-01 18:02:27 +00007927cat >>confdefs.h <<_ACEOF
7928#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7929_ACEOF
7930
7931
7932fi
7933
Matthias Kloseb9621712010-04-24 17:59:49 +00007934ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007935 #include <stdint.h>
7936 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007937 #ifdef HAVE_INTTYPES_H
7938 #include <inttypes.h>
7939 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007940"
Victor Stinnere0be4232011-10-25 13:06:09 +02007941if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007942
7943cat >>confdefs.h <<_ACEOF
7944#define HAVE_UINTPTR_T 1
7945_ACEOF
7946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947# The cast to long int works around a bug in the HP C Compiler
7948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7952$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 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 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 if test "$ac_cv_type_uintptr_t" = yes; then
7960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007962as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007963See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 else
7965 ac_cv_sizeof_uintptr_t=0
7966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7971$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972
7973
7974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007976#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007977_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007978
Michael W. Hudson54241132001-12-07 15:38:26 +00007979
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007980fi
7981
Thomas Wouters89f507f2006-12-13 04:49:30 +00007982
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007983# The cast to long int works around a bug in the HP C Compiler
7984# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7985# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7986# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7988$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007989if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007991else
Matthias Kloseb9621712010-04-24 17:59:49 +00007992 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007993#ifdef HAVE_SYS_TYPES_H
7994#include <sys/types.h>
7995#endif
7996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007999else
Matthias Kloseb9621712010-04-24 17:59:49 +00008000 if test "$ac_cv_type_off_t" = yes; then
8001 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008003as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008004See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008005 else
8006 ac_cv_sizeof_off_t=0
8007 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008008fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8012$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008013
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008014
8015
Martin v. Löwis11437992002-04-12 09:54:03 +00008016cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008017#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008018_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008019
Michael W. Hudson54241132001-12-07 15:38:26 +00008020
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008021
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8023$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008024if test "$have_long_long" = yes
8025then
8026if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008027 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8032$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008033else
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008036fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008037else
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8039$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008040fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008041
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008042# The cast to long int works around a bug in the HP C Compiler
8043# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8044# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8045# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8047$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008048if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008052#ifdef HAVE_SYS_TYPES_H
8053#include <sys/types.h>
8054#endif
8055#ifdef HAVE_TIME_H
8056#include <time.h>
8057#endif
8058
Matthias Kloseb9621712010-04-24 17:59:49 +00008059"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008061else
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 if test "$ac_cv_type_time_t" = yes; then
8063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008065as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008066See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008067 else
8068 ac_cv_sizeof_time_t=0
8069 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008071
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8074$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008076
8077
Martin v. Löwis11437992002-04-12 09:54:03 +00008078cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008079#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008080_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008081
Michael W. Hudson54241132001-12-07 15:38:26 +00008082
8083
Trent Mick635f6fb2000-08-23 21:33:05 +00008084# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008085ac_save_cc="$CC"
8086if test "$ac_cv_kpthread" = "yes"
8087then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008088elif test "$ac_cv_kthread" = "yes"
8089then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008090elif test "$ac_cv_pthread" = "yes"
8091then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008092fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8095$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008096have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008098/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008099
8100 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008101int
8102main ()
8103{
Guido van Rossum12580492000-09-24 16:47:19 +00008104pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 ;
8106 return 0;
8107}
Matthias Kloseb159a552010-04-25 21:00:44 +00008108
Martin v. Löwis11437992002-04-12 09:54:03 +00008109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008110if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008111 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8115$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008116if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8120# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8122$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008123if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008125else
Matthias Kloseb9621712010-04-24 17:59:49 +00008126 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008127#ifdef HAVE_PTHREAD_H
8128#include <pthread.h>
8129#endif
8130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008133else
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 if test "$ac_cv_type_pthread_t" = yes; then
8135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008137as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008138See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008139 else
8140 ac_cv_sizeof_pthread_t=0
8141 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008143
Trent Mick635f6fb2000-08-23 21:33:05 +00008144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8146$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008147
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008148
8149
Martin v. Löwis11437992002-04-12 09:54:03 +00008150cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008151#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008152_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154
Trent Mick635f6fb2000-08-23 21:33:05 +00008155fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008156CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008157
Michael W. Hudson54241132001-12-07 15:38:26 +00008158
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008159case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008160 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008161 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8162 ;;
8163 Darwin/*)
8164 OTHER_LIBTOOL_OPT=""
8165 ;;
8166esac
8167
8168
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008169ARCH_RUN_32BIT=""
8170
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008171case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008172 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008173 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8174 if test "${enable_universalsdk}"; then
8175 :
8176 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008177 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008178 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008179 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008180 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008181 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008182 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008183 if test ${gcc_version} '<' 4.0
8184 then
8185 LIBTOOL_CRUFT="-lcc_dynamic"
8186 else
8187 LIBTOOL_CRUFT=""
8188 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008189 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008190 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008191else
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008193/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008194
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008195 #include <unistd.h>
8196 int main(int argc, char*argv[])
8197 {
8198 if (sizeof(long) == 4) {
8199 return 0;
8200 } else {
8201 return 1;
8202 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008203 }
8204
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008206if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008207 ac_osx_32bit=yes
8208else
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008213fi
8214
8215
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008216 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008217 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008218 i386)
8219 MACOSX_DEFAULT_ARCH="i386"
8220 ;;
8221 ppc)
8222 MACOSX_DEFAULT_ARCH="ppc"
8223 ;;
8224 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008225 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008226 ;;
8227 esac
8228 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008229 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008230 i386)
8231 MACOSX_DEFAULT_ARCH="x86_64"
8232 ;;
8233 ppc)
8234 MACOSX_DEFAULT_ARCH="ppc64"
8235 ;;
8236 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008237 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008238 ;;
8239 esac
8240
8241 #ARCH_RUN_32BIT="true"
8242 fi
8243
8244 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008245 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008246 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008247esac
8248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8250$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008251if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008252then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008253 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008255 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008256
Matthias Kloseb9621712010-04-24 17:59:49 +00008257$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Matthias Kloseb9621712010-04-24 17:59:49 +00008259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8260$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008261 if test $enable_shared = "yes"
8262 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008263 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 +00008264 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008265else
Matthias Kloseb9621712010-04-24 17:59:49 +00008266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008268fi
8269
Matthias Kloseb9621712010-04-24 17:59:49 +00008270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8271$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008272case $ac_sys_system/$ac_sys_release in
8273 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8278$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008279 ;;
8280 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008283 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008284esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008285
Guido van Rossum0a516c91994-09-12 10:58:40 +00008286# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008287
Michael W. Hudson54241132001-12-07 15:38:26 +00008288
8289
8290
8291
Benjamin Peterson99f03762010-04-11 22:15:28 +00008292
Thomas Wouters477c8d52006-05-27 19:21:47 +00008293
Georg Brandlb1441c72009-01-03 22:33:39 +00008294
Thomas Wouters477c8d52006-05-27 19:21:47 +00008295cat >>confdefs.h <<_ACEOF
8296#define SHLIB_EXT "$SO"
8297_ACEOF
8298
Guido van Rossum0a516c91994-09-12 10:58:40 +00008299# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008300# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008301# (Shared libraries in this instance are shared modules to be loaded into
8302# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8304$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008305if test -z "$LDSHARED"
8306then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008307 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008308 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008309 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008310 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008311 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008312 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008313 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008315 if test "$GCC" = "yes" ; then
8316 LDSHARED='$(CC) -shared'
8317 LDCXXSHARED='$(CXX) -shared'
8318 else
8319 LDSHARED='$(CC) -G'
8320 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008321 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008322 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008323 if test "$GCC" = "yes" ; then
8324 LDSHARED='$(CC) -shared'
8325 LDCXXSHARED='$(CXX) -shared'
8326 else
8327 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008328 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008329 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008330 LDSHARED='$(CC) -bundle'
8331 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008332 if test "$enable_framework" ; then
8333 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008334 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8335 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008336 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008337 else
8338 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008339 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008340 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008341 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008342 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008343 LDSHARED='$(CC) -bundle'
8344 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008345 if test "$enable_framework" ; then
8346 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008347 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8348 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008349 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008350 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008351 # No framework, use the Python app as bundle-loader
8352 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008353 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008354 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008355 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008356 Darwin/*)
8357 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8358 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008359
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008360 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008361 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008362 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008363 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008364 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008365 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8366 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008367 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008368 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008369 LDSHARED='$(CC) -bundle'
8370 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008371 if test "$enable_framework" ; then
8372 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008373 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8374 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008375 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008376 else
8377 # No framework, use the Python app as bundle-loader
8378 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8379 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008380 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008381 fi
8382 fi
8383 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008384 Linux*|GNU*|QNX*)
8385 LDSHARED='$(CC) -shared'
8386 LDCXXSHARED='$(CXX) -shared';;
8387 BSD/OS*/4*)
8388 LDSHARED="gcc -shared"
8389 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008390 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008391 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008392 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008393 LDSHARED='$(CC) -shared'
8394 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008395 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008396 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008397 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008398 OpenBSD*)
8399 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8400 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008401 LDSHARED='$(CC) -shared $(CCSHARED)'
8402 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008403 else
8404 case `uname -r` in
8405 [01].* | 2.[0-7] | 2.[0-7].*)
8406 LDSHARED="ld -Bshareable ${LDFLAGS}"
8407 ;;
8408 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008409 LDSHARED='$(CC) -shared $(CCSHARED)'
8410 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008411 ;;
8412 esac
8413 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008414 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008415 LDSHARED='$(CC) -shared'
8416 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008417 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008418 if test "$GCC" = "yes" ; then
8419 LDSHARED='$(CC) -shared'
8420 LDCXXSHARED='$(CXX) -shared'
8421 else
8422 LDSHARED='$(CC) -G'
8423 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008424 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008425 SCO_SV*)
8426 LDSHARED='$(CC) -Wl,-G,-Bexport'
8427 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8428 CYGWIN*)
8429 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8430 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008431 *) LDSHARED="ld";;
8432 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8435$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008436LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008437BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008438# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008439# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8441$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008442if test -z "$CCSHARED"
8443then
Guido van Rossum07397971997-04-29 21:49:50 +00008444 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008445 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008446 then CCSHARED="-fPIC";
8447 elif test `uname -p` = sparc;
8448 then CCSHARED="-xcode=pic32";
8449 else CCSHARED="-Kpic";
8450 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008451 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008452 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008453 else CCSHARED="+z";
8454 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008455 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008456 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008457 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008458 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008459 if test "$GCC" = "yes"
8460 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008461 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008462 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008463 SCO_SV*)
8464 if test "$GCC" = "yes"
8465 then CCSHARED="-fPIC"
8466 else CCSHARED="-Kpic -belf"
8467 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008468 IRIX*/6*) case $CC in
8469 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008470 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008471 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008472 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8475$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008476# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008477# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8479$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008480if test -z "$LINKFORSHARED"
8481then
Guido van Rossum07397971997-04-29 21:49:50 +00008482 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008483 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008484 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008485 LINKFORSHARED="-Wl,-E -Wl,+s";;
8486# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008487 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008488 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008489 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008490 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008491 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008492 if test "$enable_framework"
8493 then
Jack Jansenda49e192005-01-07 13:08:22 +00008494 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008495 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008496 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008497 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008498 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008499 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008500 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008501 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8502 then
8503 LINKFORSHARED="-Wl,--export-dynamic"
8504 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008505 SunOS/5*) case $CC in
8506 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008507 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008508 then
8509 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008510 fi;;
8511 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008512 CYGWIN*)
8513 if test $enable_shared = "no"
8514 then
8515 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8516 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008517 QNX*)
8518 # -Wl,-E causes the symbols to be added to the dynamic
8519 # symbol table so that they can be found when a module
8520 # is loaded. -N 2048K causes the stack size to be set
8521 # to 2048 kilobytes so that the stack doesn't overflow
8522 # when running test_compile.py.
8523 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008524 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8527$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008528
Michael W. Hudson54241132001-12-07 15:38:26 +00008529
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008530
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8532$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008533if test ! "$LIBRARY" = "$LDLIBRARY"
8534then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008535 case $ac_sys_system in
8536 CYGWIN*)
8537 # Cygwin needs CCSHARED when building extension DLLs
8538 # but not when building the interpreter DLL.
8539 CFLAGSFORSHARED='';;
8540 *)
8541 CFLAGSFORSHARED='$(CCSHARED)'
8542 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8545$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008546
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008547# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8548# library (with --enable-shared).
8549# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008550# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8551# if it is not required, since it creates a dependency of the shared library
8552# to LIBS. This, in turn, means that applications linking the shared libpython
8553# don't need to link LIBS explicitly. The default should be only changed
8554# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008555
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8557$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008558case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008559 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008560 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008561esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8563$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008564
8565
Guido van Rossum627b2d71993-12-24 10:39:16 +00008566# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8568$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008569if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008570 $as_echo_n "(cached) " >&6
8571else
8572 ac_check_lib_save_LIBS=$LIBS
8573LIBS="-lsendfile $LIBS"
8574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8575/* end confdefs.h. */
8576
8577/* Override any GCC internal prototype to avoid an error.
8578 Use char because int might match the return type of a GCC
8579 builtin and then its argument prototype would still apply. */
8580#ifdef __cplusplus
8581extern "C"
8582#endif
8583char sendfile ();
8584int
8585main ()
8586{
8587return sendfile ();
8588 ;
8589 return 0;
8590}
8591_ACEOF
8592if ac_fn_c_try_link "$LINENO"; then :
8593 ac_cv_lib_sendfile_sendfile=yes
8594else
8595 ac_cv_lib_sendfile_sendfile=no
8596fi
8597rm -f core conftest.err conftest.$ac_objext \
8598 conftest$ac_exeext conftest.$ac_ext
8599LIBS=$ac_check_lib_save_LIBS
8600fi
8601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8602$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008603if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008604 cat >>confdefs.h <<_ACEOF
8605#define HAVE_LIBSENDFILE 1
8606_ACEOF
8607
8608 LIBS="-lsendfile $LIBS"
8609
8610fi
8611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8613$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008616else
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008618LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622/* Override any GCC internal prototype to avoid an error.
8623 Use char because int might match the return type of a GCC
8624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625#ifdef __cplusplus
8626extern "C"
8627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008628char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008629int
8630main ()
8631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 ;
8634 return 0;
8635}
8636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008637if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008639else
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642rm -f core conftest.err conftest.$ac_objext \
8643 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008644LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8647$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 cat >>confdefs.h <<_ACEOF
8650#define HAVE_LIBDL 1
8651_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008652
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008653 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008654
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008655fi
8656 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8658$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008659if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008661else
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008663LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667/* Override any GCC internal prototype to avoid an error.
8668 Use char because int might match the return type of a GCC
8669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008670#ifdef __cplusplus
8671extern "C"
8672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008673char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008674int
8675main ()
8676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 ;
8679 return 0;
8680}
8681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687rm -f core conftest.err conftest.$ac_objext \
8688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008689LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8692$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008693if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 cat >>confdefs.h <<_ACEOF
8695#define HAVE_LIBDLD 1
8696_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008697
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008698 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008699
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008700fi
8701 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008702
Georg Brandlb1441c72009-01-03 22:33:39 +00008703# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008704if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8706$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008707if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008709else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008710 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714/* Override any GCC internal prototype to avoid an error.
8715 Use char because int might match the return type of a GCC
8716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717#ifdef __cplusplus
8718extern "C"
8719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008720char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721int
8722main ()
8723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ;
8726 return 0;
8727}
8728_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729for ac_lib in '' pthread rt posix4; do
8730 if test -z "$ac_lib"; then
8731 ac_res="none required"
8732 else
8733 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008734 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008739rm -f core conftest.err conftest.$ac_objext \
8740 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008741 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744done
Victor Stinnere0be4232011-10-25 13:06:09 +02008745if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008747else
8748 ac_cv_search_sem_init=no
8749fi
8750rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008751LIBS=$ac_func_search_save_LIBS
8752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8754$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008756if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008758
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008759fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008760 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008761 # posix4 on Solaris 2.6
8762 # pthread (first!) on Linux
8763fi
8764
Martin v. Löwis19d17342003-06-14 21:03:05 +00008765# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8767$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008768if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008770else
8771 ac_check_lib_save_LIBS=$LIBS
8772LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008774/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776/* Override any GCC internal prototype to avoid an error.
8777 Use char because int might match the return type of a GCC
8778 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008779#ifdef __cplusplus
8780extern "C"
8781#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008782char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008783int
8784main ()
8785{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008787 ;
8788 return 0;
8789}
8790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008792 ac_cv_lib_intl_textdomain=yes
8793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008795fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008796rm -f core conftest.err conftest.$ac_objext \
8797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008798LIBS=$ac_check_lib_save_LIBS
8799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8801$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008802if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008805
Brett Cannonc6d936e2009-06-07 20:09:53 +00008806 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008807fi
8808
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008809
8810# checks for system dependent C++ extensions support
8811case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8813$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008815/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008816
Georg Brandl59e87bd2011-02-15 19:48:59 +00008817 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008821loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ;
8823 return 0;
8824}
Matthias Kloseb159a552010-04-25 21:00:44 +00008825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008827if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008828
Matthias Kloseb159a552010-04-25 21:00:44 +00008829
Matthias Kloseb9621712010-04-24 17:59:49 +00008830$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
Matthias Kloseb159a552010-04-25 21:00:44 +00008832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008833$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008834
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008835else
Matthias Kloseb159a552010-04-25 21:00:44 +00008836
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008838$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008839
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841rm -f core conftest.err conftest.$ac_objext \
8842 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008843 *) ;;
8844esac
8845
Guido van Rossum70c7f481998-03-26 18:44:10 +00008846# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8848$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008849if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008851else
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008853LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008855/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857/* Override any GCC internal prototype to avoid an error.
8858 Use char because int might match the return type of a GCC
8859 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008860#ifdef __cplusplus
8861extern "C"
8862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008863char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008864int
8865main ()
8866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 ;
8869 return 0;
8870}
8871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008874else
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877rm -f core conftest.err conftest.$ac_objext \
8878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008879LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8882$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008883if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008884 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008885fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008886 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8888$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008889if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008891else
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008893LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008897/* Override any GCC internal prototype to avoid an error.
8898 Use char because int might match the return type of a GCC
8899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008900#ifdef __cplusplus
8901extern "C"
8902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008903char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008904int
8905main ()
8906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ;
8909 return 0;
8910}
8911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917rm -f core conftest.err conftest.$ac_objext \
8918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008919LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8922$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008923if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008924 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008925fi
8926 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8929$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008932if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8935$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008936LIBS="$withval $LIBS"
8937
8938else
Matthias Kloseb9621712010-04-24 17:59:49 +00008939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8940$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941fi
8942
Guido van Rossum7f43da71994-08-01 12:15:30 +00008943
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008944if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008945 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8946set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8948$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008949if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008951else
8952 case $PKG_CONFIG in
8953 [\\/]* | ?:[\\/]*)
8954 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8955 ;;
8956 *)
8957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8958for as_dir in $PATH
8959do
8960 IFS=$as_save_IFS
8961 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02008963 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 +00008964 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008966 break 2
8967 fi
8968done
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008970IFS=$as_save_IFS
8971
8972 ;;
8973esac
8974fi
8975PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8976if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8978$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008979else
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8981$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008982fi
8983
8984
8985fi
8986if test -z "$ac_cv_path_PKG_CONFIG"; then
8987 ac_pt_PKG_CONFIG=$PKG_CONFIG
8988 # Extract the first word of "pkg-config", so it can be a program name with args.
8989set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8991$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008992if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008994else
8995 case $ac_pt_PKG_CONFIG in
8996 [\\/]* | ?:[\\/]*)
8997 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8998 ;;
8999 *)
9000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9001for as_dir in $PATH
9002do
9003 IFS=$as_save_IFS
9004 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009005 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +02009006 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 +00009007 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009009 break 2
9010 fi
9011done
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009013IFS=$as_save_IFS
9014
9015 ;;
9016esac
9017fi
9018ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9019if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9021$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009022else
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9024$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009025fi
9026
9027 if test "x$ac_pt_PKG_CONFIG" = x; then
9028 PKG_CONFIG=""
9029 else
9030 case $cross_compiling:$ac_tool_warned in
9031yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009034ac_tool_warned=yes ;;
9035esac
9036 PKG_CONFIG=$ac_pt_PKG_CONFIG
9037 fi
9038else
9039 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9040fi
9041
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009042
9043# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9045$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009046
9047# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009048if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009049 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009050else
9051 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009052fi
9053
9054
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9056$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009057
9058# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9060$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009061
9062# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009063if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009064 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009065else
9066 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009067fi
9068
9069
9070if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009071 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9072else
9073 LIBFFI_INCLUDEDIR=""
9074fi
9075
9076
Matthias Kloseb9621712010-04-24 17:59:49 +00009077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9078$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009079
Stefan Krah60187b52012-03-23 19:06:27 +01009080# Check for use of the system libmpdec library
9081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9082$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9083
9084# Check whether --with-system_libmpdec was given.
9085if test "${with_system_libmpdec+set}" = set; then :
9086 withval=$with_system_libmpdec;
9087else
9088 with_system_libmpdec="no"
9089fi
9090
9091
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9093$as_echo "$with_system_libmpdec" >&6; }
9094
Benjamin Peterson076ed002010-10-31 17:11:02 +00009095# Check for support for loadable sqlite extensions
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9097$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9098# Check whether --enable-loadable-sqlite-extensions was given.
9099if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9100 enableval=$enable_loadable_sqlite_extensions;
9101else
9102 enable_loadable_sqlite_extensions="no"
9103fi
9104
9105
9106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9107$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9108
Matthias Klose55708cc2009-04-30 08:06:49 +00009109# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9111$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009112
9113# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009114if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009115 withval=$with_dbmliborder;
9116if test x$with_dbmliborder = xyes
9117then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009118as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009119else
9120 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9121 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9122 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009123 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009124 fi
9125 done
9126fi
9127fi
9128
Matthias Kloseb9621712010-04-24 17:59:49 +00009129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9130$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009131
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009132# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009133
9134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9136$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009139if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140 withval=$with_signal_module;
9141fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009142
9143
9144if test -z "$with_signal_module"
9145then with_signal_module="yes"
9146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9148$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009149
9150if test "${with_signal_module}" = "yes"; then
9151 USE_SIGNAL_MODULE=""
9152 SIGNAL_OBJS=""
9153else
9154 USE_SIGNAL_MODULE="#"
9155 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9156fi
9157
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009158# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009159
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009160USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162
Martin v. Löwis11437992002-04-12 09:54:03 +00009163
9164# Templates for things AC_DEFINEd more than once.
9165# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009166
9167
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
Matthias Kloseb9621712010-04-24 17:59:49 +00009169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9170$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009172# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009173if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174 withval=$with_threads;
9175fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009176
9177
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009178# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009179
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009181if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009182 withval=$with_thread; with_threads=$with_thread
9183fi
9184
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009185
9186if test -z "$with_threads"
9187then with_threads="yes"
9188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9190$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009191
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009192
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009193if test "$with_threads" = "no"
9194then
9195 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009196elif test "$ac_cv_pthread_is_default" = yes
9197then
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009199
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009200 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009202
9203 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009205elif test "$ac_cv_kpthread" = "yes"
9206then
9207 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009208 if test "$ac_cv_cxx_thread" = "yes"; then
9209 CXX="$CXX -Kpthread"
9210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009212
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009213 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009214 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009215elif test "$ac_cv_kthread" = "yes"
9216then
9217 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009218 if test "$ac_cv_cxx_thread" = "yes"; then
9219 CXX="$CXX -Kthread"
9220 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009222
9223 posix_threads=yes
9224 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009225elif test "$ac_cv_pthread" = "yes"
9226then
9227 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009228 if test "$ac_cv_cxx_thread" = "yes"; then
9229 CXX="$CXX -pthread"
9230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009232
9233 posix_threads=yes
9234 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009235else
9236 if test ! -z "$with_threads" -a -d "$with_threads"
9237 then LDFLAGS="$LDFLAGS -L$with_threads"
9238 fi
9239 if test ! -z "$withval" -a -d "$withval"
9240 then LDFLAGS="$LDFLAGS -L$withval"
9241 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009242
9243 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009244 # define _POSIX_THREADS in unistd.h. Some apparently don't
9245 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9247$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009250
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009251#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009252#ifdef _POSIX_THREADS
9253yes
9254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009255
9256_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009257if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009259 unistd_defines_pthreads=yes
9260else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009261 unistd_defines_pthreads=no
9262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009263rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9266$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009267
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009269
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009270 # Just looking for pthread_create in libpthread is not enough:
9271 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9272 # So we really have to include pthread.h, and then link.
9273 _libs=$LIBS
9274 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9276$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009278/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009279#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009280
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009281void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009282int
9283main ()
9284{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009285
9286pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 ;
9288 return 0;
9289}
9290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009291if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9294$as_echo "yes" >&6; }
9295 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009296
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009297 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009298 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009299else
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009301 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009303if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009305
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009306 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009307 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009308else
Guido van Rossumad678af1998-10-02 14:42:15 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9311$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009312if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009314else
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009316LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009319
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320/* Override any GCC internal prototype to avoid an error.
9321 Use char because int might match the return type of a GCC
9322 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009323#ifdef __cplusplus
9324extern "C"
9325#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009326char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009327int
9328main ()
9329{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009330return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 ;
9332 return 0;
9333}
9334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009337else
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009340rm -f core conftest.err conftest.$ac_objext \
9341 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009342LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9345$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009346if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009348
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009349 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009350 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009351 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009352else
Greg Steinadf63d62000-07-05 10:38:09 +00009353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9355$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009356if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009358else
Martin v. Löwis11437992002-04-12 09:54:03 +00009359 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009360LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364/* Override any GCC internal prototype to avoid an error.
9365 Use char because int might match the return type of a GCC
9366 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367#ifdef __cplusplus
9368extern "C"
9369#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009370char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009371int
9372main ()
9373{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009374return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ;
9376 return 0;
9377}
9378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009379if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009381else
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009384rm -f core conftest.err conftest.$ac_objext \
9385 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009386LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9389$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009390if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009393 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009394 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009395 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009396else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009397
Matthias Kloseb9621712010-04-24 17:59:49 +00009398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9399$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009400if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009402else
Martin v. Löwis11437992002-04-12 09:54:03 +00009403 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009404LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408/* Override any GCC internal prototype to avoid an error.
9409 Use char because int might match the return type of a GCC
9410 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009411#ifdef __cplusplus
9412extern "C"
9413#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009414char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009415int
9416main ()
9417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 ;
9420 return 0;
9421}
9422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009423if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009425else
Matthias Kloseb9621712010-04-24 17:59:49 +00009426 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009428rm -f core conftest.err conftest.$ac_objext \
9429 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009430LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9433$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009434if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009437 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009438 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009439 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009440else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009441
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9443$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009444if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009446else
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009448LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452/* Override any GCC internal prototype to avoid an error.
9453 Use char because int might match the return type of a GCC
9454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009455#ifdef __cplusplus
9456extern "C"
9457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009458char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009459int
9460main ()
9461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 ;
9464 return 0;
9465}
9466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009467if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009469else
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009471fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009472rm -f core conftest.err conftest.$ac_objext \
9473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009474LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9477$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009478if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009480
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009481 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009482 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009483 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009484else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009485
Martin v. Löwis130fb172001-07-19 11:00:41 +00009486 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009487fi
9488
Guido van Rossum627b2d71993-12-24 10:39:16 +00009489
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009490fi
9491
Guido van Rossum0be3e491997-05-22 20:33:33 +00009492fi
9493
Guido van Rossum49545951997-12-02 19:28:29 +00009494fi
9495
Guido van Rossumb93a8621998-05-07 13:27:32 +00009496fi
9497
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009499rm -f core conftest.err conftest.$ac_objext \
9500 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009501
Matthias Kloseb9621712010-04-24 17:59:49 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9503$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009504if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009505 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009506else
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009508LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512/* Override any GCC internal prototype to avoid an error.
9513 Use char because int might match the return type of a GCC
9514 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009515#ifdef __cplusplus
9516extern "C"
9517#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009518char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009519int
9520main ()
9521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 ;
9524 return 0;
9525}
9526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009529else
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532rm -f core conftest.err conftest.$ac_objext \
9533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009534LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9537$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009538if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009540
Martin v. Löwis130fb172001-07-19 11:00:41 +00009541 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009542 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009543 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009544fi
9545
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009546
Neal Norwitza978ab02002-11-02 16:58:05 +00009547 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9549$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009550if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009551 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009552else
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009554LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558/* Override any GCC internal prototype to avoid an error.
9559 Use char because int might match the return type of a GCC
9560 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009561#ifdef __cplusplus
9562extern "C"
9563#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009564char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009565int
9566main ()
9567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ;
9570 return 0;
9571}
9572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009575else
Matthias Kloseb9621712010-04-24 17:59:49 +00009576 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009578rm -f core conftest.err conftest.$ac_objext \
9579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009580LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9583$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009584if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009586
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009587 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009588 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009589 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009590fi
9591
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009592 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009593fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009594
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009595if test "$posix_threads" = "yes"; then
9596 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009599
9600 fi
9601
9602 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9603 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009604 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009605$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009606
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009607 ;;
9608 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009610
9611 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009612 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009613$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009614
9615 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009616 esac
9617
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9619$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009620 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009622else
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624 ac_cv_pthread_system_supported=no
9625else
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009627/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009628#include <pthread.h>
9629 void *foo(void *parm) {
9630 return NULL;
9631 }
9632 main() {
9633 pthread_attr_t attr;
9634 pthread_t id;
9635 if (pthread_attr_init(&attr)) exit(-1);
9636 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9637 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9638 exit(0);
9639 }
9640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009641if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642 ac_cv_pthread_system_supported=yes
9643else
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009645fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009648fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650
Guido van Rossum627b2d71993-12-24 10:39:16 +00009651fi
9652
Matthias Kloseb9621712010-04-24 17:59:49 +00009653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9654$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009655 if test "$ac_cv_pthread_system_supported" = "yes"; then
9656
Matthias Kloseb9621712010-04-24 17:59:49 +00009657$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009658
9659 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 for ac_func in pthread_sigmask
9661do :
9662 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009663if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009664 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009665#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009666_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009667 case $ac_sys_system in
9668 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009671
9672 ;;
9673 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009674fi
9675done
9676
9677fi
9678
9679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009680# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009681
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9683$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009684# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009685if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009687 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009690 ipv6=no
9691 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009692 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9693$as_echo "yes" >&6; }
9694 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009695
9696 ipv6=yes
9697 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009699else
Martin v. Löwis11437992002-04-12 09:54:03 +00009700
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009702
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9704$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009705 ipv6=no
9706
9707else
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009709/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009710 /* AF_INET6 available check */
9711#include <sys/types.h>
9712#include <sys/socket.h>
9713main()
9714{
9715 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9716 exit(1);
9717 else
9718 exit(0);
9719}
9720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009722if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009723
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9725$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009726 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009728else
Matthias Kloseb159a552010-04-25 21:00:44 +00009729
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009732 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009737fi
9738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009740if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9742$as_echo_n "checking if RFC2553 API is available... " >&6; }
9743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009744/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009745
9746 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009747#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009748int
9749main ()
9750{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009751struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009752 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ;
9754 return 0;
9755}
Matthias Kloseb159a552010-04-25 21:00:44 +00009756
Martin v. Löwis11437992002-04-12 09:54:03 +00009757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009758if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009759
9760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009761$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009762 ipv6=yes
9763
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009764else
Matthias Kloseb159a552010-04-25 21:00:44 +00009765
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009767$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009768 ipv6=no
9769
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009772fi
9773
9774if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009776
9777fi
9778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779fi
9780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781
9782ipv6type=unknown
9783ipv6lib=none
9784ipv6trylibc=no
9785
9786if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9788$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009789 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9790 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009791 case $i in
9792 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009794/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009795
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009796#include <netinet/in.h>
9797#ifdef IPV6_INRIA_VERSION
9798yes
9799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009800_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009803 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009804fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009805rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009806
9807 ;;
9808 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009810/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009812#include <netinet/in.h>
9813#ifdef __KAME__
9814yes
9815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009816_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819 ipv6type=$i;
9820 ipv6lib=inet6
9821 ipv6libdir=/usr/local/v6/lib
9822 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009824rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009825
9826 ;;
9827 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009831#include <features.h>
9832#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9833yes
9834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009835_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009837 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838 ipv6type=$i;
9839 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009841rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009842
9843 ;;
9844 linux-inet6)
9845 if test -d /usr/inet6; then
9846 ipv6type=$i
9847 ipv6lib=inet6
9848 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009849 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009850 fi
9851 ;;
9852 solaris)
9853 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009854 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009855 ipv6type=$i
9856 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009857 fi
9858 fi
9859 ;;
9860 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009862/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009864#include <sys/param.h>
9865#ifdef _TOSHIBA_INET6
9866yes
9867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009871 ipv6type=$i;
9872 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009873 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009875rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876
9877 ;;
9878 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882#include </usr/local/v6/include/sys/v6config.h>
9883#ifdef __V6D__
9884yes
9885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889 ipv6type=$i;
9890 ipv6lib=v6;
9891 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009892 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009894rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895
9896 ;;
9897 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901#include <sys/param.h>
9902#ifdef _ZETA_MINAMI_INET6
9903yes
9904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009908 ipv6type=$i;
9909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009913
9914 ;;
9915 esac
9916 if test "$ipv6type" != "unknown"; then
9917 break
9918 fi
9919 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9921$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009922fi
9923
9924if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9925 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9926 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9927 echo "using lib$ipv6lib"
9928 else
9929 if test $ipv6trylibc = "yes"; then
9930 echo "using libc"
9931 else
9932 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9933 echo "You need to fetch lib$ipv6lib.a from appropriate"
9934 echo 'ipv6 kit and compile beforehand.'
9935 exit 1
9936 fi
9937 fi
9938fi
9939
Matthias Kloseb9621712010-04-24 17:59:49 +00009940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9941$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009943/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009944
9945 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009946int
9947main ()
9948{
9949FSIORefNum fRef = 0
9950 ;
9951 return 0;
9952}
Matthias Kloseb159a552010-04-25 21:00:44 +00009953
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009955if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009956
Matthias Kloseb159a552010-04-25 21:00:44 +00009957
Matthias Kloseb9621712010-04-24 17:59:49 +00009958$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9961$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009962
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009963else
Matthias Kloseb159a552010-04-25 21:00:44 +00009964
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009967
9968fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9970
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009971# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9973$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009976if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 withval=$with_doc_strings;
9978fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009979
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009980
9981if test -z "$with_doc_strings"
9982then with_doc_strings="yes"
9983fi
9984if test "$with_doc_strings" != "no"
9985then
9986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009988
9989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9991$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009992
Antoine Pitrou042b1282010-08-13 21:15:58 +00009993# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9995$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009997# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009998if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009999 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010000if test "$withval" != no
10001then
10002
Matthias Kloseb9621712010-04-24 17:59:49 +000010003$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010004
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10006$as_echo "yes" >&6; }
10007else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010009fi
10010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013fi
10014
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010015
10016# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10018$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010021if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022 withval=$with_pymalloc;
10023fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010024
Neil Schemenauera35c6882001-02-27 04:45:05 +000010025
Neil Schemenauer16c22972002-03-22 15:34:49 +000010026if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010027then
10028 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010029fi
10030if test "$with_pymalloc" != "no"
10031then
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010034
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010035 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10038$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010039
Benjamin Peterson05159c42009-12-03 03:01:27 +000010040# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10042$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010043
10044# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010045if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010046 withval=$with_valgrind;
10047else
10048 with_valgrind=no
10049fi
10050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10052$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010053if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 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 +020010055if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010058
10059else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010060 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010061
10062fi
10063
10064
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010065 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010066fi
10067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010068# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010069
Guido van Rossum98935bf2001-09-05 19:13:16 +000010070DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010071
Guido van Rossume97ee181999-12-20 21:27:22 +000010072# the dlopen() function means we might want to use dynload_shlib.o. some
10073# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010074for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010075do :
10076 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010077if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010079#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010080_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010081
Guido van Rossume97ee181999-12-20 21:27:22 +000010082fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010083done
Guido van Rossume97ee181999-12-20 21:27:22 +000010084
Michael W. Hudson54241132001-12-07 15:38:26 +000010085
Guido van Rossume97ee181999-12-20 21:27:22 +000010086# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10087# loading of modules.
10088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10090$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010091if test -z "$DYNLOADFILE"
10092then
10093 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010094 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10095 if test "$ac_cv_func_dlopen" = yes
10096 then DYNLOADFILE="dynload_shlib.o"
10097 else DYNLOADFILE="dynload_aix.o"
10098 fi
10099 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010100 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010101 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10102 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010103 *)
10104 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10105 # out any dynamic loading
10106 if test "$ac_cv_func_dlopen" = yes
10107 then DYNLOADFILE="dynload_shlib.o"
10108 else DYNLOADFILE="dynload_stub.o"
10109 fi
10110 ;;
10111 esac
10112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10114$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010115if test "$DYNLOADFILE" != "dynload_stub.o"
10116then
Martin v. Löwis11437992002-04-12 09:54:03 +000010117
Matthias Kloseb9621712010-04-24 17:59:49 +000010118$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010119
10120fi
10121
Neil Schemenauer4e425612001-06-19 15:44:15 +000010122# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10123
Michael W. Hudson54241132001-12-07 15:38:26 +000010124
Matthias Kloseb9621712010-04-24 17:59:49 +000010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10126$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010127if test -z "$MACHDEP_OBJS"
10128then
Jack Jansene578a632001-08-15 01:27:14 +000010129 MACHDEP_OBJS=$extra_machdep_objs
10130else
10131 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010132fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010133if test -z "$MACHDEP_OBJS"; then
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10135$as_echo "none" >&6; }
10136else
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10138$as_echo "$MACHDEP_OBJS" >&6; }
10139fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010140
Guido van Rossum627b2d71993-12-24 10:39:16 +000010141# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010142for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010143 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010144 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010145 futimens futimes gai_strerror \
10146 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010147 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010148 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010149 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10150 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010151 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010152 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010153 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010154 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010155 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010156 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010157 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10158 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010159 sigaction sigaltstack siginterrupt sigpending sigrelse \
10160 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010161 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010162 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10163 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010164do :
10165 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10166ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010167if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010169#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010170_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010171
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010172fi
10173done
10174
Michael W. Hudson54241132001-12-07 15:38:26 +000010175
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010176ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10177 #include <dirent.h>
10178"
10179if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10180
10181$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10182
10183fi
10184
10185
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010186# For some functions, having a definition is not sufficient, since
10187# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10189$as_echo_n "checking for chroot... " >&6; }
10190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010191/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010192#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010193int
10194main ()
10195{
10196void *x=chroot
10197 ;
10198 return 0;
10199}
10200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010202
Matthias Kloseb9621712010-04-24 17:59:49 +000010203$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010204
Matthias Kloseb159a552010-04-25 21:00:44 +000010205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010206$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010207else
Matthias Kloseb9621712010-04-24 17:59:49 +000010208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010210
10211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10214$as_echo_n "checking for link... " >&6; }
10215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010216/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010217#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010218int
10219main ()
10220{
10221void *x=link
10222 ;
10223 return 0;
10224}
10225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010226if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010227
Matthias Kloseb9621712010-04-24 17:59:49 +000010228$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010229
Matthias Kloseb159a552010-04-25 21:00:44 +000010230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010231$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010232else
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010235
10236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10239$as_echo_n "checking for symlink... " >&6; }
10240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010241/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010242#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010243int
10244main ()
10245{
10246void *x=symlink
10247 ;
10248 return 0;
10249}
10250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010252
Matthias Kloseb9621712010-04-24 17:59:49 +000010253$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010254
Matthias Kloseb159a552010-04-25 21:00:44 +000010255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010256$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010257else
Matthias Kloseb9621712010-04-24 17:59:49 +000010258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10259$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010260
10261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10264$as_echo_n "checking for fchdir... " >&6; }
10265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010266/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010267#include <unistd.h>
10268int
10269main ()
10270{
10271void *x=fchdir
10272 ;
10273 return 0;
10274}
10275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010279
Matthias Kloseb159a552010-04-25 21:00:44 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010281$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010282else
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010285
10286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10289$as_echo_n "checking for fsync... " >&6; }
10290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010292#include <unistd.h>
10293int
10294main ()
10295{
10296void *x=fsync
10297 ;
10298 return 0;
10299}
10300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010302
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010304
Matthias Kloseb159a552010-04-25 21:00:44 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010306$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010307else
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10309$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010310
10311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10314$as_echo_n "checking for fdatasync... " >&6; }
10315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010316/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010317#include <unistd.h>
10318int
10319main ()
10320{
10321void *x=fdatasync
10322 ;
10323 return 0;
10324}
10325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010326if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010329
Matthias Kloseb159a552010-04-25 21:00:44 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010331$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010332else
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010335
10336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10339$as_echo_n "checking for epoll... " >&6; }
10340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010341/* end confdefs.h. */
10342#include <sys/epoll.h>
10343int
10344main ()
10345{
10346void *x=epoll_create
10347 ;
10348 return 0;
10349}
10350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010352
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010354
Matthias Kloseb159a552010-04-25 21:00:44 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010356$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010357else
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010360
10361fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10364$as_echo_n "checking for epoll_create1... " >&6; }
10365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10366/* end confdefs.h. */
10367#include <sys/epoll.h>
10368int
10369main ()
10370{
10371void *x=epoll_create1
10372 ;
10373 return 0;
10374}
10375_ACEOF
10376if ac_fn_c_try_compile "$LINENO"; then :
10377
10378$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10379
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10381$as_echo "yes" >&6; }
10382else
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10384$as_echo "no" >&6; }
10385
10386fi
10387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10389$as_echo_n "checking for kqueue... " >&6; }
10390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010391/* end confdefs.h. */
10392
10393#include <sys/types.h>
10394#include <sys/event.h>
10395
10396int
10397main ()
10398{
10399int x=kqueue()
10400 ;
10401 return 0;
10402}
10403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010404if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010407
Matthias Kloseb159a552010-04-25 21:00:44 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010409$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010410else
Matthias Kloseb9621712010-04-24 17:59:49 +000010411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10412$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010413
10414fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010416# On some systems (eg. FreeBSD 5), we would find a definition of the
10417# functions ctermid_r, setgroups in the library, but no prototype
10418# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10419# address to avoid compiler warnings and potential miscompilations
10420# because of the missing prototypes.
10421
Matthias Kloseb9621712010-04-24 17:59:49 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10423$as_echo_n "checking for ctermid_r... " >&6; }
10424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010426
Martin v. Löwisd5843682002-11-21 20:41:28 +000010427#include <stdio.h>
10428
Martin v. Löwisd5843682002-11-21 20:41:28 +000010429int
10430main ()
10431{
10432void* p = ctermid_r
10433 ;
10434 return 0;
10435}
10436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010440
Matthias Kloseb159a552010-04-25 21:00:44 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010442$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010446
10447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10449
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10451$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010452if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010453 $as_echo_n "(cached) " >&6
10454else
10455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010457#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010458int
10459main ()
10460{
10461void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010462
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010463 ;
10464 return 0;
10465}
10466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010468 ac_cv_flock_decl=yes
10469else
10470 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010471
10472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010474
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010475fi
10476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10477$as_echo "$ac_cv_flock_decl" >&6; }
10478if test "x${ac_cv_flock_decl}" = xyes; then
10479 for ac_func in flock
10480do :
10481 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010482if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010483 cat >>confdefs.h <<_ACEOF
10484#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010485_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010486
Antoine Pitroua3000072010-09-07 14:52:42 +000010487else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010489$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010490if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010491 $as_echo_n "(cached) " >&6
10492else
10493 ac_check_lib_save_LIBS=$LIBS
10494LIBS="-lbsd $LIBS"
10495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496/* end confdefs.h. */
10497
10498/* Override any GCC internal prototype to avoid an error.
10499 Use char because int might match the return type of a GCC
10500 builtin and then its argument prototype would still apply. */
10501#ifdef __cplusplus
10502extern "C"
10503#endif
10504char flock ();
10505int
10506main ()
10507{
10508return flock ();
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513if ac_fn_c_try_link "$LINENO"; then :
10514 ac_cv_lib_bsd_flock=yes
10515else
10516 ac_cv_lib_bsd_flock=no
10517fi
10518rm -f core conftest.err conftest.$ac_objext \
10519 conftest$ac_exeext conftest.$ac_ext
10520LIBS=$ac_check_lib_save_LIBS
10521fi
10522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10523$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010524if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010525 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010526
10527
10528$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10529
10530
10531fi
10532
10533
10534fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010535done
10536
Antoine Pitroua3000072010-09-07 14:52:42 +000010537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538
Matthias Kloseb9621712010-04-24 17:59:49 +000010539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10540$as_echo_n "checking for getpagesize... " >&6; }
10541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010542/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010543
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010544#include <unistd.h>
10545
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010546int
10547main ()
10548{
10549void* p = getpagesize
10550 ;
10551 return 0;
10552}
10553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010557
Matthias Kloseb159a552010-04-25 21:00:44 +000010558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010559$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010560else
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010563
10564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010566
Victor Stinner984890f2011-11-24 13:53:38 +010010567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10568$as_echo_n "checking for broken unsetenv... " >&6; }
10569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10570/* end confdefs.h. */
10571
10572#include <stdlib.h>
10573
10574int
10575main ()
10576{
10577int res = unsetenv("DUMMY")
10578 ;
10579 return 0;
10580}
10581_ACEOF
10582if ac_fn_c_try_compile "$LINENO"; then :
10583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
10585else
10586
10587$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10588
10589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10590$as_echo "yes" >&6; }
10591
10592fi
10593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10594
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010595for ac_prog in true
10596do
10597 # Extract the first word of "$ac_prog", so it can be a program name with args.
10598set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10600$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010601if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010603else
10604 if test -n "$TRUE"; then
10605 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10606else
10607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608for as_dir in $PATH
10609do
10610 IFS=$as_save_IFS
10611 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 for ac_exec_ext in '' $ac_executable_extensions; do
doko@ubuntu.com51f65942012-06-30 14:42:46 +020010613 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 +000010614 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 $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 +000010616 break 2
10617 fi
10618done
Matthias Kloseb9621712010-04-24 17:59:49 +000010619 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621
10622fi
10623fi
10624TRUE=$ac_cv_prog_TRUE
10625if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10627$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628else
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631fi
10632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634 test -n "$TRUE" && break
10635done
10636test -n "$TRUE" || TRUE="/bin/true"
10637
10638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10640$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010641if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010643else
10644 ac_check_lib_save_LIBS=$LIBS
10645LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010649/* Override any GCC internal prototype to avoid an error.
10650 Use char because int might match the return type of a GCC
10651 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010652#ifdef __cplusplus
10653extern "C"
10654#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010655char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010656int
10657main ()
10658{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010660 ;
10661 return 0;
10662}
10663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010665 ac_cv_lib_c_inet_aton=yes
10666else
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010668fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010669rm -f core conftest.err conftest.$ac_objext \
10670 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010671LIBS=$ac_check_lib_save_LIBS
10672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10674$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010675if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010677else
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10679$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010680if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010682else
10683 ac_check_lib_save_LIBS=$LIBS
10684LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010686/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688/* Override any GCC internal prototype to avoid an error.
10689 Use char because int might match the return type of a GCC
10690 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010691#ifdef __cplusplus
10692extern "C"
10693#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010694char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010695int
10696main ()
10697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010699 ;
10700 return 0;
10701}
10702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010703if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010704 ac_cv_lib_resolv_inet_aton=yes
10705else
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010708rm -f core conftest.err conftest.$ac_objext \
10709 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010710LIBS=$ac_check_lib_save_LIBS
10711fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10713$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010714if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010715 cat >>confdefs.h <<_ACEOF
10716#define HAVE_LIBRESOLV 1
10717_ACEOF
10718
10719 LIBS="-lresolv $LIBS"
10720
10721fi
10722
10723
10724fi
10725
10726
Christian Heimesd0764e22007-12-04 15:00:33 +000010727# On Tru64, chflags seems to be present, but calling it will
10728# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10730$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010731if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010733else
Matthias Kloseb9621712010-04-24 17:59:49 +000010734 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010735 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010738/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010739
Christian Heimesd0764e22007-12-04 15:00:33 +000010740#include <sys/stat.h>
10741#include <unistd.h>
10742int main(int argc, char*argv[])
10743{
10744 if(chflags(argv[0], 0) != 0)
10745 return 1;
10746 return 0;
10747}
Ned Deily3eb67d52011-06-28 00:00:28 -070010748
Christian Heimesd0764e22007-12-04 15:00:33 +000010749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010751 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010757fi
10758
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010759
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10762$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010763if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010765if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010766 ac_cv_have_chflags="yes"
10767else
10768 ac_cv_have_chflags="no"
10769fi
10770
10771fi
10772if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010773
Matthias Kloseb9621712010-04-24 17:59:49 +000010774$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010775
10776fi
10777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10779$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010780if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010782else
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010784 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010785else
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010787/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010788
Christian Heimesd0764e22007-12-04 15:00:33 +000010789#include <sys/stat.h>
10790#include <unistd.h>
10791int main(int argc, char*argv[])
10792{
10793 if(lchflags(argv[0], 0) != 0)
10794 return 1;
10795 return 0;
10796}
Ned Deily3eb67d52011-06-28 00:00:28 -070010797
Christian Heimesd0764e22007-12-04 15:00:33 +000010798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010799if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010800 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010801else
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010806fi
10807
10808
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10811$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010812if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010813 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010814if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010815 ac_cv_have_lchflags="yes"
10816else
10817 ac_cv_have_lchflags="no"
10818fi
10819
10820fi
10821if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010822
Matthias Kloseb9621712010-04-24 17:59:49 +000010823$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010824
10825fi
10826
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010827case $ac_sys_system/$ac_sys_release in
10828Darwin/*)
10829 _CUR_CFLAGS="${CFLAGS}"
10830 _CUR_LDFLAGS="${LDFLAGS}"
10831 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10832 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10833 ;;
10834esac
10835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10837$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010838if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010840else
10841 ac_check_lib_save_LIBS=$LIBS
10842LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010844/* end confdefs.h. */
10845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846/* Override any GCC internal prototype to avoid an error.
10847 Use char because int might match the return type of a GCC
10848 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010849#ifdef __cplusplus
10850extern "C"
10851#endif
10852char inflateCopy ();
10853int
10854main ()
10855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010857 ;
10858 return 0;
10859}
10860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010861if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010862 ac_cv_lib_z_inflateCopy=yes
10863else
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010866rm -f core conftest.err conftest.$ac_objext \
10867 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010868LIBS=$ac_check_lib_save_LIBS
10869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10871$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010875
10876fi
10877
10878
10879case $ac_sys_system/$ac_sys_release in
10880Darwin/*)
10881 CFLAGS="${_CUR_CFLAGS}"
10882 LDFLAGS="${_CUR_LDFLAGS}"
10883 ;;
10884esac
10885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10887$as_echo_n "checking for hstrerror... " >&6; }
10888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010890
Martin v. Löwise9416172003-05-03 10:12:45 +000010891#include <netdb.h>
10892
Martin v. Löwise9416172003-05-03 10:12:45 +000010893int
10894main ()
10895{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010896void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010897 ;
10898 return 0;
10899}
10900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010904
Matthias Kloseb159a552010-04-25 21:00:44 +000010905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010907else
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10909$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010910
10911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010912rm -f core conftest.err conftest.$ac_objext \
10913 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914
Matthias Kloseb9621712010-04-24 17:59:49 +000010915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10916$as_echo_n "checking for inet_aton... " >&6; }
10917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010918/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010919
Martin v. Löwis86d66262006-02-17 08:40:11 +000010920#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010921#include <sys/socket.h>
10922#include <netinet/in.h>
10923#include <arpa/inet.h>
10924
Martin v. Löwise9416172003-05-03 10:12:45 +000010925int
10926main ()
10927{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010928void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010929 ;
10930 return 0;
10931}
10932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010934
Matthias Kloseb9621712010-04-24 17:59:49 +000010935$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010936
Matthias Kloseb159a552010-04-25 21:00:44 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010938$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10941$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010942
10943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010944rm -f core conftest.err conftest.$ac_objext \
10945 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10948$as_echo_n "checking for inet_pton... " >&6; }
10949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010950/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010951
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010952#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010953#include <sys/socket.h>
10954#include <netinet/in.h>
10955#include <arpa/inet.h>
10956
Martin v. Löwise9416172003-05-03 10:12:45 +000010957int
10958main ()
10959{
10960void* p = inet_pton
10961 ;
10962 return 0;
10963}
10964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010968
Matthias Kloseb159a552010-04-25 21:00:44 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010970$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010971else
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010974
10975fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010977
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010978# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10980$as_echo_n "checking for setgroups... " >&6; }
10981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010983
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010984#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010985#ifdef HAVE_GRP_H
10986#include <grp.h>
10987#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010988
Martin v. Löwisd5843682002-11-21 20:41:28 +000010989int
10990main ()
10991{
10992void* p = setgroups
10993 ;
10994 return 0;
10995}
10996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011000
Matthias Kloseb159a552010-04-25 21:00:44 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011003else
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011006
11007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011010# check for openpty and forkpty
11011
11012for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011013do :
11014 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011015if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011016 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011017#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011018_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011019
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011020else
Matthias Kloseb9621712010-04-24 17:59:49 +000011021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11022$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011023if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011024 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011025else
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011027LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031/* Override any GCC internal prototype to avoid an error.
11032 Use char because int might match the return type of a GCC
11033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011034#ifdef __cplusplus
11035extern "C"
11036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011037char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011038int
11039main ()
11040{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 ;
11043 return 0;
11044}
11045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011046if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011047 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011048else
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011051rm -f core conftest.err conftest.$ac_objext \
11052 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011053LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11056$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011057if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011059 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11062$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011063if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011065else
11066 ac_check_lib_save_LIBS=$LIBS
11067LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011069/* end confdefs.h. */
11070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071/* Override any GCC internal prototype to avoid an error.
11072 Use char because int might match the return type of a GCC
11073 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011074#ifdef __cplusplus
11075extern "C"
11076#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011077char openpty ();
11078int
11079main ()
11080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011081return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011082 ;
11083 return 0;
11084}
11085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011087 ac_cv_lib_bsd_openpty=yes
11088else
Matthias Kloseb9621712010-04-24 17:59:49 +000011089 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011091rm -f core conftest.err conftest.$ac_objext \
11092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011093LIBS=$ac_check_lib_save_LIBS
11094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11096$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011097if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011099 LIBS="$LIBS -lbsd"
11100fi
11101
11102
11103fi
11104
Fred Drake8cef4cf2000-06-28 16:40:38 +000011105
11106fi
11107done
11108
11109for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011110do :
11111 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011114#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011116
Fred Drake8cef4cf2000-06-28 16:40:38 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11119$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011120if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011122else
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011124LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128/* Override any GCC internal prototype to avoid an error.
11129 Use char because int might match the return type of a GCC
11130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011131#ifdef __cplusplus
11132extern "C"
11133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011134char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011135int
11136main ()
11137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ;
11140 return 0;
11141}
11142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011145else
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011148rm -f core conftest.err conftest.$ac_objext \
11149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011150LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11153$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011154if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011156 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11159$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011160if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011162else
11163 ac_check_lib_save_LIBS=$LIBS
11164LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011166/* end confdefs.h. */
11167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168/* Override any GCC internal prototype to avoid an error.
11169 Use char because int might match the return type of a GCC
11170 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011171#ifdef __cplusplus
11172extern "C"
11173#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011174char forkpty ();
11175int
11176main ()
11177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011179 ;
11180 return 0;
11181}
11182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011184 ac_cv_lib_bsd_forkpty=yes
11185else
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011188rm -f core conftest.err conftest.$ac_objext \
11189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011190LIBS=$ac_check_lib_save_LIBS
11191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11193$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011194if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011196 LIBS="$LIBS -lbsd"
11197fi
11198
11199
11200fi
11201
Fred Drake8cef4cf2000-06-28 16:40:38 +000011202
11203fi
11204done
11205
Jack Jansendd19cf82001-12-06 22:36:17 +000011206
Christian Heimesb186d002008-03-18 15:15:01 +000011207# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011208for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011209do :
11210 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011211if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011212 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011213#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011214_ACEOF
11215
11216fi
11217done
11218
11219
Michael W. Hudson54241132001-12-07 15:38:26 +000011220# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011221for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011222do :
11223 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11224ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011225if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011227#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011229
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011230fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011231done
11232
Michael W. Hudson54241132001-12-07 15:38:26 +000011233
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011234ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011235if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011236 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011237
Martin v. Löwis1142de32002-03-29 16:28:31 +000011238else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011240 *" dup2.$ac_objext "* ) ;;
11241 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011243esac
11244
Martin v. Löwis1142de32002-03-29 16:28:31 +000011245fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011246
11247ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011248if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011249 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11250
11251else
11252 case " $LIBOBJS " in
11253 *" getcwd.$ac_objext "* ) ;;
11254 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11255 ;;
11256esac
11257
11258fi
11259
11260ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011261if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011262 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11263
11264else
11265 case " $LIBOBJS " in
11266 *" strdup.$ac_objext "* ) ;;
11267 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11268 ;;
11269esac
11270
11271fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011272
11273
11274for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011275do :
11276 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011277if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011278 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011279#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011282/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011283#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011284int
11285main ()
11286{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011287getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011295
Guido van Rossum627b2d71993-12-24 10:39:16 +000011296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011298
Guido van Rossum627b2d71993-12-24 10:39:16 +000011299fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011300done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011301
Jack Jansen150753c2003-03-29 22:07:47 +000011302for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011303do :
11304 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011305if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011306 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011307#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011310/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011311#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011312int
11313main ()
11314{
11315setpgrp(0,0);
11316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Matthias Kloseb9621712010-04-24 17:59:49 +000011322$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011323
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011326
11327fi
11328done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011329
Thomas Wouters3a584202000-08-05 23:28:51 +000011330for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011331do :
11332 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011333if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011335#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011339#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011340int
11341main ()
11342{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011343gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 ;
11345 return 0;
11346}
11347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011348if ac_fn_c_try_compile "$LINENO"; then :
11349
Guido van Rossum627b2d71993-12-24 10:39:16 +000011350else
Skip Montanaro6dead952003-09-25 14:50:04 +000011351
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354
Guido van Rossum627b2d71993-12-24 10:39:16 +000011355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011357
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011358fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011359done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011360
Michael W. Hudson54241132001-12-07 15:38:26 +000011361
Victor Stinnere0be4232011-10-25 13:06:09 +020011362for ac_func in clock_gettime
11363do :
11364 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11365if test "x$ac_cv_func_clock_gettime" = xyes; then :
11366 cat >>confdefs.h <<_ACEOF
11367#define HAVE_CLOCK_GETTIME 1
11368_ACEOF
11369
11370else
11371
11372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11373$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11374if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11375 $as_echo_n "(cached) " >&6
11376else
11377 ac_check_lib_save_LIBS=$LIBS
11378LIBS="-lrt $LIBS"
11379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11380/* end confdefs.h. */
11381
11382/* Override any GCC internal prototype to avoid an error.
11383 Use char because int might match the return type of a GCC
11384 builtin and then its argument prototype would still apply. */
11385#ifdef __cplusplus
11386extern "C"
11387#endif
11388char clock_gettime ();
11389int
11390main ()
11391{
11392return clock_gettime ();
11393 ;
11394 return 0;
11395}
11396_ACEOF
11397if ac_fn_c_try_link "$LINENO"; then :
11398 ac_cv_lib_rt_clock_gettime=yes
11399else
11400 ac_cv_lib_rt_clock_gettime=no
11401fi
11402rm -f core conftest.err conftest.$ac_objext \
11403 conftest$ac_exeext conftest.$ac_ext
11404LIBS=$ac_check_lib_save_LIBS
11405fi
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11407$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11408if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11409
11410 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11411
11412
11413$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11414
11415
11416fi
11417
11418
11419fi
11420done
11421
11422
11423for ac_func in clock_getres
11424do :
11425 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11426if test "x$ac_cv_func_clock_getres" = xyes; then :
11427 cat >>confdefs.h <<_ACEOF
11428#define HAVE_CLOCK_GETRES 1
11429_ACEOF
11430
11431else
11432
11433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11434$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11435if ${ac_cv_lib_rt_clock_getres+:} false; then :
11436 $as_echo_n "(cached) " >&6
11437else
11438 ac_check_lib_save_LIBS=$LIBS
11439LIBS="-lrt $LIBS"
11440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11441/* end confdefs.h. */
11442
11443/* Override any GCC internal prototype to avoid an error.
11444 Use char because int might match the return type of a GCC
11445 builtin and then its argument prototype would still apply. */
11446#ifdef __cplusplus
11447extern "C"
11448#endif
11449char clock_getres ();
11450int
11451main ()
11452{
11453return clock_getres ();
11454 ;
11455 return 0;
11456}
11457_ACEOF
11458if ac_fn_c_try_link "$LINENO"; then :
11459 ac_cv_lib_rt_clock_getres=yes
11460else
11461 ac_cv_lib_rt_clock_getres=no
11462fi
11463rm -f core conftest.err conftest.$ac_objext \
11464 conftest$ac_exeext conftest.$ac_ext
11465LIBS=$ac_check_lib_save_LIBS
11466fi
11467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11468$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11469if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11470
11471 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11472
11473
11474fi
11475
11476
11477fi
11478done
11479
11480
Matthias Kloseb9621712010-04-24 17:59:49 +000011481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11482$as_echo_n "checking for major... " >&6; }
11483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011485
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011486#if defined(MAJOR_IN_MKDEV)
11487#include <sys/mkdev.h>
11488#elif defined(MAJOR_IN_SYSMACROS)
11489#include <sys/sysmacros.h>
11490#else
11491#include <sys/types.h>
11492#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011493
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011494int
11495main ()
11496{
11497
11498 makedev(major(0),minor(0));
11499
11500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011504if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011505
11506
Matthias Kloseb9621712010-04-24 17:59:49 +000011507$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011508
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11510$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011511
11512else
Skip Montanaro6dead952003-09-25 14:50:04 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11515$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011516
11517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011518rm -f core conftest.err conftest.$ac_objext \
11519 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011520
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011521# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011522# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11524$as_echo_n "checking for getaddrinfo... " >&6; }
11525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011526/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011527
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011528#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011529#include <sys/socket.h>
11530#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011531#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011532
Martin v. Löwis11437992002-04-12 09:54:03 +000011533int
11534main ()
11535{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011536getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011537 ;
11538 return 0;
11539}
11540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011541if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011542 have_getaddrinfo=yes
11543else
Matthias Kloseb9621712010-04-24 17:59:49 +000011544 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011546rm -f core conftest.err conftest.$ac_objext \
11547 conftest$ac_exeext conftest.$ac_ext
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11549$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011550if test $have_getaddrinfo = yes
11551then
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11553$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011554 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011556else
Matthias Kloseb9621712010-04-24 17:59:49 +000011557 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011558
11559if test "${enable_ipv6+set}" = set; then
11560 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11561else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011562 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011563fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011564else
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011567
11568#include <sys/types.h>
11569#include <netdb.h>
11570#include <string.h>
11571#include <sys/socket.h>
11572#include <netinet/in.h>
11573
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011574int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011575{
11576 int passive, gaierr, inet4 = 0, inet6 = 0;
11577 struct addrinfo hints, *ai, *aitop;
11578 char straddr[INET6_ADDRSTRLEN], strport[16];
11579
11580 for (passive = 0; passive <= 1; passive++) {
11581 memset(&hints, 0, sizeof(hints));
11582 hints.ai_family = AF_UNSPEC;
11583 hints.ai_flags = passive ? AI_PASSIVE : 0;
11584 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011585 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011586 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11587 (void)gai_strerror(gaierr);
11588 goto bad;
11589 }
11590 for (ai = aitop; ai; ai = ai->ai_next) {
11591 if (ai->ai_addr == NULL ||
11592 ai->ai_addrlen == 0 ||
11593 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11594 straddr, sizeof(straddr), strport, sizeof(strport),
11595 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11596 goto bad;
11597 }
11598 switch (ai->ai_family) {
11599 case AF_INET:
11600 if (strcmp(strport, "54321") != 0) {
11601 goto bad;
11602 }
11603 if (passive) {
11604 if (strcmp(straddr, "0.0.0.0") != 0) {
11605 goto bad;
11606 }
11607 } else {
11608 if (strcmp(straddr, "127.0.0.1") != 0) {
11609 goto bad;
11610 }
11611 }
11612 inet4++;
11613 break;
11614 case AF_INET6:
11615 if (strcmp(strport, "54321") != 0) {
11616 goto bad;
11617 }
11618 if (passive) {
11619 if (strcmp(straddr, "::") != 0) {
11620 goto bad;
11621 }
11622 } else {
11623 if (strcmp(straddr, "::1") != 0) {
11624 goto bad;
11625 }
11626 }
11627 inet6++;
11628 break;
11629 case AF_UNSPEC:
11630 goto bad;
11631 break;
11632 default:
11633 /* another family support? */
11634 break;
11635 }
11636 }
11637 }
11638
11639 if (!(inet4 == 0 || inet4 == 2))
11640 goto bad;
11641 if (!(inet6 == 0 || inet6 == 2))
11642 goto bad;
11643
11644 if (aitop)
11645 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011646 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011647
11648 bad:
11649 if (aitop)
11650 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011651 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011652}
11653
Martin v. Löwis11437992002-04-12 09:54:03 +000011654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011656 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011664fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011665
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11669$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11670
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011671if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011672then
11673 if test $ipv6 = yes
11674 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011675 echo 'Fatal: You must get working getaddrinfo() function.'
11676 echo ' or you can specify "--disable-ipv6"'.
11677 exit 1
11678 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011679else
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011682
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011683fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011684
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011685for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011686do :
11687 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011688if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011690#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011691_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011692
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011693fi
11694done
11695
Michael W. Hudson54241132001-12-07 15:38:26 +000011696
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011697# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11699$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011700if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011701 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011704/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011705#include <sys/types.h>
11706#include <sys/time.h>
11707#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Martin v. Löwis11437992002-04-12 09:54:03 +000011709int
11710main ()
11711{
11712if ((struct tm *) 0)
11713return 0;
11714 ;
11715 return 0;
11716}
11717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011718if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011719 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011720else
Matthias Kloseb9621712010-04-24 17:59:49 +000011721 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11726$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011727if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730
11731fi
11732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11734$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011735if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011739/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011740#include <sys/types.h>
11741#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011742
Martin v. Löwis11437992002-04-12 09:54:03 +000011743int
11744main ()
11745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011746struct tm tm;
11747 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011749 ;
11750 return 0;
11751}
11752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011753if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011754 ac_cv_struct_tm=time.h
11755else
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11761$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011762if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011765
11766fi
11767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768ac_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 +000011769#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771"
Victor Stinnere0be4232011-10-25 13:06:09 +020011772if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
11774cat >>confdefs.h <<_ACEOF
11775#define HAVE_STRUCT_TM_TM_ZONE 1
11776_ACEOF
11777
11778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011780
Martin v. Löwis11437992002-04-12 09:54:03 +000011781if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784
11785else
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11787"
Victor Stinnere0be4232011-10-25 13:06:09 +020011788if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792fi
11793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796_ACEOF
11797
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11799$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011804/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011805#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011806#if !HAVE_DECL_TZNAME
11807extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011809
Martin v. Löwis11437992002-04-12 09:54:03 +000011810int
11811main ()
11812{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011814 ;
11815 return 0;
11816}
11817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011818if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011819 ac_cv_var_tzname=yes
11820else
Matthias Kloseb9621712010-04-24 17:59:49 +000011821 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011823rm -f core conftest.err conftest.$ac_objext \
11824 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11827$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011828 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011831
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011832 fi
11833fi
11834
Matthias Kloseb9621712010-04-24 17:59:49 +000011835ac_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 +020011836if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011837
11838cat >>confdefs.h <<_ACEOF
11839#define HAVE_STRUCT_STAT_ST_RDEV 1
11840_ACEOF
11841
11842
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011843fi
11844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845ac_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 +020011846if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011847
Martin v. Löwis11437992002-04-12 09:54:03 +000011848cat >>confdefs.h <<_ACEOF
11849#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11850_ACEOF
11851
11852
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011853fi
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855ac_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 +020011856if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011857
11858cat >>confdefs.h <<_ACEOF
11859#define HAVE_STRUCT_STAT_ST_FLAGS 1
11860_ACEOF
11861
11862
11863fi
11864
Matthias Kloseb9621712010-04-24 17:59:49 +000011865ac_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 +020011866if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011867
11868cat >>confdefs.h <<_ACEOF
11869#define HAVE_STRUCT_STAT_ST_GEN 1
11870_ACEOF
11871
11872
11873fi
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875ac_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 +020011876if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011877
11878cat >>confdefs.h <<_ACEOF
11879#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11880_ACEOF
11881
11882
11883fi
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885ac_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 +020011886if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011887
Martin v. Löwis11437992002-04-12 09:54:03 +000011888cat >>confdefs.h <<_ACEOF
11889#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11890_ACEOF
11891
11892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011894
11895else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011897 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011898 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11899 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011900esac
11901
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011902fi
11903
Michael W. Hudson54241132001-12-07 15:38:26 +000011904
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11907$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011910else
Matthias Kloseb159a552010-04-25 21:00:44 +000011911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011913/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011914#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011915int
11916main ()
11917{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011918return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924 ac_cv_header_time_altzone=yes
11925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011930fi
11931
Matthias Kloseb9621712010-04-24 17:59:49 +000011932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11933$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011934if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011935
Matthias Kloseb9621712010-04-24 17:59:49 +000011936$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011937
11938fi
11939
Guido van Rossumda88dad1995-01-26 00:46:29 +000011940was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11942$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011944/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011945
11946#include <sys/types.h>
11947#include <sys/select.h>
11948#include <sys/time.h>
11949
Martin v. Löwis11437992002-04-12 09:54:03 +000011950int
11951main ()
11952{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953;
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011962
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011963 was_it_defined=yes
11964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11968$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11971$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011974else
Matthias Kloseb9621712010-04-24 17:59:49 +000011975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011977#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011978int
11979main ()
11980{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011981struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011987 ac_cv_struct_addrinfo=yes
11988else
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11992fi
11993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11995$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011996if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011999
12000fi
12001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12003$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012008/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012009
12010# include <sys/types.h>
12011# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012012int
12013main ()
12014{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012015struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012016 ;
12017 return 0;
12018}
12019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012021 ac_cv_struct_sockaddr_storage=yes
12022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12026fi
12027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12029$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012030if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012033
12034fi
12035
Guido van Rossum627b2d71993-12-24 10:39:16 +000012036# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12039$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012040if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012042else
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012045$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012046int
12047main ()
12048{
12049static int test_array [1 - 2 * !(((char) -1) < 0)];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012050test_array [0] = 0
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
12052 ;
12053 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012054}
Martin v. Löwis11437992002-04-12 09:54:03 +000012055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012057 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012058else
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12064$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012066 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012067
12068fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12071$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012072if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077
Martin v. Löwis11437992002-04-12 09:54:03 +000012078int
12079main ()
12080{
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012081/* FIXME: Include the comments suggested by Paul. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012082#ifndef __cplusplus
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012083 /* Ultrix mips cc rejects this. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 typedef int charset[2];
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012085 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087 char const *const *pcpcc;
12088 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012089 /* NEC SVR4.0.2 mips cc rejects this. */
12090 struct point {int x, y;};
12091 static struct point const zero = {0,0};
12092 /* AIX XL C 1.02.0.0 rejects this.
12093 It does not let you subtract one const X* pointer from another in
12094 an arm of an if-expression whose if-part is not a constant
12095 expression */
12096 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099 ++pcpcc;
12100 ppc = (char**) pcpcc;
12101 pcpcc = (char const *const *) ppc;
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012102 { /* SCO 3.2v4 cc rejects this. */
12103 char *t;
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 }
12109 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12110 int x[] = {25, 17};
12111 const int *foo = &x[0];
12112 ++foo;
12113 }
12114 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12115 typedef const int *iptr;
12116 iptr p = 0;
12117 ++p;
12118 }
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012119 { /* AIX XL C 1.02.0.0 rejects this saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
doko@ubuntu.com51f65942012-06-30 14:42:46 +020012121 struct s { int j; const int *ap[3]; };
12122 struct s *b; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 }
12124 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12125 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012129#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012130
Martin v. Löwis11437992002-04-12 09:54:03 +000012131 ;
12132 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012133}
Martin v. Löwis11437992002-04-12 09:54:03 +000012134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012135if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012136 ac_cv_c_const=yes
12137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12143$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012144if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012145
Matthias Kloseb9621712010-04-24 17:59:49 +000012146$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012147
12148fi
12149
Michael W. Hudson54241132001-12-07 15:38:26 +000012150
Guido van Rossumda88dad1995-01-26 00:46:29 +000012151works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12153$as_echo_n "checking for working volatile... " >&6; }
12154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012155/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012156
Martin v. Löwis11437992002-04-12 09:54:03 +000012157int
12158main ()
12159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 ;
12162 return 0;
12163}
12164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012166 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012167else
Skip Montanaro6dead952003-09-25 14:50:04 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012170
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012171
Guido van Rossum627b2d71993-12-24 10:39:16 +000012172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12175$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012176
Guido van Rossumda88dad1995-01-26 00:46:29 +000012177works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12179$as_echo_n "checking for working signed char... " >&6; }
12180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012181/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012182
Martin v. Löwis11437992002-04-12 09:54:03 +000012183int
12184main ()
12185{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012186signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012192 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012193else
Skip Montanaro6dead952003-09-25 14:50:04 +000012194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012196
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012197
Guido van Rossum7f43da71994-08-01 12:15:30 +000012198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12201$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012202
Guido van Rossumda88dad1995-01-26 00:46:29 +000012203have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12205$as_echo_n "checking for prototypes... " >&6; }
12206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012207/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012208int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012209int
12210main ()
12211{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 ;
12214 return 0;
12215}
12216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012217if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012220
Matthias Kloseb159a552010-04-25 21:00:44 +000012221 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12225$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012226
Guido van Rossumda88dad1995-01-26 00:46:29 +000012227works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12229$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012231/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012232
12233#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012234int foo(int x, ...) {
12235 va_list va;
12236 va_start(va, x);
12237 va_arg(va, int);
12238 va_arg(va, char *);
12239 va_arg(va, double);
12240 return 0;
12241}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243int
12244main ()
12245{
Guido van Rossum90eea071996-08-30 20:58:57 +000012246return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ;
12248 return 0;
12249}
12250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012252
12253
Matthias Kloseb9621712010-04-24 17:59:49 +000012254$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012256 works=yes
12257
Guido van Rossum627b2d71993-12-24 10:39:16 +000012258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12261$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012262
Martin v. Löwisd6320502004-08-12 13:45:08 +000012263# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12265$as_echo_n "checking for socketpair... " >&6; }
12266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012267/* end confdefs.h. */
12268
12269#include <sys/types.h>
12270#include <sys/socket.h>
12271
12272int
12273main ()
12274{
12275void *x=socketpair
12276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012283
Matthias Kloseb159a552010-04-25 21:00:44 +000012284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012286else
Matthias Kloseb9621712010-04-24 17:59:49 +000012287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12288$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012289
12290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012292
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012293# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12295$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298#include <sys/types.h>
12299#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012300int
12301main ()
12302{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012303struct sockaddr x;
12304x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 ;
12306 return 0;
12307}
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_compile "$LINENO"; then :
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12311$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314
12315else
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12317$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012318
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012321
Guido van Rossumda88dad1995-01-26 00:46:29 +000012322va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12324$as_echo_n "checking whether va_list is an array... " >&6; }
12325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012327
12328#ifdef HAVE_STDARG_PROTOTYPES
12329#include <stdarg.h>
12330#else
12331#include <varargs.h>
12332#endif
12333
Martin v. Löwis11437992002-04-12 09:54:03 +000012334int
12335main ()
12336{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ;
12339 return 0;
12340}
12341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if ac_fn_c_try_compile "$LINENO"; then :
12343
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344else
Skip Montanaro6dead952003-09-25 14:50:04 +000012345
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012348
Guido van Rossumda88dad1995-01-26 00:46:29 +000012349 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012350
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12354$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012356# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
12358
Matthias Kloseb9621712010-04-24 17:59:49 +000012359ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012360if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012363
Matthias Kloseb9621712010-04-24 17:59:49 +000012364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12365$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012366 OLD_CFLAGS=$CFLAGS
12367 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012369/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012370
12371# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012372
Martin v. Löwis11437992002-04-12 09:54:03 +000012373int
12374main ()
12375{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012376
12377 char *name;
12378 struct hostent *he, *res;
12379 char buffer[2048];
12380 int buflen = 2048;
12381 int h_errnop;
12382
12383 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012384
12385 ;
12386 return 0;
12387}
12388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393
Matthias Kloseb9621712010-04-24 17:59:49 +000012394$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12397$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012398
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012399else
Skip Montanaro6dead952003-09-25 14:50:04 +000012400
Matthias Kloseb9621712010-04-24 17:59:49 +000012401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12402$as_echo "no" >&6; }
12403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12404$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012406/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012407
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012408# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012409
Martin v. Löwis11437992002-04-12 09:54:03 +000012410int
12411main ()
12412{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012413
12414 char *name;
12415 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012416 char buffer[2048];
12417 int buflen = 2048;
12418 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012419
Matthias Kloseb159a552010-04-25 21:00:44 +000012420 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012421
12422 ;
12423 return 0;
12424}
12425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012429
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
Matthias Kloseb159a552010-04-25 21:00:44 +000012431$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12434$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012436else
Skip Montanaro6dead952003-09-25 14:50:04 +000012437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12439$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12441$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12443/* end confdefs.h. */
12444
12445# include <netdb.h>
12446
12447int
12448main ()
12449{
12450
12451 char *name;
12452 struct hostent *he;
12453 struct hostent_data data;
12454
12455 (void) gethostbyname_r(name, he, &data);
12456
12457 ;
12458 return 0;
12459}
12460_ACEOF
12461if ac_fn_c_try_compile "$LINENO"; then :
12462
12463 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12464
12465
12466$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12467
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12469$as_echo "yes" >&6; }
12470
12471else
12472
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12474$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012475
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012484 CFLAGS=$OLD_CFLAGS
12485
12486else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 for ac_func in gethostbyname
12489do :
12490 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012491if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012493#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012494_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012497done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012498
Michael W. Hudson54241132001-12-07 15:38:26 +000012499
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012500fi
12501
Michael W. Hudson54241132001-12-07 15:38:26 +000012502
12503
12504
12505
12506
12507
Guido van Rossum627b2d71993-12-24 10:39:16 +000012508# checks for system services
12509# (none yet)
12510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012512ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012513if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012514
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12517$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012518if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012519 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012520else
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012522LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526/* Override any GCC internal prototype to avoid an error.
12527 Use char because int might match the return type of a GCC
12528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012529#ifdef __cplusplus
12530extern "C"
12531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012532char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012533int
12534main ()
12535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ;
12538 return 0;
12539}
12540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012543else
Matthias Kloseb9621712010-04-24 17:59:49 +000012544 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012546rm -f core conftest.err conftest.$ac_objext \
12547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12551$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012552if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 cat >>confdefs.h <<_ACEOF
12554#define HAVE_LIBIEEE 1
12555_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012557 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558
Guido van Rossum627b2d71993-12-24 10:39:16 +000012559fi
12560
Michael W. Hudson54241132001-12-07 15:38:26 +000012561
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012562fi
12563
Michael W. Hudson54241132001-12-07 15:38:26 +000012564
Guido van Rossum7f253911997-05-09 02:42:48 +000012565# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12567$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012570if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012572if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012573then
12574
Matthias Kloseb9621712010-04-24 17:59:49 +000012575$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12578$as_echo "yes" >&6; }
12579else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012581fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012582else
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12584$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585fi
12586
Guido van Rossum7f253911997-05-09 02:42:48 +000012587
Guido van Rossum7f43da71994-08-01 12:15:30 +000012588# check for --with-libm=...
12589
Guido van Rossum563e7081996-09-10 18:20:48 +000012590case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012591Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012592*) LIBM=-lm
12593esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12595$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012598if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012600if test "$withval" = no
12601then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12603$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012604elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012605then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12607$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012608else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012609fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012610else
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12612$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012613fi
12614
Guido van Rossum7f43da71994-08-01 12:15:30 +000012615
12616# check for --with-libc=...
12617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12619$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012622if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012624if test "$withval" = no
12625then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12627$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012628elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012629then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12631$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012632else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012633fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012634else
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12636$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637fi
12638
Guido van Rossum7f43da71994-08-01 12:15:30 +000012639
Stefan Krah1919b7e2012-03-21 18:25:23 +010012640# **************************************
12641# * Check for gcc x64 inline assembler *
12642# **************************************
12643
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12645$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12647/* end confdefs.h. */
12648
12649int
12650main ()
12651{
12652
12653 __asm__ __volatile__ ("movq %rcx, %rax");
12654
12655 ;
12656 return 0;
12657}
12658_ACEOF
12659if ac_fn_c_try_compile "$LINENO"; then :
12660 have_gcc_asm_for_x64=yes
12661else
12662 have_gcc_asm_for_x64=no
12663fi
12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12666$as_echo "$have_gcc_asm_for_x64" >&6; }
12667if test "$have_gcc_asm_for_x64" = yes
12668then
12669
12670$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12671
12672fi
12673
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012674# **************************************************
12675# * Check for various properties of floating point *
12676# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012677
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12679$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012680if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012682else
12683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012685 ac_cv_little_endian_double=no
12686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012688/* end confdefs.h. */
12689
12690#include <string.h>
12691int main() {
12692 double x = 9006104071832581.0;
12693 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12694 return 0;
12695 else
12696 return 1;
12697}
12698
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012701 ac_cv_little_endian_double=yes
12702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012707fi
12708
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012709fi
12710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12712$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012713if test "$ac_cv_little_endian_double" = yes
12714then
12715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012717
12718fi
12719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12721$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012722if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012724else
12725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012727 ac_cv_big_endian_double=no
12728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012730/* end confdefs.h. */
12731
12732#include <string.h>
12733int main() {
12734 double x = 9006104071832581.0;
12735 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12736 return 0;
12737 else
12738 return 1;
12739}
12740
12741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012743 ac_cv_big_endian_double=yes
12744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012749fi
12750
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012751fi
12752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12754$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012755if test "$ac_cv_big_endian_double" = yes
12756then
12757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012759
12760fi
12761
12762# Some ARM platforms use a mixed-endian representation for doubles.
12763# While Python doesn't currently have full support for these platforms
12764# (see e.g., issue 1762561), we can at least make sure that float <-> string
12765# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12767$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012768if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012769 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012770else
12771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012773 ac_cv_mixed_endian_double=no
12774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012776/* end confdefs.h. */
12777
12778#include <string.h>
12779int main() {
12780 double x = 9006104071832581.0;
12781 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12782 return 0;
12783 else
12784 return 1;
12785}
12786
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012789 ac_cv_mixed_endian_double=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012795fi
12796
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797fi
12798
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12800$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801if test "$ac_cv_mixed_endian_double" = yes
12802then
12803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012805
12806fi
12807
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012808# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012809# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012810# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012811# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012812# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012813# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012814
12815# This inline assembler syntax may also work for suncc and icc,
12816# so we try it on all platforms.
12817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12819$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012821/* end confdefs.h. */
12822
12823int
12824main ()
12825{
12826
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012827 unsigned short cw;
12828 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12829 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012830
12831 ;
12832 return 0;
12833}
12834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012835if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836 have_gcc_asm_for_x87=yes
12837else
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12842$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012843if test "$have_gcc_asm_for_x87" = yes
12844then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012848fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012850# Detect whether system arithmetic is subject to x87-style double
12851# rounding issues. The result of this test has little meaning on non
12852# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12853# mode is round-to-nearest and double rounding issues are present, and
12854# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12856$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012857# $BASECFLAGS may affect the result
12858ac_save_cc="$CC"
12859CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012861 ac_cv_x87_double_rounding=no
12862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012864/* end confdefs.h. */
12865
12866#include <stdlib.h>
12867#include <math.h>
12868int main() {
12869 volatile double x, y, z;
12870 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12871 x = 0.99999999999999989; /* 1-2**-53 */
12872 y = 1./x;
12873 if (y != 1.)
12874 exit(0);
12875 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12876 x = 1e16;
12877 y = 2.99999;
12878 z = x + y;
12879 if (z != 1e16+4.)
12880 exit(0);
12881 /* both tests show evidence of double rounding */
12882 exit(1);
12883}
12884
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012887 ac_cv_x87_double_rounding=no
12888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012893fi
12894
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12897$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012898if test "$ac_cv_x87_double_rounding" = yes
12899then
12900
Matthias Kloseb9621712010-04-24 17:59:49 +000012901$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012902
12903fi
12904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905# ************************************
12906# * Check for mathematical functions *
12907# ************************************
12908
12909LIBS_SAVE=$LIBS
12910LIBS="$LIBS $LIBM"
12911
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012912for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12913do :
12914 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12915ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012916if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012917 cat >>confdefs.h <<_ACEOF
12918#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12919_ACEOF
12920
12921fi
12922done
12923
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012924for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012925do :
12926 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12927ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012928if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012929 cat >>confdefs.h <<_ACEOF
12930#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12931_ACEOF
12932
12933fi
12934done
12935
12936ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12937"
Victor Stinnere0be4232011-10-25 13:06:09 +020012938if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012939 ac_have_decl=1
12940else
12941 ac_have_decl=0
12942fi
12943
12944cat >>confdefs.h <<_ACEOF
12945#define HAVE_DECL_ISINF $ac_have_decl
12946_ACEOF
12947ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12948"
Victor Stinnere0be4232011-10-25 13:06:09 +020012949if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012950 ac_have_decl=1
12951else
12952 ac_have_decl=0
12953fi
12954
12955cat >>confdefs.h <<_ACEOF
12956#define HAVE_DECL_ISNAN $ac_have_decl
12957_ACEOF
12958ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12959"
Victor Stinnere0be4232011-10-25 13:06:09 +020012960if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012961 ac_have_decl=1
12962else
12963 ac_have_decl=0
12964fi
12965
12966cat >>confdefs.h <<_ACEOF
12967#define HAVE_DECL_ISFINITE $ac_have_decl
12968_ACEOF
12969
12970
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012971# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12972# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12974$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012975if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012977else
12978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012980 ac_cv_tanh_preserves_zero_sign=no
12981else
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012983/* end confdefs.h. */
12984
12985#include <math.h>
12986#include <stdlib.h>
12987int main() {
12988 /* return 0 if either negative zeros don't exist
12989 on this platform or if negative zeros exist
12990 and tanh(-0.) == -0. */
12991 if (atan2(0., -1.) == atan2(-0., -1.) ||
12992 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12993 else exit(1);
12994}
12995
12996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012997if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012998 ac_cv_tanh_preserves_zero_sign=yes
12999else
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013002rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13003 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013004fi
13005
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013006fi
13007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13009$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013010if test "$ac_cv_tanh_preserves_zero_sign" = yes
13011then
13012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013014
13015fi
13016
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013017if test "$ac_cv_func_log1p" = yes
13018then
13019 # On some versions of AIX, log1p(-0.) returns 0. instead of
13020 # -0. See issue #9920.
13021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13022$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013023 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013024 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013025else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013026
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013027 if test "$cross_compiling" = yes; then :
13028 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013029else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13031/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013032
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013033 #include <math.h>
13034 #include <stdlib.h>
13035 int main() {
13036 /* Fail if the signs of log1p(-0.) and -0. can be
13037 distinguished. */
13038 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13039 return 0;
13040 else
13041 return 1;
13042 }
13043
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013044_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013045if ac_fn_c_try_run "$LINENO"; then :
13046 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013047else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013048 ac_cv_log1p_drops_zero_sign=yes
13049fi
13050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13051 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013052fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013053
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013054fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013055
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13057$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13058fi
13059if test "$ac_cv_log1p_drops_zero_sign" = yes
13060then
13061
13062$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13063
13064fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013065
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013066LIBS=$LIBS_SAVE
13067
Mark Dickinsona614f042009-11-28 12:48:43 +000013068# For multiprocessing module, check that sem_open
13069# actually works. For FreeBSD versions <= 7.2,
13070# the kernel module that provides POSIX semaphores
13071# isn't loaded by default, so an attempt to call
13072# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13074$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013075if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013079 ac_cv_posix_semaphores_enabled=yes
13080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013082/* end confdefs.h. */
13083
13084#include <unistd.h>
13085#include <fcntl.h>
13086#include <stdio.h>
13087#include <semaphore.h>
13088#include <sys/stat.h>
13089
13090int main(void) {
13091 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13092 if (a == SEM_FAILED) {
13093 perror("sem_open");
13094 return 1;
13095 }
13096 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013097 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013098 return 0;
13099}
13100
13101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013102if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013103 ac_cv_posix_semaphores_enabled=yes
13104else
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +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
Mark Dickinsona614f042009-11-28 12:48:43 +000013109fi
13110
13111
Mark Dickinsona614f042009-11-28 12:48:43 +000013112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13115$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013116if test $ac_cv_posix_semaphores_enabled = no
13117then
13118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013120
13121fi
13122
Mark Dickinson10683072009-04-18 21:18:19 +000013123# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13125$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013126if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013130 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013133/* end confdefs.h. */
13134
13135#include <unistd.h>
13136#include <fcntl.h>
13137#include <stdio.h>
13138#include <semaphore.h>
13139#include <sys/stat.h>
13140
13141int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013142 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013143 int count;
13144 int res;
13145 if(a==SEM_FAILED){
13146 perror("sem_open");
13147 return 1;
13148
13149 }
13150 res = sem_getvalue(a, &count);
13151 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013152 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013153 return res==-1 ? 1 : 0;
13154}
13155
Mark Dickinson10683072009-04-18 21:18:19 +000013156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013157if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013158 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013159else
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013164fi
13165
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013167fi
13168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13170$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013171if test $ac_cv_broken_sem_getvalue = yes
13172then
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175
13176fi
13177
Mark Dickinsonbd792642009-03-18 20:06:12 +000013178# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13180$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013181# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013183 enableval=$enable_big_digits; case $enable_big_digits in
13184yes)
13185 enable_big_digits=30 ;;
13186no)
13187 enable_big_digits=15 ;;
1318815|30)
13189 ;;
13190*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013191 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 +000013192esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13194$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013195
13196cat >>confdefs.h <<_ACEOF
13197#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13198_ACEOF
13199
13200
13201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13203$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013204fi
13205
13206
Guido van Rossumef2255b2000-03-10 22:30:29 +000013207# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013208ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013209if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013214 wchar_h="yes"
13215
Guido van Rossumef2255b2000-03-10 22:30:29 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013218
13219fi
13220
Michael W. Hudson54241132001-12-07 15:38:26 +000013221
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013223# determine wchar_t size
13224if test "$wchar_h" = yes
13225then
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013227# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13228# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13229# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13231$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013232if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013234else
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13236"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Martin v. Löwis11437992002-04-12 09:54:03 +000013238else
Matthias Kloseb9621712010-04-24 17:59:49 +000013239 if test "$ac_cv_type_wchar_t" = yes; then
13240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013242as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013243See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244 else
13245 ac_cv_sizeof_wchar_t=0
13246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013248
Martin v. Löwis11437992002-04-12 09:54:03 +000013249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13251$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013252
13253
13254
Martin v. Löwis11437992002-04-12 09:54:03 +000013255cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013256#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013257_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013258
Michael W. Hudson54241132001-12-07 15:38:26 +000013259
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013260fi
13261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13263$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013264have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013266/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013267
13268#include <tcl.h>
13269#if TCL_UTF_MAX != 6
13270# error "NOT UCS4_TCL"
13271#endif
13272int
13273main ()
13274{
13275
13276 ;
13277 return 0;
13278}
13279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013281
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013284
13285 have_ucs4_tcl=yes
13286
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13290$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013291
Skip Montanaro6dead952003-09-25 14:50:04 +000013292# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013293if test "$wchar_h" = yes
13294then
13295 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13297$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013298 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013300else
13301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013303 ac_cv_wchar_t_signed=yes
13304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013306/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013307
13308 #include <wchar.h>
13309 int main()
13310 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013311 /* Success: exit code 0 */
13312 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013313 }
13314
13315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013317 ac_cv_wchar_t_signed=yes
13318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13322 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013323fi
13324
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013325fi
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13328$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329fi
13330
Georg Brandl52d168a2008-01-07 18:10:24 +000013331# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013332if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013333 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013334then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013335 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013336
Matthias Kloseb9621712010-04-24 17:59:49 +000013337$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
Georg Brandl52d168a2008-01-07 18:10:24 +000013339else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013340 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013341fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13343$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013344
13345# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13347$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013348if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 ac_cv_c_bigendian=unknown
13352 # See if we're dealing with a universal compiler.
13353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354/* end confdefs.h. */
13355#ifndef __APPLE_CC__
13356 not a universal capable compiler
13357 #endif
13358 typedef int dummy;
13359
Skip Montanaro6dead952003-09-25 14:50:04 +000013360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013361if ac_fn_c_try_compile "$LINENO"; then :
13362
13363 # Check for potential -arch flags. It is not universal unless
13364 # there are at least two -arch flags with different values.
13365 ac_arch=
13366 ac_prev=
13367 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13368 if test -n "$ac_prev"; then
13369 case $ac_word in
13370 i?86 | x86_64 | ppc | ppc64)
13371 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13372 ac_arch=$ac_word
13373 else
13374 ac_cv_c_bigendian=universal
13375 break
13376 fi
13377 ;;
13378 esac
13379 ac_prev=
13380 elif test "x$ac_word" = "x-arch"; then
13381 ac_prev=arch
13382 fi
13383 done
13384fi
13385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13386 if test $ac_cv_c_bigendian = unknown; then
13387 # See if sys/param.h defines the BYTE_ORDER macro.
13388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013390#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013392
Martin v. Löwis11437992002-04-12 09:54:03 +000013393int
13394main ()
13395{
Matthias Kloseb9621712010-04-24 17:59:49 +000013396#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13397 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13398 && LITTLE_ENDIAN)
13399 bogus endian macros
13400 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
13402 ;
13403 return 0;
13404}
13405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013406if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013407 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013409/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013410#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413int
13414main ()
13415{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013416#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 not big endian
13418 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
13420 ;
13421 return 0;
13422}
13423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013424if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013425 ac_cv_c_bigendian=yes
13426else
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013428fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013430fi
13431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13432 fi
13433 if test $ac_cv_c_bigendian = unknown; then
13434 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013436/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013437#include <limits.h>
13438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
Matthias Kloseb9621712010-04-24 17:59:49 +000013442#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13443 bogus endian macros
13444 #endif
13445
Martin v. Löwis11437992002-04-12 09:54:03 +000013446 ;
13447 return 0;
13448}
13449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_compile "$LINENO"; then :
13451 # It does; now see whether it defined to _BIG_ENDIAN or not.
13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453/* end confdefs.h. */
13454#include <limits.h>
13455
13456int
13457main ()
13458{
13459#ifndef _BIG_ENDIAN
13460 not big endian
13461 #endif
13462
13463 ;
13464 return 0;
13465}
13466_ACEOF
13467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013468 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013469else
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13473fi
13474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13475 fi
13476 if test $ac_cv_c_bigendian = unknown; then
13477 # Compile a test program.
13478 if test "$cross_compiling" = yes; then :
13479 # Try to guess by grepping values from an object file.
13480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13481/* end confdefs.h. */
13482short int ascii_mm[] =
13483 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13484 short int ascii_ii[] =
13485 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13486 int use_ascii (int i) {
13487 return ascii_mm[i] + ascii_ii[i];
13488 }
13489 short int ebcdic_ii[] =
13490 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13491 short int ebcdic_mm[] =
13492 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13493 int use_ebcdic (int i) {
13494 return ebcdic_mm[i] + ebcdic_ii[i];
13495 }
13496 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498int
13499main ()
13500{
13501return use_ascii (foo) == use_ebcdic (foo);
13502 ;
13503 return 0;
13504}
13505_ACEOF
13506if ac_fn_c_try_compile "$LINENO"; then :
13507 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13508 ac_cv_c_bigendian=yes
13509 fi
13510 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13511 if test "$ac_cv_c_bigendian" = unknown; then
13512 ac_cv_c_bigendian=no
13513 else
13514 # finding both strings is unlikely to happen, but who knows?
13515 ac_cv_c_bigendian=unknown
13516 fi
13517 fi
13518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013520else
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013522/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013524int
13525main ()
13526{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 /* Are we little or big endian? From Harbison&Steele. */
13529 union
13530 {
13531 long int l;
13532 char c[sizeof (long int)];
13533 } u;
13534 u.l = 1;
13535 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536
13537 ;
13538 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013539}
Martin v. Löwis11437992002-04-12 09:54:03 +000013540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013541if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013542 ac_cv_c_bigendian=no
13543else
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13547 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13553$as_echo "$ac_cv_c_bigendian" >&6; }
13554 case $ac_cv_c_bigendian in #(
13555 yes)
13556 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13557;; #(
13558 no)
13559 ;; #(
13560 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013561
Matthias Kloseb9621712010-04-24 17:59:49 +000013562$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 ;; #(
13565 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013566 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013567 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013569
Michael W. Hudson54241132001-12-07 15:38:26 +000013570
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013571# ABI version string for Python extension modules. This appears between the
13572# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13573# from the following attributes which affect the ABI of this Python build (in
13574# this order):
13575#
13576# * The Python implementation (always 'cpython-' for us)
13577# * The major and minor version numbers
13578# * --with-pydebug (adds a 'd')
13579# * --with-pymalloc (adds a 'm')
13580# * --with-wide-unicode (adds a 'u')
13581#
13582# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013583# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13584# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013585
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13587$as_echo_n "checking ABIFLAGS... " >&6; }
13588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13589$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13591$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013592SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13594$as_echo "$SOABI" >&6; }
13595
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13597$as_echo_n "checking LDVERSION... " >&6; }
13598LDVERSION='$(VERSION)$(ABIFLAGS)'
13599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13600$as_echo "$LDVERSION" >&6; }
13601
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013602# SO is the extension of shared libraries `(including the dot!)
13603# -- usually .so, .sl on HP-UX, .dll on Cygwin
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13605$as_echo_n "checking SO... " >&6; }
13606if test -z "$SO"
13607then
13608 case $ac_sys_system in
13609 hp*|HP*)
13610 case `uname -m` in
13611 ia64) SO=.so;;
13612 *) SO=.sl;;
13613 esac
13614 ;;
13615 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013616 Linux*|GNU*)
13617 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013618 *) SO=.so;;
13619 esac
13620else
13621 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013622 echo
13623 echo '====================================================================='
13624 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013625 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013626 echo '+ Do you really mean to change the extension for shared libraries? +'
13627 echo '+ Continuing in 10 seconds to let you to ponder. +'
13628 echo '+ +'
13629 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013630 sleep 10
13631fi
13632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13633$as_echo "$SO" >&6; }
13634
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013635# Check whether right shifting a negative integer extends the sign bit
13636# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13638$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013641else
Martin v. Löwis11437992002-04-12 09:54:03 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013644 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013645else
Matthias Kloseb9621712010-04-24 17:59:49 +000013646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013647/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013648
13649int main()
13650{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013651 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013652}
13653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013656 ac_cv_rshift_extends_sign=yes
13657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013662fi
13663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664fi
13665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13667$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013668if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013669then
Martin v. Löwis11437992002-04-12 09:54:03 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013672
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013673fi
13674
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013675# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13677$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013678if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013680else
Martin v. Löwis11437992002-04-12 09:54:03 +000013681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013684#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013688
13689 FILE *f = fopen("/dev/null", "r");
13690 flockfile(f);
13691 getc_unlocked(f);
13692 funlockfile(f);
13693
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 ;
13695 return 0;
13696}
13697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013699 ac_cv_have_getc_unlocked=yes
13700else
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 ac_cv_have_getc_unlocked=no
13702fi
13703rm -f core conftest.err conftest.$ac_objext \
13704 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13708$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013709if test "$ac_cv_have_getc_unlocked" = yes
13710then
Martin v. Löwis11437992002-04-12 09:54:03 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013713
13714fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013715
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013716# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013717# save the value of LIBS so we don't actually link Python with readline
13718LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013719
Gregory P. Smith18820942008-09-07 06:24:49 +000013720# On some systems we need to link readline to a termcap compatible
13721# library. NOTE: Keep the precedence of listed libraries synchronised
13722# with setup.py.
13723py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13725$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013726for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013727 if test -z "$py_libtermcap"; then
13728 READLINE_LIBS="-lreadline"
13729 else
13730 READLINE_LIBS="-lreadline -l$py_libtermcap"
13731 fi
13732 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013734/* end confdefs.h. */
13735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736/* Override any GCC internal prototype to avoid an error.
13737 Use char because int might match the return type of a GCC
13738 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013739#ifdef __cplusplus
13740extern "C"
13741#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013742char readline ();
13743int
13744main ()
13745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013746return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013747 ;
13748 return 0;
13749}
13750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013751if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013752 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013754rm -f core conftest.err conftest.$ac_objext \
13755 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013756 if test $py_cv_lib_readline = yes; then
13757 break
13758 fi
13759done
13760# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13761#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013762if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13764$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13767$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013770
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013771fi
13772
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013773# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13775$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013778else
13779 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013780LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782/* end confdefs.h. */
13783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013784/* Override any GCC internal prototype to avoid an error.
13785 Use char because int might match the return type of a GCC
13786 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013787#ifdef __cplusplus
13788extern "C"
13789#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013790char rl_callback_handler_install ();
13791int
13792main ()
13793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795 ;
13796 return 0;
13797}
13798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013800 ac_cv_lib_readline_rl_callback_handler_install=yes
13801else
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013804rm -f core conftest.err conftest.$ac_objext \
13805 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013806LIBS=$ac_check_lib_save_LIBS
13807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13809$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013810if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013813
13814fi
13815
13816
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013817# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013819/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013820#include <readline/readline.h>
13821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013823 have_readline=yes
13824else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013825 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013826
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013827fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013828rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013829if test $have_readline = yes
13830then
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013832/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013833#include <readline/readline.h>
13834
13835_ACEOF
13836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013838
Matthias Kloseb9621712010-04-24 17:59:49 +000013839$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013840
13841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013842rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013845/* end confdefs.h. */
13846#include <readline/readline.h>
13847
13848_ACEOF
13849if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013853
13854fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013855rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013856
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013857fi
13858
Martin v. Löwis0daad592001-09-30 21:09:59 +000013859# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13861$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013862if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013864else
Martin v. Löwis11437992002-04-12 09:54:03 +000013865 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013866LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013870/* Override any GCC internal prototype to avoid an error.
13871 Use char because int might match the return type of a GCC
13872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013873#ifdef __cplusplus
13874extern "C"
13875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013876char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013877int
13878main ()
13879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 ;
13882 return 0;
13883}
13884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013887else
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013890rm -f core conftest.err conftest.$ac_objext \
13891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013892LIBS=$ac_check_lib_save_LIBS
13893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13895$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013896if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013899
Martin v. Löwis0daad592001-09-30 21:09:59 +000013900fi
13901
Michael W. Hudson54241132001-12-07 15:38:26 +000013902
Thomas Wouters89d996e2007-09-08 17:39:28 +000013903# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13905$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013906if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013908else
13909 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013910LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013912/* end confdefs.h. */
13913
13914/* Override any GCC internal prototype to avoid an error.
13915 Use char because int might match the return type of a GCC
13916 builtin and then its argument prototype would still apply. */
13917#ifdef __cplusplus
13918extern "C"
13919#endif
13920char rl_completion_display_matches_hook ();
13921int
13922main ()
13923{
13924return rl_completion_display_matches_hook ();
13925 ;
13926 return 0;
13927}
13928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013929if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013930 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13931else
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013934rm -f core conftest.err conftest.$ac_objext \
13935 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013936LIBS=$ac_check_lib_save_LIBS
13937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13939$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013940if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013943
13944fi
13945
13946
Martin v. Löwis0daad592001-09-30 21:09:59 +000013947# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13949$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013950if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013951 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013952else
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013954LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958/* Override any GCC internal prototype to avoid an error.
13959 Use char because int might match the return type of a GCC
13960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013961#ifdef __cplusplus
13962extern "C"
13963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013964char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013965int
13966main ()
13967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ;
13970 return 0;
13971}
13972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013975else
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013978rm -f core conftest.err conftest.$ac_objext \
13979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013980LIBS=$ac_check_lib_save_LIBS
13981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13983$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013984if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013987
Guido van Rossum353ae582001-07-10 16:45:32 +000013988fi
13989
Jack Jansendd19cf82001-12-06 22:36:17 +000013990
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013991# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013993/* end confdefs.h. */
13994#include <readline/readline.h>
13995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013996if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013997 have_readline=yes
13998else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013999 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014000
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014001fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014002rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014003if test $have_readline = yes
14004then
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014006/* end confdefs.h. */
14007#include <readline/readline.h>
14008
14009_ACEOF
14010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014011 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014014
14015fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014016rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014017
14018fi
14019
Martin v. Löwis82bca632006-02-10 20:49:30 +000014020# End of readline checks: restore LIBS
14021LIBS=$LIBS_no_readline
14022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14024$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014025if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014026 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014027else
Martin v. Löwis11437992002-04-12 09:54:03 +000014028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014030 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014031else
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014033/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014034
14035int main()
14036{
14037 int val1 = nice(1);
14038 if (val1 != -1 && val1 == nice(2))
14039 exit(0);
14040 exit(1);
14041}
14042
Martin v. Löwis11437992002-04-12 09:54:03 +000014043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014045 ac_cv_broken_nice=yes
14046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014051fi
14052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014053fi
14054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14056$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014057if test "$ac_cv_broken_nice" = yes
14058then
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014061
14062fi
14063
Matthias Kloseb9621712010-04-24 17:59:49 +000014064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14065$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014068else
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014070 ac_cv_broken_poll=no
14071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014073/* end confdefs.h. */
14074
14075#include <poll.h>
14076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014077int main()
14078{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014079 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014080 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014081
14082 close (42);
14083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014084 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014085 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014086 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014087 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014088 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014089 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014090 return 1;
14091}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014092
14093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014094if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014095 ac_cv_broken_poll=yes
14096else
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014103fi
14104
Matthias Kloseb9621712010-04-24 17:59:49 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14106$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014107if test "$ac_cv_broken_poll" = yes
14108then
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014111
14112fi
14113
Brett Cannon43802422005-02-10 20:48:03 +000014114# 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 +000014115# (which is not required by ISO C or UNIX spec) and/or if we support
14116# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014117ac_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 +000014118#include <$ac_cv_struct_tm>
14119
Matthias Kloseb9621712010-04-24 17:59:49 +000014120"
Victor Stinnere0be4232011-10-25 13:06:09 +020014121if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014122
14123cat >>confdefs.h <<_ACEOF
14124#define HAVE_STRUCT_TM_TM_ZONE 1
14125_ACEOF
14126
14127
14128fi
14129
14130if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014133
14134else
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14136"
Victor Stinnere0be4232011-10-25 13:06:09 +020014137if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014139else
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141fi
14142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014144#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014145_ACEOF
14146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14148$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014149if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151else
Matthias Kloseb9621712010-04-24 17:59:49 +000014152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014153/* end confdefs.h. */
14154#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155#if !HAVE_DECL_TZNAME
14156extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014157#endif
14158
14159int
14160main ()
14161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014163 ;
14164 return 0;
14165}
14166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014167if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014168 ac_cv_var_tzname=yes
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014172rm -f core conftest.err conftest.$ac_objext \
14173 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14176$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014177 if test $ac_cv_var_tzname = yes; then
14178
Matthias Kloseb9621712010-04-24 17:59:49 +000014179$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014180
14181 fi
14182fi
14183
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014184
Martin v. Löwis1d459062005-03-14 21:23:33 +000014185# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14187$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014188if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014190else
14191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014193 ac_cv_working_tzset=no
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014196/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014197
14198#include <stdlib.h>
14199#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014200#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014201
14202#if HAVE_TZNAME
14203extern char *tzname[];
14204#endif
14205
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014206int main()
14207{
Brett Cannon18367812003-09-19 00:59:16 +000014208 /* Note that we need to ensure that not only does tzset(3)
14209 do 'something' with localtime, but it works as documented
14210 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014211 This includes making sure that tzname is set properly if
14212 tm->tm_zone does not exist since it is the alternative way
14213 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014214
14215 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014216 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014217 */
14218
Martin v. Löwis1d459062005-03-14 21:23:33 +000014219 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014220 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14221
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014222 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014223 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014224 if (localtime(&groundhogday)->tm_hour != 0)
14225 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014226#if HAVE_TZNAME
14227 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14228 if (strcmp(tzname[0], "UTC") ||
14229 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14230 exit(1);
14231#endif
Brett Cannon18367812003-09-19 00:59:16 +000014232
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014233 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014234 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014235 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014236 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014237#if HAVE_TZNAME
14238 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14239 exit(1);
14240#endif
Brett Cannon18367812003-09-19 00:59:16 +000014241
14242 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14243 tzset();
14244 if (localtime(&groundhogday)->tm_hour != 11)
14245 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014246#if HAVE_TZNAME
14247 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14248 exit(1);
14249#endif
14250
14251#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014252 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14253 exit(1);
14254 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14255 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014256#endif
Brett Cannon18367812003-09-19 00:59:16 +000014257
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014258 exit(0);
14259}
14260
14261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014262if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014263 ac_cv_working_tzset=yes
14264else
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14268 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014269fi
14270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271fi
14272
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14274$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014275if test "$ac_cv_working_tzset" = yes
14276then
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014279
14280fi
14281
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014282# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14284$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014285if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014287else
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014289/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014290#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014291int
14292main ()
14293{
14294
14295struct stat st;
14296st.st_mtim.tv_nsec = 1;
14297
14298 ;
14299 return 0;
14300}
14301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014303 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014304else
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14308fi
14309
Matthias Kloseb9621712010-04-24 17:59:49 +000014310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14311$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014312if test "$ac_cv_stat_tv_nsec" = yes
14313then
14314
Matthias Kloseb9621712010-04-24 17:59:49 +000014315$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014316
14317fi
14318
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014319# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14321$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014322if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014324else
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014326/* end confdefs.h. */
14327#include <sys/stat.h>
14328int
14329main ()
14330{
14331
14332struct stat st;
14333st.st_mtimespec.tv_nsec = 1;
14334
14335 ;
14336 return 0;
14337}
14338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014340 ac_cv_stat_tv_nsec2=yes
14341else
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14345fi
14346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14348$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014349if test "$ac_cv_stat_tv_nsec2" = yes
14350then
14351
Matthias Kloseb9621712010-04-24 17:59:49 +000014352$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014353
14354fi
14355
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014356ac_save_cppflags="$CPPFLAGS"
14357CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014358# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14360$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014361if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014365/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014366#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014367int
14368main ()
14369{
Jack Jansen666b1e72001-10-31 12:11:48 +000014370
14371 int rtn;
14372 rtn = mvwdelch(0,0,0);
14373
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014378if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014379 ac_cv_mvwdelch_is_expression=yes
14380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14384fi
14385
Matthias Kloseb9621712010-04-24 17:59:49 +000014386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14387$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014388
14389if test "$ac_cv_mvwdelch_is_expression" = yes
14390then
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
Matthias Kloseb9621712010-04-24 17:59:49 +000014392$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014393
14394fi
14395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14397$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014398if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014402/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014403#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014404int
14405main ()
14406{
Jack Jansen666b1e72001-10-31 12:11:48 +000014407
14408 WINDOW *w;
14409 w->_flags = 0;
14410
Martin v. Löwis11437992002-04-12 09:54:03 +000014411 ;
14412 return 0;
14413}
14414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014415if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014416 ac_cv_window_has_flags=yes
14417else
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14421fi
14422
Matthias Kloseb9621712010-04-24 17:59:49 +000014423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14424$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014425
Jack Jansen666b1e72001-10-31 12:11:48 +000014426
14427if test "$ac_cv_window_has_flags" = yes
14428then
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014431
14432fi
14433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14435$as_echo_n "checking for is_term_resized... " >&6; }
14436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014437/* end confdefs.h. */
14438#include <curses.h>
14439int
14440main ()
14441{
14442void *x=is_term_resized
14443 ;
14444 return 0;
14445}
14446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014450
Matthias Kloseb159a552010-04-25 21:00:44 +000014451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014452$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14455$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014456
14457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14461$as_echo_n "checking for resize_term... " >&6; }
14462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014463/* end confdefs.h. */
14464#include <curses.h>
14465int
14466main ()
14467{
14468void *x=resize_term
14469 ;
14470 return 0;
14471}
14472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014473if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014476
Matthias Kloseb159a552010-04-25 21:00:44 +000014477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014478$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014479else
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14481$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014482
14483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14487$as_echo_n "checking for resizeterm... " >&6; }
14488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014489/* end confdefs.h. */
14490#include <curses.h>
14491int
14492main ()
14493{
14494void *x=resizeterm
14495 ;
14496 return 0;
14497}
14498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014499if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014502
Matthias Kloseb159a552010-04-25 21:00:44 +000014503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014504$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014505else
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14507$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014508
14509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014511# last curses configure check
14512CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014513
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14515$as_echo "$as_me: checking for device files" >&6;}
14516
14517if test "x$cross_compiling" = xyes; then
14518 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14520$as_echo_n "checking for /dev/ptmx... " >&6; }
14521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14522$as_echo "not set" >&6; }
14523 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14524 fi
14525 if test "${ac_cv_file__dev_ptc+set}" != set; then
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14527$as_echo_n "checking for /dev/ptc... " >&6; }
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14529$as_echo "not set" >&6; }
14530 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14531 fi
14532fi
14533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14535$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014536if ${ac_cv_file__dev_ptmx+:} false; then :
14537 $as_echo_n "(cached) " >&6
14538else
14539 test "$cross_compiling" = yes &&
14540 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14541if test -r "/dev/ptmx"; then
14542 ac_cv_file__dev_ptmx=yes
14543else
14544 ac_cv_file__dev_ptmx=no
14545fi
14546fi
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14548$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14549if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014550
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014551fi
14552
14553if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014556
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14559$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014560if ${ac_cv_file__dev_ptc+:} false; then :
14561 $as_echo_n "(cached) " >&6
14562else
14563 test "$cross_compiling" = yes &&
14564 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14565if test -r "/dev/ptc"; then
14566 ac_cv_file__dev_ptc=yes
14567else
14568 ac_cv_file__dev_ptc=no
14569fi
14570fi
14571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14572$as_echo "$ac_cv_file__dev_ptc" >&6; }
14573if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014574
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014575fi
14576
14577if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014580
Neal Norwitz865400f2003-03-21 01:42:58 +000014581fi
14582
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014583if test "$have_long_long" = yes
14584then
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14586$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014587 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014589else
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014591 ac_cv_have_long_long_format="cross -- assuming no"
14592 if test x$GCC = xyes; then
14593 save_CFLAGS=$CFLAGS
14594 CFLAGS="$CFLAGS -Werror -Wformat"
14595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14596/* end confdefs.h. */
14597
14598 #include <stdio.h>
14599 #include <stddef.h>
14600
14601int
14602main ()
14603{
14604
14605 char *buffer;
14606 sprintf(buffer, "%lld", (long long)123);
14607 sprintf(buffer, "%lld", (long long)-123);
14608 sprintf(buffer, "%llu", (unsigned long long)123);
14609
14610 ;
14611 return 0;
14612}
14613_ACEOF
14614if ac_fn_c_try_compile "$LINENO"; then :
14615 ac_cv_have_long_long_format=yes
14616
14617fi
14618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14619 CFLAGS=$save_CFLAGS
14620 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014621else
Matthias Kloseb9621712010-04-24 17:59:49 +000014622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014623/* end confdefs.h. */
14624
14625 #include <stdio.h>
14626 #include <stddef.h>
14627 #include <string.h>
14628
14629 #ifdef HAVE_SYS_TYPES_H
14630 #include <sys/types.h>
14631 #endif
14632
14633 int main()
14634 {
14635 char buffer[256];
14636
14637 if (sprintf(buffer, "%lld", (long long)123) < 0)
14638 return 1;
14639 if (strcmp(buffer, "123"))
14640 return 1;
14641
14642 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14643 return 1;
14644 if (strcmp(buffer, "-123"))
14645 return 1;
14646
14647 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14648 return 1;
14649 if (strcmp(buffer, "123"))
14650 return 1;
14651
14652 return 0;
14653 }
14654
14655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014656if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014657 ac_cv_have_long_long_format=yes
14658else
Matthias Kloseb9621712010-04-24 17:59:49 +000014659 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014663fi
14664
14665
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014666fi
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14669$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014670fi
14671
Mark Dickinson89d7d412009-12-31 20:50:59 +000014672if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014673then
14674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014676
14677fi
14678
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014679if test $ac_sys_system = Darwin
14680then
14681 LIBS="$LIBS -framework CoreFoundation"
14682fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014683
Matthias Kloseb9621712010-04-24 17:59:49 +000014684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14685$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014686if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014690 ac_cv_have_size_t_format="cross -- assuming yes"
14691
Thomas Wouters477c8d52006-05-27 19:21:47 +000014692else
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014694/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014695
Thomas Wouters477c8d52006-05-27 19:21:47 +000014696#include <stdio.h>
14697#include <stddef.h>
14698#include <string.h>
14699
Christian Heimes2c181612007-12-17 20:04:13 +000014700#ifdef HAVE_SYS_TYPES_H
14701#include <sys/types.h>
14702#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014703
14704#ifdef HAVE_SSIZE_T
14705typedef ssize_t Py_ssize_t;
14706#elif SIZEOF_VOID_P == SIZEOF_LONG
14707typedef long Py_ssize_t;
14708#else
14709typedef int Py_ssize_t;
14710#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014711
Christian Heimes2c181612007-12-17 20:04:13 +000014712int main()
14713{
14714 char buffer[256];
14715
Thomas Wouters477c8d52006-05-27 19:21:47 +000014716 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14717 return 1;
14718
Thomas Wouters89f507f2006-12-13 04:49:30 +000014719 if (strcmp(buffer, "123"))
14720 return 1;
14721
14722 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14723 return 1;
14724
14725 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014726 return 1;
14727
14728 return 0;
14729}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014730
Thomas Wouters477c8d52006-05-27 19:21:47 +000014731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014732if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014733 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014734else
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014739fi
14740
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14743$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014744if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014745
Matthias Kloseb9621712010-04-24 17:59:49 +000014746$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014747
14748fi
14749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014751#ifdef HAVE_SYS_TYPES_H
14752#include <sys/types.h>
14753#endif
14754#ifdef HAVE_SYS_SOCKET_H
14755#include <sys/socket.h>
14756#endif
14757
Matthias Kloseb9621712010-04-24 17:59:49 +000014758"
Victor Stinnere0be4232011-10-25 13:06:09 +020014759if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014760
Martin v. Löwis11437992002-04-12 09:54:03 +000014761else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014762
Matthias Kloseb9621712010-04-24 17:59:49 +000014763$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014764
14765fi
14766
Michael W. Hudson54241132001-12-07 15:38:26 +000014767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14769$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014770if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014772else
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014774 ac_cv_broken_mbstowcs=no
14775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014777/* end confdefs.h. */
14778
14779#include<stdlib.h>
14780int main() {
14781 size_t len = -1;
14782 const char *str = "text";
14783 len = mbstowcs(NULL, str, 0);
14784 return (len != 4);
14785}
14786
14787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014788if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014789 ac_cv_broken_mbstowcs=no
14790else
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14794 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014795fi
14796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014797fi
14798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14800$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014801if test "$ac_cv_broken_mbstowcs" = yes
14802then
14803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014805
14806fi
14807
Antoine Pitroub52ec782009-01-25 16:34:23 +000014808# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14810$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014811
14812# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014814 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014815if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014816then
14817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14821$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014822fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014823if test "$withval" = no
14824then
14825
14826$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14829$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014830fi
14831
Antoine Pitrou042b1282010-08-13 21:15:58 +000014832else
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14834$as_echo "no value specified" >&6; }
14835fi
14836
Antoine Pitroub52ec782009-01-25 16:34:23 +000014837
Matthias Kloseb17289e2012-03-15 19:51:34 +010014838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14839$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14840if ${ac_cv_computed_gotos+:} false; then :
14841 $as_echo_n "(cached) " >&6
14842else
14843 if test "$cross_compiling" = yes; then :
14844 if test "${with_computed_gotos+set}" = set; then
14845 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14846 else
14847 ac_cv_computed_gotos=no
14848 fi
14849else
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851/* end confdefs.h. */
14852
14853int main(int argc, char **argv)
14854{
14855 static void *targets[1] = { &&LABEL1 };
14856 goto LABEL2;
14857LABEL1:
14858 return 0;
14859LABEL2:
14860 goto *targets[0];
14861 return 1;
14862}
14863
14864_ACEOF
14865if ac_fn_c_try_run "$LINENO"; then :
14866 ac_cv_computed_gotos=yes
14867else
14868 ac_cv_computed_gotos=no
14869fi
14870rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14871 conftest.$ac_objext conftest.beam conftest.$ac_ext
14872fi
14873
14874fi
14875
14876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14877$as_echo "$ac_cv_computed_gotos" >&6; }
14878case "$ac_cv_computed_gotos" in yes*)
14879
14880$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14881
14882esac
14883
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014884case $ac_sys_system in
14885AIX*)
14886
14887$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14888 ;;
14889esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014890
Michael W. Hudson54241132001-12-07 15:38:26 +000014891
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014892
14893
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014894for h in `(cd $srcdir;echo Python/thread_*.h)`
14895do
14896 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14897done
14898
Michael W. Hudson54241132001-12-07 15:38:26 +000014899
Neal Norwitzd24499d2005-12-18 21:36:39 +000014900SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14902$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014903for dir in $SRCDIRS; do
14904 if test ! -d $dir; then
14905 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014906 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014907done
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14909$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014910
Stefan Krah1919b7e2012-03-21 18:25:23 +010014911# Availability of -O2:
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14913$as_echo_n "checking for -O2... " >&6; }
14914saved_cflags="$CFLAGS"
14915CFLAGS="-O2"
14916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14917/* end confdefs.h. */
14918
14919int
14920main ()
14921{
14922
14923
14924 ;
14925 return 0;
14926}
14927_ACEOF
14928if ac_fn_c_try_compile "$LINENO"; then :
14929 have_O2=yes
14930else
14931 have_O2=no
14932fi
14933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14935$as_echo "$have_O2" >&6; }
14936CFLAGS="$saved_cflags"
14937
14938# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14939# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14941$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14942saved_cflags="$CFLAGS"
14943CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14944if test "$have_O2" = no; then
14945 CFLAGS=""
14946fi
14947if test "$cross_compiling" = yes; then :
14948 have_glibc_memmove_bug=undefined
14949else
14950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14951/* end confdefs.h. */
14952
14953#include <stdio.h>
14954#include <stdlib.h>
14955#include <string.h>
14956void foo(void *p, void *q) { memmove(p, q, 19); }
14957int main() {
14958 char a[32] = "123456789000000000";
14959 foo(&a[9], a);
14960 if (strcmp(a, "123456789123456789000000000") != 0)
14961 return 1;
14962 foo(a, &a[9]);
14963 if (strcmp(a, "123456789000000000") != 0)
14964 return 1;
14965 return 0;
14966}
14967
14968_ACEOF
14969if ac_fn_c_try_run "$LINENO"; then :
14970 have_glibc_memmove_bug=no
14971else
14972 have_glibc_memmove_bug=yes
14973fi
14974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14975 conftest.$ac_objext conftest.beam conftest.$ac_ext
14976fi
14977
14978CFLAGS="$saved_cflags"
14979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14980$as_echo "$have_glibc_memmove_bug" >&6; }
14981if test "$have_glibc_memmove_bug" = yes; then
14982
14983$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14984
14985fi
14986
14987if test "$have_gcc_asm_for_x87" = yes; then
14988 # Some versions of gcc miscompile inline asm:
14989 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14990 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14991 case $CC in
14992 *gcc*)
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14994$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14995 saved_cflags="$CFLAGS"
14996 CFLAGS="-O2"
14997 if test "$cross_compiling" = yes; then :
14998 have_ipa_pure_const_bug=undefined
14999else
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001/* end confdefs.h. */
15002
15003 __attribute__((noinline)) int
15004 foo(int *p) {
15005 int r;
15006 asm ( "movl \$6, (%1)\n\t"
15007 "xorl %0, %0\n\t"
15008 : "=r" (r) : "r" (p) : "memory"
15009 );
15010 return r;
15011 }
15012 int main() {
15013 int p = 8;
15014 if ((foo(&p) ? : p) != 6)
15015 return 1;
15016 return 0;
15017 }
15018
15019_ACEOF
15020if ac_fn_c_try_run "$LINENO"; then :
15021 have_ipa_pure_const_bug=no
15022else
15023 have_ipa_pure_const_bug=yes
15024fi
15025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15026 conftest.$ac_objext conftest.beam conftest.$ac_ext
15027fi
15028
15029 CFLAGS="$saved_cflags"
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15031$as_echo "$have_ipa_pure_const_bug" >&6; }
15032 if test "$have_ipa_pure_const_bug" = yes; then
15033
15034$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15035
15036 fi
15037 ;;
15038 esac
15039fi
15040
Guido van Rossum627b2d71993-12-24 10:39:16 +000015041# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015042ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015043
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015044ac_config_files="$ac_config_files Modules/ld_so_aix"
15045
Martin v. Löwis11437992002-04-12 09:54:03 +000015046cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015047# This file is a shell script that caches the results of configure
15048# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015049# scripts and configure runs, see configure's option --config-cache.
15050# It is not useful on other systems. If it contains results you don't
15051# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015052#
Martin v. Löwis11437992002-04-12 09:54:03 +000015053# config.status only pays attention to the cache file if you give it
15054# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015055#
Skip Montanaro6dead952003-09-25 14:50:04 +000015056# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015057# loading this file, other *unset* `ac_cv_foo' will be assigned the
15058# following values.
15059
15060_ACEOF
15061
Guido van Rossumf78abae1997-01-21 22:02:36 +000015062# The following way of writing the cache mishandles newlines in values,
15063# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015064# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015065# Ultrix sh set writes to stderr and can't be redirected directly,
15066# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015067(
15068 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15069 eval ac_val=\$$ac_var
15070 case $ac_val in #(
15071 *${as_nl}*)
15072 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15074$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015075 esac
15076 case $ac_var in #(
15077 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15079 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015080 esac ;;
15081 esac
15082 done
15083
Martin v. Löwis11437992002-04-12 09:54:03 +000015084 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015085 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15086 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 # `set' does not quote correctly, so add quotes: double-quote
15088 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015090 "s/'/'\\\\''/g;
15091 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015092 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 *)
15094 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015096 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097 esac |
15098 sort
15099) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015100 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015101 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015102 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15105 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015106 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15107 :end' >>confcache
15108if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15109 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015110 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15112$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015113 if test ! -f "$cache_file" || test -h "$cache_file"; then
15114 cat confcache >"$cache_file"
15115 else
15116 case $cache_file in #(
15117 */* | ?:*)
15118 mv -f confcache "$cache_file"$$ &&
15119 mv -f "$cache_file"$$ "$cache_file" ;; #(
15120 *)
15121 mv -f confcache "$cache_file" ;;
15122 esac
15123 fi
15124 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015125 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15127$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015128 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015129fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015130rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015131
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015132test "x$prefix" = xNONE && prefix=$ac_default_prefix
15133# Let make expand exec_prefix.
15134test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015135
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015136DEFS=-DHAVE_CONFIG_H
15137
Skip Montanaro6dead952003-09-25 14:50:04 +000015138ac_libobjs=
15139ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015140U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015141for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15142 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15146 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15148 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015149done
15150LIBOBJS=$ac_libobjs
15151
15152LTLIBOBJS=$ac_ltlibobjs
15153
15154
Martin v. Löwis11437992002-04-12 09:54:03 +000015155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156
Victor Stinnere0be4232011-10-25 13:06:09 +020015157: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015158ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015159ac_clean_files_save=$ac_clean_files
15160ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15162$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15163as_write_fail=0
15164cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015165#! $SHELL
15166# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015167# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015168# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015169# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015170
Martin v. Löwis11437992002-04-12 09:54:03 +000015171debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015172ac_cs_recheck=false
15173ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175SHELL=\${CONFIG_SHELL-$SHELL}
15176export SHELL
15177_ASEOF
15178cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15179## -------------------- ##
15180## M4sh Initialization. ##
15181## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183# Be more Bourne compatible
15184DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015185if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 emulate sh
15187 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015189 # is contrary to our usage. Disable this feature.
15190 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015192else
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 case `(set -o) 2>/dev/null` in #(
15194 *posix*) :
15195 set -o posix ;; #(
15196 *) :
15197 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015199fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015200
15201
Matthias Kloseb9621712010-04-24 17:59:49 +000015202as_nl='
15203'
15204export as_nl
15205# Printing a long string crashes Solaris 7 /usr/bin/printf.
15206as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15207as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15208as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15209# Prefer a ksh shell builtin over an external printf program on Solaris,
15210# but without wasting forks for bash or zsh.
15211if test -z "$BASH_VERSION$ZSH_VERSION" \
15212 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15213 as_echo='print -r --'
15214 as_echo_n='print -rn --'
15215elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15216 as_echo='printf %s\n'
15217 as_echo_n='printf %s'
15218else
15219 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15220 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15221 as_echo_n='/usr/ucb/echo -n'
15222 else
15223 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15224 as_echo_n_body='eval
15225 arg=$1;
15226 case $arg in #(
15227 *"$as_nl"*)
15228 expr "X$arg" : "X\\(.*\\)$as_nl";
15229 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15230 esac;
15231 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15232 '
15233 export as_echo_n_body
15234 as_echo_n='sh -c $as_echo_n_body as_echo'
15235 fi
15236 export as_echo_body
15237 as_echo='sh -c $as_echo_body as_echo'
15238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015239
15240# The user is always right.
15241if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 PATH_SEPARATOR=:
15243 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15244 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15245 PATH_SEPARATOR=';'
15246 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249
15250# IFS
15251# We need space, tab and new line, in precisely that order. Quoting is
15252# there to prevent editors from complaining about space-tab.
15253# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15254# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255IFS=" "" $as_nl"
15256
15257# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015258as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015259case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015260 *[\\/]* ) as_myself=$0 ;;
15261 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015262for as_dir in $PATH
15263do
15264 IFS=$as_save_IFS
15265 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015266 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15267 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015268IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015269
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015270 ;;
15271esac
15272# We did not find ourselves, most probably we were run as `sh COMMAND'
15273# in which case we are not to be found in the path.
15274if test "x$as_myself" = x; then
15275 as_myself=$0
15276fi
15277if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015278 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15279 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280fi
15281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282# Unset variables that we do not need and which cause bugs (e.g. in
15283# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15284# suppresses any "Segmentation fault" message there. '((' could
15285# trigger a bug in pdksh 5.2.14.
15286for as_var in BASH_ENV ENV MAIL MAILPATH
15287do eval test x\${$as_var+set} = xset \
15288 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289done
15290PS1='$ '
15291PS2='> '
15292PS4='+ '
15293
15294# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015295LC_ALL=C
15296export LC_ALL
15297LANGUAGE=C
15298export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299
Matthias Kloseb9621712010-04-24 17:59:49 +000015300# CDPATH.
15301(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15302
15303
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015304# as_fn_error STATUS ERROR [LINENO LOG_FD]
15305# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015306# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15307# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015308# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015309as_fn_error ()
15310{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015311 as_status=$1; test $as_status -eq 0 && as_status=1
15312 if test "$4"; then
15313 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15314 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015316 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 as_fn_exit $as_status
15318} # as_fn_error
15319
15320
15321# as_fn_set_status STATUS
15322# -----------------------
15323# Set $? to STATUS, without forking.
15324as_fn_set_status ()
15325{
15326 return $1
15327} # as_fn_set_status
15328
15329# as_fn_exit STATUS
15330# -----------------
15331# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15332as_fn_exit ()
15333{
15334 set +e
15335 as_fn_set_status $1
15336 exit $1
15337} # as_fn_exit
15338
15339# as_fn_unset VAR
15340# ---------------
15341# Portably unset VAR.
15342as_fn_unset ()
15343{
15344 { eval $1=; unset $1;}
15345}
15346as_unset=as_fn_unset
15347# as_fn_append VAR VALUE
15348# ----------------------
15349# Append the text in VALUE to the end of the definition contained in VAR. Take
15350# advantage of any shell optimizations that allow amortized linear growth over
15351# repeated appends, instead of the typical quadratic growth present in naive
15352# implementations.
15353if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15354 eval 'as_fn_append ()
15355 {
15356 eval $1+=\$2
15357 }'
15358else
15359 as_fn_append ()
15360 {
15361 eval $1=\$$1\$2
15362 }
15363fi # as_fn_append
15364
15365# as_fn_arith ARG...
15366# ------------------
15367# Perform arithmetic evaluation on the ARGs, and store the result in the
15368# global $as_val. Take advantage of shells that can avoid forks. The arguments
15369# must be portable across $(()) and expr.
15370if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15371 eval 'as_fn_arith ()
15372 {
15373 as_val=$(( $* ))
15374 }'
15375else
15376 as_fn_arith ()
15377 {
15378 as_val=`expr "$@" || test $? -eq 1`
15379 }
15380fi # as_fn_arith
15381
15382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015383if expr a : '\(a\)' >/dev/null 2>&1 &&
15384 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15385 as_expr=expr
15386else
15387 as_expr=false
15388fi
15389
15390if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15391 as_basename=basename
15392else
15393 as_basename=false
15394fi
15395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15397 as_dirname=dirname
15398else
15399 as_dirname=false
15400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402as_me=`$as_basename -- "$0" ||
15403$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15404 X"$0" : 'X\(//\)$' \| \
15405 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015406$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407 sed '/^.*\/\([^/][^/]*\)\/*$/{
15408 s//\1/
15409 q
15410 }
15411 /^X\/\(\/\/\)$/{
15412 s//\1/
15413 q
15414 }
15415 /^X\/\(\/\).*/{
15416 s//\1/
15417 q
15418 }
15419 s/.*/./; q'`
15420
Matthias Kloseb9621712010-04-24 17:59:49 +000015421# Avoid depending upon Character Ranges.
15422as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15423as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15424as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15425as_cr_digits='0123456789'
15426as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427
15428ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015429case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015430-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015431 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015433 xy) ECHO_C='\c';;
15434 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15435 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436 esac;;
15437*)
15438 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015439esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015440
Martin v. Löwis11437992002-04-12 09:54:03 +000015441rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442if test -d conf$$.dir; then
15443 rm -f conf$$.dir/conf$$.file
15444else
15445 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015446 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015448if (echo >conf$$.file) 2>/dev/null; then
15449 if ln -s conf$$.file conf$$ 2>/dev/null; then
15450 as_ln_s='ln -s'
15451 # ... but there are two gotchas:
15452 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15453 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015454 # In both cases, we have to default to `cp -p'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015456 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 elif ln conf$$.file conf$$ 2>/dev/null; then
15458 as_ln_s=ln
15459 else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015460 as_ln_s='cp -p'
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015462else
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015463 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000015464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15466rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Matthias Kloseb9621712010-04-24 17:59:49 +000015468
15469# as_fn_mkdir_p
15470# -------------
15471# Create "$as_dir" as a directory, including parents if necessary.
15472as_fn_mkdir_p ()
15473{
15474
15475 case $as_dir in #(
15476 -*) as_dir=./$as_dir;;
15477 esac
15478 test -d "$as_dir" || eval $as_mkdir_p || {
15479 as_dirs=
15480 while :; do
15481 case $as_dir in #(
15482 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15483 *) as_qdir=$as_dir;;
15484 esac
15485 as_dirs="'$as_qdir' $as_dirs"
15486 as_dir=`$as_dirname -- "$as_dir" ||
15487$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15488 X"$as_dir" : 'X\(//\)[^/]' \| \
15489 X"$as_dir" : 'X\(//\)$' \| \
15490 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15491$as_echo X"$as_dir" |
15492 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15493 s//\1/
15494 q
15495 }
15496 /^X\(\/\/\)[^/].*/{
15497 s//\1/
15498 q
15499 }
15500 /^X\(\/\/\)$/{
15501 s//\1/
15502 q
15503 }
15504 /^X\(\/\).*/{
15505 s//\1/
15506 q
15507 }
15508 s/.*/./; q'`
15509 test -d "$as_dir" && break
15510 done
15511 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015512 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015513
15514
15515} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015516if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015518else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015519 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015520 as_mkdir_p=false
15521fi
15522
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015523if test -x / >/dev/null 2>&1; then
15524 as_test_x='test -x'
15525else
15526 if ls -dL / >/dev/null 2>&1; then
15527 as_ls_L_option=L
15528 else
15529 as_ls_L_option=
15530 fi
15531 as_test_x='
15532 eval sh -c '\''
15533 if test -d "$1"; then
15534 test -d "$1/.";
15535 else
15536 case $1 in #(
15537 -*)set "./$1";;
15538 esac;
15539 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
15540 ???[sx]*):;;*)false;;esac;fi
15541 '\'' sh
15542 '
15543fi
15544as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
15546# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015547as_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 +000015548
15549# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015550as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015551
15552
Martin v. Löwis11437992002-04-12 09:54:03 +000015553exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015554## ----------------------------------- ##
15555## Main body of $CONFIG_STATUS script. ##
15556## ----------------------------------- ##
15557_ASEOF
15558test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15561# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015562# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563# values after options handling.
15564ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015565This file was extended by python $as_me 3.3, which was
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015566generated by GNU Autoconf 2.68. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015567
15568 CONFIG_FILES = $CONFIG_FILES
15569 CONFIG_HEADERS = $CONFIG_HEADERS
15570 CONFIG_LINKS = $CONFIG_LINKS
15571 CONFIG_COMMANDS = $CONFIG_COMMANDS
15572 $ $0 $@
15573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574on `(hostname || uname -n) 2>/dev/null | sed 1q`
15575"
15576
Martin v. Löwis11437992002-04-12 09:54:03 +000015577_ACEOF
15578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579case $ac_config_files in *"
15580"*) set x $ac_config_files; shift; ac_config_files=$*;;
15581esac
15582
15583case $ac_config_headers in *"
15584"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15585esac
15586
15587
15588cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015589# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015590config_files="$ac_config_files"
15591config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015596ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015597\`$as_me' instantiates files and other configuration actions
15598from templates according to the current configuration. Unless the files
15599and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015602
15603 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 --config print configuration, then exit
15606 -q, --quiet, --silent
15607 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 -d, --debug don't remove temporary files
15609 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 --file=FILE[:TEMPLATE]
15611 instantiate the configuration file FILE
15612 --header=FILE[:TEMPLATE]
15613 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615Configuration files:
15616$config_files
15617
15618Configuration headers:
15619$config_headers
15620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15625ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015626ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015627python config.status 3.3
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015628configured by $0, generated by GNU Autoconf 2.68,
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015631Copyright (C) 2010 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015632This config.status script is free software; the Free Software Foundation
15633gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634
15635ac_pwd='$ac_pwd'
15636srcdir='$srcdir'
15637INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015638MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015639test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015640_ACEOF
15641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15643# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015644ac_need_defaults=:
15645while test $# != 0
15646do
15647 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015648 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15650 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015651 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015653 --*=)
15654 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15655 ac_optarg=
15656 ac_shift=:
15657 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015659 ac_option=$1
15660 ac_optarg=$2
15661 ac_shift=shift
15662 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 esac
15664
Skip Montanaro6dead952003-09-25 14:50:04 +000015665 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015667 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15668 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 $as_echo "$ac_cs_version"; exit ;;
15671 --config | --confi | --conf | --con | --co | --c )
15672 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015673 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015674 debug=: ;;
15675 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015676 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015677 case $ac_optarg in
15678 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015679 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 esac
15681 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015682 ac_need_defaults=false;;
15683 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015684 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 case $ac_optarg in
15686 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15687 esac
15688 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015690 --he | --h)
15691 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015692 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015693Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015694 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015696 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15697 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15698 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015699
15700 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015701 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015702Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015703
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
15707 esac
15708 shift
15709done
15710
Skip Montanaro6dead952003-09-25 14:50:04 +000015711ac_configure_extra_args=
15712
15713if $ac_cs_silent; then
15714 exec 6>/dev/null
15715 ac_configure_extra_args="$ac_configure_extra_args --silent"
15716fi
15717
15718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015720if \$ac_cs_recheck; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +020015721 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 shift
15723 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15724 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015727fi
15728
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731exec 5>>config.log
15732{
15733 echo
15734 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15735## Running $as_me. ##
15736_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015737 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015741cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745
15746# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015747for ac_config_target in $ac_config_targets
15748do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749 case $ac_config_target in
15750 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15751 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15752 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015753 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15754 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15756 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015757 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015758 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759
Victor Stinnere0be4232011-10-25 13:06:09 +020015760 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 esac
15762done
15763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764
Martin v. Löwis11437992002-04-12 09:54:03 +000015765# If the user did not use the arguments to specify the items to instantiate,
15766# then the envvar interface is used. Set only those that are not.
15767# We use the long form for the default assignment because of an extremely
15768# bizarre bug on SunOS 4.1.3.
15769if $ac_need_defaults; then
15770 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15771 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15772fi
15773
Skip Montanaro6dead952003-09-25 14:50:04 +000015774# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015776# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777# Hook for its removal unless debugging.
15778# Note that there is a small window in which the directory will not be cleaned:
15779# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015780$debug ||
15781{
Victor Stinnere0be4232011-10-25 13:06:09 +020015782 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015784 : "${ac_tmp:=$tmp}"
15785 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015788}
Martin v. Löwis11437992002-04-12 09:54:03 +000015789# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015790
Martin v. Löwis11437992002-04-12 09:54:03 +000015791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015793 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015794} ||
15795{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796 tmp=./conf$$-$RANDOM
15797 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015798} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015799ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801# Set up the scripts for CONFIG_FILES section.
15802# No need to generate them if there are no CONFIG_FILES.
15803# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806
15807ac_cr=`echo X | tr X '\015'`
15808# On cygwin, bash can eat \r inside `` if the user requested igncr.
15809# But we know of no other shell where ac_cr would be empty at this
15810# point, so we can use a bashism as a fallback.
15811if test "x$ac_cr" = x; then
15812 eval ac_cr=\$\'\\r\'
15813fi
15814ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15815if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015816 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015817else
15818 ac_cs_awk_cr=$ac_cr
15819fi
15820
Victor Stinnere0be4232011-10-25 13:06:09 +020015821echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
15823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825{
15826 echo "cat >conf$$subs.awk <<_ACEOF" &&
15827 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15828 echo "_ACEOF"
15829} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015830 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15831ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832ac_delim='%!_!# '
15833for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015835 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15838 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839 break
15840 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015841 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842 else
15843 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015844 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845done
Matthias Kloseb9621712010-04-24 17:59:49 +000015846rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015849cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015851sed -n '
15852h
15853s/^/S["/; s/!.*/"]=/
15854p
15855g
15856s/^[^!]*!//
15857:repl
15858t repl
15859s/'"$ac_delim"'$//
15860t delim
15861:nl
15862h
15863s/\(.\{148\}\)..*/\1/
15864t more1
15865s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15866p
15867n
15868b repl
15869:more1
15870s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15871p
15872g
15873s/.\{148\}//
15874t nl
15875:delim
15876h
15877s/\(.\{148\}\)..*/\1/
15878t more2
15879s/["\\]/\\&/g; s/^/"/; s/$/"/
15880p
15881b
15882:more2
15883s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15884p
15885g
15886s/.\{148\}//
15887t delim
15888' <conf$$subs.awk | sed '
15889/^[^""]/{
15890 N
15891 s/\n//
15892}
15893' >>$CONFIG_STATUS || ac_write_fail=1
15894rm -f conf$$subs.awk
15895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15896_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015897cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015898 for (key in S) S_is_set[key] = 1
15899 FS = ""
15900
15901}
15902{
15903 line = $ 0
15904 nfields = split(line, field, "@")
15905 substed = 0
15906 len = length(field[1])
15907 for (i = 2; i < nfields; i++) {
15908 key = field[i]
15909 keylen = length(key)
15910 if (S_is_set[key]) {
15911 value = S[key]
15912 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15913 len += length(value) + length(field[++i])
15914 substed = 1
15915 } else
15916 len += 1 + keylen
15917 }
15918
15919 print line
15920}
15921
15922_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015924cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15925if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15926 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15927else
15928 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015929fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015930 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015931_ACEOF
15932
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015933# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15934# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935# trailing colons and then remove the whole line if VPATH becomes empty
15936# (actually we leave an empty line to preserve line numbers).
15937if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015938 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15939h
15940s///
15941s/^/:/
15942s/[ ]*$/:/
15943s/:\$(srcdir):/:/g
15944s/:\${srcdir}:/:/g
15945s/:@srcdir@:/:/g
15946s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015948x
15949s/\(=[ ]*\).*/\1/
15950G
15951s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015952s/^[^=]*=[ ]*$//
15953}'
15954fi
15955
Matthias Kloseb9621712010-04-24 17:59:49 +000015956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015957fi # test -n "$CONFIG_FILES"
15958
Matthias Kloseb9621712010-04-24 17:59:49 +000015959# Set up the scripts for CONFIG_HEADERS section.
15960# No need to generate them if there are no CONFIG_HEADERS.
15961# This happens for instance with `./config.status Makefile'.
15962if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015963cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015964BEGIN {
15965_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967# Transform confdefs.h into an awk script `defines.awk', embedded as
15968# here-document in config.status, that substitutes the proper values into
15969# config.h.in to produce config.h.
15970
15971# Create a delimiter string that does not exist in confdefs.h, to ease
15972# handling of long lines.
15973ac_delim='%!_!# '
15974for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015975 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15976 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015977 break
15978 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015979 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 else
15981 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15982 fi
15983done
15984
15985# For the awk script, D is an array of macro values keyed by name,
15986# likewise P contains macro parameters if any. Preserve backslash
15987# newline sequences.
15988
15989ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15990sed -n '
15991s/.\{148\}/&'"$ac_delim"'/g
15992t rset
15993:rset
15994s/^[ ]*#[ ]*define[ ][ ]*/ /
15995t def
15996d
15997:def
15998s/\\$//
15999t bsnl
16000s/["\\]/\\&/g
16001s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16002D["\1"]=" \3"/p
16003s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16004d
16005:bsnl
16006s/["\\]/\\&/g
16007s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16008D["\1"]=" \3\\\\\\n"\\/p
16009t cont
16010s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16011t cont
16012d
16013:cont
16014n
16015s/.\{148\}/&'"$ac_delim"'/g
16016t clear
16017:clear
16018s/\\$//
16019t bsnlc
16020s/["\\]/\\&/g; s/^/"/; s/$/"/p
16021d
16022:bsnlc
16023s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16024b cont
16025' <confdefs.h | sed '
16026s/'"$ac_delim"'/"\\\
16027"/g' >>$CONFIG_STATUS || ac_write_fail=1
16028
16029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16030 for (key in D) D_is_set[key] = 1
16031 FS = ""
16032}
16033/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16034 line = \$ 0
16035 split(line, arg, " ")
16036 if (arg[1] == "#") {
16037 defundef = arg[2]
16038 mac1 = arg[3]
16039 } else {
16040 defundef = substr(arg[1], 2)
16041 mac1 = arg[2]
16042 }
16043 split(mac1, mac2, "(") #)
16044 macro = mac2[1]
16045 prefix = substr(line, 1, index(line, defundef) - 1)
16046 if (D_is_set[macro]) {
16047 # Preserve the white space surrounding the "#".
16048 print prefix "define", macro P[macro] D[macro]
16049 next
16050 } else {
16051 # Replace #undef with comments. This is necessary, for example,
16052 # in the case of _POSIX_SOURCE, which is predefined and required
16053 # on some systems where configure will not decide to define it.
16054 if (defundef == "undef") {
16055 print "/*", prefix defundef, macro, "*/"
16056 next
16057 }
16058 }
16059}
16060{ print }
16061_ACAWK
16062_ACEOF
16063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016064 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016065fi # test -n "$CONFIG_HEADERS"
16066
16067
16068eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16069shift
16070for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071do
16072 case $ac_tag in
16073 :[FHLC]) ac_mode=$ac_tag; continue;;
16074 esac
16075 case $ac_mode$ac_tag in
16076 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016077 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078 :[FH]-) ac_tag=-:-;;
16079 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16080 esac
16081 ac_save_IFS=$IFS
16082 IFS=:
16083 set x $ac_tag
16084 IFS=$ac_save_IFS
16085 shift
16086 ac_file=$1
16087 shift
16088
16089 case $ac_mode in
16090 :L) ac_source=$1;;
16091 :[FH])
16092 ac_file_inputs=
16093 for ac_f
16094 do
16095 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016096 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016097 *) # Look for the file first in the build tree, then in the source tree
16098 # (if the path is not absolute). The absolute path cannot be DOS-style,
16099 # because $ac_f cannot contain `:'.
16100 test -f "$ac_f" ||
16101 case $ac_f in
16102 [\\/$]*) false;;
16103 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16104 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016105 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16108 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016109 done
16110
16111 # Let's still pretend it is `configure' which instantiates (i.e., don't
16112 # use $as_me), people would be surprised to read:
16113 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016114 configure_input='Generated from '`
16115 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16116 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117 if test x"$ac_file" != x-; then
16118 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16120$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 # Neutralize special characters interpreted by sed in replacement strings.
16123 case $configure_input in #(
16124 *\&* | *\|* | *\\* )
16125 ac_sed_conf_input=`$as_echo "$configure_input" |
16126 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16127 *) ac_sed_conf_input=$configure_input;;
16128 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016129
16130 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016131 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16132 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133 esac
16134 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 esac
16136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016138$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016139 X"$ac_file" : 'X\(//\)[^/]' \| \
16140 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016142$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16144 s//\1/
16145 q
16146 }
16147 /^X\(\/\/\)[^/].*/{
16148 s//\1/
16149 q
16150 }
16151 /^X\(\/\/\)$/{
16152 s//\1/
16153 q
16154 }
16155 /^X\(\/\).*/{
16156 s//\1/
16157 q
16158 }
16159 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016160 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016161 ac_builddir=.
16162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163case "$ac_dir" in
16164.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16165*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016166 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016168 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169 case $ac_top_builddir_sub in
16170 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16171 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16172 esac ;;
16173esac
16174ac_abs_top_builddir=$ac_pwd
16175ac_abs_builddir=$ac_pwd$ac_dir_suffix
16176# for backward compatibility:
16177ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016178
16179case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016181 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182 ac_top_srcdir=$ac_top_builddir_sub
16183 ac_abs_top_srcdir=$ac_pwd ;;
16184 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186 ac_top_srcdir=$srcdir
16187 ac_abs_top_srcdir=$srcdir ;;
16188 *) # Relative name.
16189 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16190 ac_top_srcdir=$ac_top_build_prefix$srcdir
16191 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016192esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194
Martin v. Löwis11437992002-04-12 09:54:03 +000016195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196 case $ac_mode in
16197 :F)
16198 #
16199 # CONFIG_FILE
16200 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016201
16202 case $INSTALL in
16203 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016205 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016206 ac_MKDIR_P=$MKDIR_P
16207 case $MKDIR_P in
16208 [\\/$]* | ?:[\\/]* ) ;;
16209 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16210 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016211_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212
Matthias Kloseb9621712010-04-24 17:59:49 +000016213cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214# If the template does not know about datarootdir, expand it.
16215# FIXME: This hack should be removed a few years after 2.60.
16216ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016217ac_sed_dataroot='
16218/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 p
16220 q
16221}
16222/@datadir@/p
16223/@docdir@/p
16224/@infodir@/p
16225/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016226/@mandir@/p'
16227case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228*datarootdir*) ac_datarootdir_seen=yes;;
16229*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16231$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016233cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234 ac_datarootdir_hack='
16235 s&@datadir@&$datadir&g
16236 s&@docdir@&$docdir&g
16237 s&@infodir@&$infodir&g
16238 s&@localedir@&$localedir&g
16239 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016240 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241esac
16242_ACEOF
16243
16244# Neutralize VPATH when `$srcdir' = `.'.
16245# Shell code in configure.ac might set extrasub.
16246# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16248ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016249$extrasub
16250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016252:t
16253/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016254s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016255s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016256s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257s&@srcdir@&$ac_srcdir&;t t
16258s&@abs_srcdir@&$ac_abs_srcdir&;t t
16259s&@top_srcdir@&$ac_top_srcdir&;t t
16260s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16261s&@builddir@&$ac_builddir&;t t
16262s&@abs_builddir@&$ac_abs_builddir&;t t
16263s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16264s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016265s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016267"
Victor Stinnere0be4232011-10-25 13:06:09 +020016268eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16269 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016272 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16273 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16274 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016276which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016277$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016278which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016279
Victor Stinnere0be4232011-10-25 13:06:09 +020016280 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016282 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16283 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016284 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016285 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286 ;;
16287 :H)
16288 #
16289 # CONFIG_HEADER
16290 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016292 {
16293 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016294 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16295 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016297 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16299$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016301 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016302 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016303 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016304 fi
16305 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016307 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016308 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016309 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016312
16313 esac
16314
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016315
16316 case $ac_file$ac_mode in
16317 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16318
16319 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016320done # for ac_tag
16321
Guido van Rossum627b2d71993-12-24 10:39:16 +000016322
Matthias Kloseb9621712010-04-24 17:59:49 +000016323as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016324_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016325ac_clean_files=$ac_clean_files_save
16326
Matthias Kloseb9621712010-04-24 17:59:49 +000016327test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016328 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016329
Martin v. Löwis11437992002-04-12 09:54:03 +000016330
16331# configure is writing to config.log, and then calls config.status.
16332# config.status does its own redirection, appending to config.log.
16333# Unfortunately, on DOS this fails, as config.log is still kept open
16334# by configure, so config.status won't be able to write to it; its
16335# output is simply discarded. So we exec the FD to /dev/null,
16336# effectively closing config.log, so it can be properly (re)opened and
16337# appended to by config.status. When coming back to configure, we
16338# need to make the FD available again.
16339if test "$no_create" != yes; then
16340 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016341 ac_config_status_args=
16342 test "$silent" = yes &&
16343 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016344 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016345 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 exec 5>>config.log
16347 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16348 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016349 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016350fi
16351if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16353$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016354fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016355
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016356
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016357echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016358if test ! -f Modules/Setup
16359then
16360 cp $srcdir/Modules/Setup.dist Modules/Setup
16361fi
16362
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016363echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016364if test ! -f Modules/Setup.local
16365then
16366 echo "# Edit this file for local setup changes" >Modules/Setup.local
16367fi
16368
16369echo "creating Makefile"
16370$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16371 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016372 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016373mv config.c Modules